You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-nettle/0001-drop-secp192r1-and-sec...

1162 lines
90 KiB

From e5ccffb103d9a66bf5d1a7afc6de954bef40382c Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 18 Nov 2021 12:57:07 +0100
Subject: [PATCH] drop secp192r1 and secp224r1 elliptic curves
---
src/ecc/curves.rs | 26 +-
src/ecc/mod.rs | 2 +-
src/ecc/types.rs | 38 +--
src/ecdh.rs | 784 +---------------------------------------------
src/ecdsa/keys.rs | 30 --
src/ecdsa/sign.rs | 177 -----------
6 files changed, 5 insertions(+), 1052 deletions(-)
diff --git a/src/ecc/curves.rs b/src/ecc/curves.rs
index e0dbda0..19e0064 100644
--- a/src/ecc/curves.rs
+++ b/src/ecc/curves.rs
@@ -1,6 +1,6 @@
use nettle_sys::{
- ecc_curve, nettle_ecc_bit_size, nettle_get_secp_192r1,
- nettle_get_secp_224r1, nettle_get_secp_256r1, nettle_get_secp_384r1,
+ ecc_curve, nettle_ecc_bit_size,
+ nettle_get_secp_256r1, nettle_get_secp_384r1,
nettle_get_secp_521r1,
};
@@ -15,24 +15,6 @@ pub trait Curve {
}
}
-/// NIST secp192r1 a.k.a. P-192.
-pub struct Secp192r1;
-
-impl Curve for Secp192r1 {
- unsafe fn get_curve() -> *const ecc_curve {
- nettle_get_secp_192r1()
- }
-}
-
-/// NIST secp224r1 a.k.a. P-224.
-pub struct Secp224r1;
-
-impl Curve for Secp224r1 {
- unsafe fn get_curve() -> *const ecc_curve {
- nettle_get_secp_224r1()
- }
-}
-
/// NIST secp256r1 a.k.a. P-256.
pub struct Secp256r1;
@@ -67,8 +49,6 @@ mod tests {
#[test]
fn curve() {
unsafe {
- assert_eq!(Secp192r1::get_curve(), nettle_get_secp_192r1());
- assert_eq!(Secp224r1::get_curve(), nettle_get_secp_224r1());
assert_eq!(Secp256r1::get_curve(), nettle_get_secp_256r1());
assert_eq!(Secp384r1::get_curve(), nettle_get_secp_384r1());
assert_eq!(Secp521r1::get_curve(), nettle_get_secp_521r1());
@@ -78,8 +58,6 @@ mod tests {
#[test]
fn bit_size() {
unsafe {
- assert_eq!(Secp192r1::bit_size(), 192);
- assert_eq!(Secp224r1::bit_size(), 224);
assert_eq!(Secp256r1::bit_size(), 256);
assert_eq!(Secp384r1::bit_size(), 384);
assert_eq!(Secp521r1::bit_size(), 521);
diff --git a/src/ecc/mod.rs b/src/ecc/mod.rs
index 65a45a1..7102e2e 100644
--- a/src/ecc/mod.rs
+++ b/src/ecc/mod.rs
@@ -5,5 +5,5 @@ pub use self::types::{Point, Scalar};
mod curves;
pub use self::curves::{
- Curve, Secp192r1, Secp224r1, Secp256r1, Secp384r1, Secp521r1,
+ Curve, Secp256r1, Secp384r1, Secp521r1,
};
diff --git a/src/ecc/types.rs b/src/ecc/types.rs
index c684127..c175a67 100644
--- a/src/ecc/types.rs
+++ b/src/ecc/types.rs
@@ -190,20 +190,12 @@ impl Drop for Point {
mod tests {
use super::*;
use crate::random::Yarrow;
- use crate::ecc::{Secp192r1, Secp224r1, Secp256r1, Secp384r1, Secp521r1};
+ use crate::ecc::{Secp256r1, Secp384r1, Secp521r1};
#[test]
fn random_scalar() {
let mut rng = Yarrow::default();
- let sc1 = Scalar::new_random::<Secp192r1, _>(&mut rng).as_bytes();
- let sc2 = Scalar::new_random::<Secp192r1, _>(&mut rng).as_bytes();
- assert!(sc1 != sc2);
-
- let sc1 = Scalar::new_random::<Secp224r1, _>(&mut rng).as_bytes();
- let sc2 = Scalar::new_random::<Secp224r1, _>(&mut rng).as_bytes();
- assert!(sc1 != sc2);
-
let sc1 = Scalar::new_random::<Secp256r1, _>(&mut rng).as_bytes();
let sc2 = Scalar::new_random::<Secp256r1, _>(&mut rng).as_bytes();
assert!(sc1 != sc2);
@@ -216,32 +208,4 @@ mod tests {
let sc2 = Scalar::new_random::<Secp521r1, _>(&mut rng).as_bytes();
assert!(sc1 != sc2);
}
-
- #[test]
- fn clone_scalar() {
- let mut rng = Yarrow::default();
-
- let sc1 = Scalar::new_random::<Secp192r1, _>(&mut rng);
- let sc2 = sc1.clone();
- assert_eq!(sc1.as_bytes(), sc2.as_bytes());
- }
-
- #[test]
- fn clone_point() {
- // From ecdh::tests::nist_p_192 {
- let point1 = Point::new::<Secp192r1>(
- &b"\x42\xea\x6d\xd9\x96\x9d\xd2\xa6\x1f\xea\x1a\xac\x7f\x8e\x98\xed\xcc\x89\x6c\x6e\x55\x85\x7c\xc0"[..],
- &b"\xdf\xbe\x5d\x7c\x61\xfa\xc8\x8b\x11\x81\x1b\xde\x32\x8e\x8a\x0d\x12\xbf\x01\xa9\xd2\x04\xb5\x23"[..]).unwrap();
-
- let point2 = point1.clone();
- assert_eq!(point1.as_bytes(), point2.as_bytes());
- }
-
- #[test]
- #[should_panic]
- fn point_new_not_on_curve() {
- let _ = Point::new::<Secp192r1>(
- &b"\x00\xea\x6d\xd9\x96\x9d\xd2\xa6\x1f\xea\x1a\xac\x7f\x8e\x98\xed\xcc\x89\x6c\x6e\x55\x85\x7c\xc0"[..],
- &b"\xdf\xbe\x5d\x7c\x61\xfa\xc8\x8b\x11\x81\x1b\xde\x32\x8e\x8a\x0d\x12\xbf\x01\xa9\xd2\x04\xb5\x23"[..]).unwrap();
- }
}
diff --git a/src/ecdh.rs b/src/ecdh.rs
index 773e01d..fb70188 100644
--- a/src/ecdh.rs
+++ b/src/ecdh.rs
@@ -48,789 +48,7 @@ pub fn point_mul_g(scalar: &Scalar) -> Point {
#[cfg(test)]
mod tests {
use super::*;
- use crate::ecc::{Secp192r1, Secp224r1, Secp256r1, Secp384r1, Secp521r1};
-
- #[test]
- fn nist_p_192() {
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x42\xea\x6d\xd9\x96\x9d\xd2\xa6\x1f\xea\x1a\xac\x7f\x8e\x98\xed\xcc\x89\x6c\x6e\x55\x85\x7c\xc0"[..],
- &b"\xdf\xbe\x5d\x7c\x61\xfa\xc8\x8b\x11\x81\x1b\xde\x32\x8e\x8a\x0d\x12\xbf\x01\xa9\xd2\x04\xb5\x23"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xf1\x7d\x3f\xea\x36\x7b\x74\xd3\x40\x85\x1c\xa4\x27\x0d\xcb\x24\xc2\x71\xf4\x45\xbe\xd9\xd5\x27"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(
- &b"\xb1\x50\x53\x40\x1f\x57\x28\x56\x37\xec\x32\x4c\x1c\xd2\x13\x9e\x3a\x67\xde\x37\x39\x23\x4b\x37"[..],
- &b"\xf2\x69\xc1\x58\x63\x74\x82\xaa\xd6\x44\xcd\x69\x2d\xd1\xd3\xef\x2c\x8a\x7c\x49\xe3\x89\xf7\xf6"[..]).unwrap();
- let z = &b"\x80\x3d\x8a\xb2\xe5\xb6\xe6\xfc\xa7\x15\x73\x7c\x3a\x82\xf7\xce\x3c\x78\x31\x24\xf6\xd5\x1c\xd0"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\xde\xb5\x71\x2f\xa0\x27\xac\x8d\x2f\x22\xc4\x55\xcc\xb7\x3a\x91\xe1\x7b\x65\x12\xb5\xe0\x30\xe7"[..],
- &b"\x7e\x26\x90\xa0\x2c\xc9\xb2\x87\x08\x43\x1a\x29\xfb\x54\xb8\x7b\x1f\x0c\x14\xe0\x11\xac\x21\x25"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x56\xe8\x53\x34\x9d\x96\xfe\x4c\x44\x24\x48\xda\xcb\x7c\xf9\x2b\xb7\xa9\x5d\xcf\x57\x4a\x9b\xd5"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xc0\x0d\x43\x57\x16\xff\xea\x53\xfd\x8c\x16\x27\x92\x41\x4c\x37\x66\x51\x87\xe5\x82\x71\x65\x39"[..],
- &b"\xab\x71\x1c\x62\xaa\x71\xa5\xa1\x8e\x8a\x3c\x48\xf8\x9d\xc6\xfa\x52\xfa\xc0\x10\x8e\x52\xa8\xa0"[..]).unwrap();
- let z = &b"\xc2\x08\x84\x75\x68\xb9\x88\x35\xd7\x31\x2c\xef\x1f\x97\xf7\xaa\x29\x82\x83\x15\x23\x13\xc2\x9d"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x4e\xda\xa8\xef\xc5\xa0\xf4\x0f\x84\x36\x63\xec\x58\x15\xe7\x76\x2d\xdd\xc0\x08\xe6\x63\xc2\x0f"[..],
- &b"\x0a\x9f\x8d\xc6\x7a\x3e\x60\xef\x6d\x64\xb5\x22\x18\x5d\x03\xdf\x1f\xc0\xad\xfd\x42\x47\x82\x79"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xc6\xef\x61\xfe\x12\xe8\x0b\xf5\x6f\x2d\x3f\x7d\x0b\xb7\x57\x39\x45\x19\x90\x6d\x55\x50\x09\x49"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xe1\x84\xbc\x18\x24\x82\xf3\x40\x3c\x87\x87\xb8\x38\x42\x47\x74\x67\xfc\xd0\x11\xdb\x0f\x6c\x64"[..],
- &b"\xf9\xd1\xc1\x41\x42\xf4\x0d\xe8\x63\x9d\xb9\x7d\x51\xa6\x3d\x2c\xce\x10\x07\xcc\xf7\x73\xcd\xcb"[..]).unwrap();
- let z = &b"\x87\x22\x91\x07\x04\x7a\x3b\x61\x19\x20\xd6\xe3\xb2\xc0\xc8\x9b\xea\x4f\x49\x41\x22\x60\xb8\xdd"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x88\x87\xc2\x76\xed\xee\xd3\xe9\xe8\x66\xb4\x6d\x58\xd8\x95\xc7\x3f\xbd\x80\xb6\x3e\x38\x2e\x88"[..],
- &b"\x04\xc5\x09\x7b\xa6\x64\x5e\x16\x20\x6c\xfb\x70\xf7\x05\x26\x55\x94\x7d\xd4\x4a\x17\xf1\xf9\xd5"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xe6\x74\x7b\x9c\x23\xba\x70\x44\xf3\x8f\xf7\xe6\x2c\x35\xe4\x03\x89\x20\xf5\xa0\x16\x3d\x3c\xda"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x2b\x83\x8d\xbe\x73\x73\x5f\x37\xa3\x9a\x78\xd3\x19\x57\x83\xd2\x69\x91\xe8\x6f\xf4\xd9\x2d\x1a"[..],
- &b"\x60\xd3\x44\x94\x22\x74\x48\x9f\x98\x90\x3b\x2e\x7f\x93\xf8\xd1\x97\xfc\x9a\xe6\x0a\x0e\xd5\x3a"[..]).unwrap();
- let z = &b"\xee\xc0\xbe\xd8\xfc\x55\xe1\xfe\xdd\xc8\x21\x58\xfd\x6d\xc0\xd4\x8a\x4d\x79\x6a\xaf\x47\xd4\x6c"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x0d\x04\x5f\x30\x25\x4a\xdc\x1f\xce\xfa\x8a\x5b\x1f\x31\xbf\x4e\x73\x9d\xd3\x27\xcd\x18\xd5\x94"[..],
- &b"\x54\x2c\x31\x4e\x41\x42\x7c\x08\x27\x8a\x08\xce\x8d\x73\x05\xf3\xb5\xb8\x49\xc7\x2d\x8a\xff\x73"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xbe\xab\xed\xd0\x15\x4a\x1a\xfc\xfc\x85\xd5\x21\x81\xc1\x0f\x5e\xb4\x7a\xdc\x51\xf6\x55\x04\x7d"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x1f\x65\xcf\x6e\x89\x78\xe1\xc1\xbc\x10\xbb\x61\xa7\xdb\x31\x1d\xe3\x10\x08\x8c\x8c\xf9\x76\x8b"[..],
- &b"\xf7\xd4\x38\x16\x8e\x7f\x42\xab\x14\xb1\x6a\xf5\x3a\x7a\x2f\x64\x6f\xf4\x0b\x53\xd7\x4c\xbc\xc7"[..]).unwrap();
- let z = &b"\x71\x6e\x74\x3b\x1b\x37\xa2\xcd\x84\x79\xf0\xa3\xd5\xa7\x4c\x10\xba\x25\x99\xbe\x18\xd7\xe2\xf4"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\xfb\x35\xca\x20\xd2\xe9\x66\x65\xc5\x1b\x98\xe8\xf6\xeb\x3d\x79\x11\x35\x08\xd8\xbc\xcd\x45\x16"[..],
- &b"\x36\x8e\xec\x0d\x5b\xfb\x84\x77\x21\xdf\x6a\xaf\xf0\xe5\xd4\x8c\x44\x4f\x74\xbf\x9c\xd8\xa5\xa7"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xcf\x70\x35\x42\x26\x66\x73\x21\xd6\xe2\xba\xf4\x09\x99\xe2\xfd\x74\xc7\xa0\xf7\x93\xfa\x86\x99"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x5f\x48\x44\xff\xcc\xe6\x10\x05\xd2\x4f\x73\x7d\xb9\x86\x75\xe9\x2f\x7b\x65\x43\xae\xb6\x10\x6c"[..],
- &b"\x54\x24\xf5\x98\x13\x92\x15\xd3\x89\xb6\xb1\x2b\x86\xd5\x80\x14\x85\x7f\x2d\xda\xdb\x54\x0f\x51"[..]).unwrap();
- let z = &b"\xf6\x70\x53\xb9\x34\x45\x99\x85\xa3\x15\xcb\x01\x7b\xf0\x30\x28\x91\x79\x8d\x45\xd0\xe1\x95\x08"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x82\x47\x52\x96\x0c\x13\x07\xe5\xf1\x3a\x83\xda\x21\xc7\x99\x8c\xa8\xb5\xb0\x0b\x95\x49\xf6\xd0"[..],
- &b"\xbc\x52\xd9\x1e\x23\x43\x63\xbc\x32\xee\x0b\x67\x78\xf2\x5c\xd8\xc1\x84\x75\x10\xf4\x34\x8b\x94"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xfe\x94\x25\x15\x23\x7f\xff\xdd\x7b\x4e\xb5\xc6\x49\x09\xee\xe4\x85\x6a\x07\x6c\xdf\x12\xba\xe2"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xe6\x36\x9d\xf7\x9b\x20\x7b\x8b\x86\x79\xf7\xc8\x69\xcf\xc2\x64\x85\x9d\x1a\xb5\x5a\xa4\x01\xe8"[..],
- &b"\x1f\x99\xc7\x1f\x80\x1a\x30\xb5\x2f\x74\xda\x6e\x5e\x6d\xbb\x62\xee\x4c\x5d\xa1\x09\x0c\xc0\x20"[..]).unwrap();
- let z = &b"\x75\x82\x29\x71\x19\x3e\xdd\x47\x2b\xf3\x01\x51\xa7\x82\x61\x9c\x55\xad\x0b\x27\x9c\x93\x03\xdd"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x10\xbb\x57\x02\x02\x91\x14\x19\x81\xf8\x33\xb4\x74\x9e\x56\x11\x03\x4b\x30\x8e\x84\x01\x1d\x21"[..],
- &b"\xe1\xca\xcd\x6b\x7b\xd1\x7e\xd8\xdd\xb5\x0b\x6a\xee\x06\x54\xc3\x5f\x2d\x0e\xdd\xc1\xcf\xfc\xf6"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x33\xfe\xd1\x04\x92\xaf\xa5\xbe\xa0\x33\x3c\x0a\xf1\x2c\xac\x94\x0c\x4d\x22\x24\x55\xbc\xd0\xfe"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xef\x0b\x28\xaf\xc4\x16\x37\xd7\x37\xf4\x2e\x4c\x8a\xac\xea\xdc\x84\xba\x2e\x0b\x84\x9c\xa1\x8c"[..],
- &b"\x57\x79\x79\x42\xe5\x52\x17\x3b\xba\x17\xf7\x32\x78\xe0\x29\xf4\x23\x35\x06\x8b\xd7\x70\xdd\xf2"[..]).unwrap();
- let z = &b"\x67\xcb\xa2\xcb\xb6\x9e\xe7\x8b\xf1\xab\xaf\xb0\xe6\xfb\xe3\x3f\xa2\x09\x4c\x12\x8d\x59\x65\x2d"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x51\x92\xfc\xe4\x18\x5a\x77\x58\xea\x1b\xc5\x6e\x0e\x4f\x4e\x8b\x2d\xce\x32\x34\x8d\x0d\xce\xd1"[..],
- &b"\x20\x98\x99\x81\xbe\xaa\xf0\x00\x6d\x88\xa9\x6e\x79\x71\xa2\xfa\x3a\x33\xba\x46\x04\x7f\xc7\xba"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xf3\x55\x7c\x5d\x70\xb4\xc7\x95\x49\x60\xc3\x35\x68\x77\x6a\xdb\xe8\xe4\x36\x19\xab\xe2\x6b\x13"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xd7\x01\x12\xc5\xf0\xf0\x84\x43\x86\x49\x4a\xc1\xad\x99\xdc\xe2\x21\x41\x34\x17\x6e\xbf\xb9\xaf"[..],
- &b"\xd3\xc1\x87\xa0\x38\x51\x0a\xb3\x1d\x45\x9e\x2b\x7a\xf1\xa3\x80\xdd\x75\x76\xaf\x06\x26\x75\x48"[..]).unwrap();
- let z = &b"\xcf\x99\xa2\x77\x0a\x38\x6c\xa0\x13\x7d\x1e\xca\x0a\x22\x6e\x48\x42\x97\xac\x3c\x51\x3f\x36\x31"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x26\xd0\x19\xdb\xe2\x79\xea\xd0\x1e\xed\x14\x3a\x91\x60\x1a\xda\x26\xe2\xf4\x22\x25\xb1\xc6\x2b"[..],
- &b"\x6c\xa6\x53\xf0\x82\x72\xe0\x38\x6f\xc9\x42\x1f\xbd\x58\x00\x93\xd7\xae\x63\x01\xbc\xa9\x44\x76"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x58\x6c\xfb\xa1\xc6\xe8\x17\x66\xed\x52\x82\x8f\x17\x7b\x1b\xe1\x4e\xbb\xc5\xb8\x33\x48\xc3\x11"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x58\xb3\xc6\x3e\x56\xbe\xc9\xd6\x96\xbf\x9a\x88\xdf\x28\x73\x73\x83\x91\xf7\x63\x68\xaa\x2b\x49"[..],
- &b"\x57\x76\x77\x3b\x26\x1f\xaf\x7b\xa2\xfd\xc4\xfe\x43\xb9\x2c\x0b\x1c\x7a\x2f\xd0\x54\xa4\x36\x50"[..]).unwrap();
- let z = &b"\x57\x63\x31\xe2\xb4\xfb\x38\xa1\x12\x81\x0e\x15\x29\x83\x4d\xe8\x30\x7f\xb0\xa0\xd2\x75\x68\x77"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x53\x9b\xc4\x0f\xe2\x0a\x0f\xb2\x67\x88\x8b\x64\x7b\x03\xea\xaf\x6e\xc2\x0c\x02\xa1\xe1\xf8\xc8"[..],
- &b"\x69\x09\x5e\x5b\xb7\xb4\xd4\x4c\x32\x78\xa7\xee\x6b\xec\xa3\x97\xc4\x52\x46\xda\x9a\x34\xc8\xbe"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xca\xd8\x10\x06\x03\xa4\xf6\x5b\xe0\x8d\x8f\xc8\xa1\xb7\xe8\x84\xc5\xff\x65\xde\xb3\xc9\x6d\x99"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xb7\xfc\xc0\xf5\x2c\x7a\x41\x1e\xdb\xed\x39\xe1\x0b\xf0\x2b\x6a\xe0\xf2\x66\x14\xc6\xb3\x25\xa2"[..],
- &b"\x47\x48\x3b\x26\xeb\x67\x77\x6d\xe2\xb9\x3a\xb7\x11\x9d\x54\x47\x57\x37\x39\xe3\xd5\x5e\x72\xfb"[..]).unwrap();
- let z = &b"\x90\x2f\x45\x01\x91\x6a\x0d\xd9\x45\x55\x4c\x3a\x37\xb3\xd7\x80\xd3\x75\xa6\xda\x71\x31\x97\xc4"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x5d\x34\x3d\xdb\x96\x31\x8f\xb4\x79\x4d\x10\xf6\xc5\x73\xf9\x9f\xee\x5d\x0d\x57\xb9\x96\x25\x0f"[..],
- &b"\x99\xfb\xdf\x9d\x97\xdd\x88\xad\x41\x02\x35\xda\xc3\x6e\x5b\x92\xce\x28\x24\xb8\xe5\x87\xa8\x2c"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x1e\xdd\x87\x9c\xc5\xc7\x96\x19\xca\xe6\xc7\x3a\x69\x1b\xd5\xa0\x39\x5c\x0e\xf3\xb3\x56\xfc\xd2"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x6c\xe6\xad\xb2\xc3\x08\x08\xf5\x90\x04\x8c\x33\xdf\xfa\xd4\x52\x4e\xbf\x7a\x5f\xd3\x9b\x74\x7b"[..],
- &b"\x49\x66\xbd\x2f\x3d\x00\x56\x9b\x4d\x4c\x04\x09\xfb\xd7\xa2\xdb\x75\x2f\x6d\x09\xbc\xa8\xc2\x5f"[..]).unwrap();
- let z = &b"\x46\xe4\xde\x33\x50\x54\xd4\x29\x86\x32\x18\xae\x33\x63\x6f\xc9\xb8\x9c\x62\x8b\x64\xb5\x06\xc7"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x8d\x3d\xb9\xbd\xce\x13\x7f\xfb\xfb\x89\x13\x88\xc3\x7d\xf6\xc0\xcb\xc9\x0a\xa5\xe5\x37\x62\x20"[..],
- &b"\x13\x5d\x30\xb5\xcb\x66\x0e\xef\x87\x64\xff\xc7\x44\xf1\x5c\x1b\x5d\x6d\xc0\x6b\xa4\x41\x6d\x37"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x46\x0e\x45\x22\x73\xfe\x18\x27\x60\x21\x87\xad\x3b\xeb\xee\x65\xcb\x84\x42\x3b\xb4\xf4\x75\x37"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xd1\xbd\x3a\x3e\xfa\xbf\x47\x67\xfe\x63\x80\xbd\xf0\xdb\xf4\x9d\x52\xd4\xcf\x0c\xbb\x89\x40\x4c"[..],
- &b"\xc1\x50\xc2\xb4\xc8\xb3\xaa\x35\xf7\x65\xf8\x47\xe4\xf7\xf8\xfd\x87\x04\xd2\x41\xa1\x81\xee\x99"[..]).unwrap();
- let z = &b"\x1b\xfe\x9e\x5a\x20\xac\x7a\x38\xd8\xf6\x05\xb4\x25\xbb\x90\x30\xbe\x31\xef\x97\xc1\x01\xc7\x6c"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x9e\x0a\x69\x49\x51\x9c\x7f\x5b\xe6\x8c\x04\x33\xc5\xfd\xf1\x30\x64\xaa\x13\xfb\x29\x48\x3d\xc3"[..],
- &b"\xe1\xc8\xba\x63\xe1\xf4\x71\xdb\x23\x18\x5f\x50\xd9\xc8\x71\xed\xea\x21\x25\x5b\x3a\x63\xb4\xb7"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xb9\x70\x36\x50\x08\x45\x6f\x87\x58\xec\xc5\xa3\xb3\x3c\xf3\xae\x6a\x8d\x56\x81\x07\xa5\x21\x67"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xc1\xb8\x61\x0c\x8c\x63\xf8\xd4\xab\xda\x09\x3b\x9a\x11\xa5\x66\x04\x4b\xf6\x5c\x6f\xaa\x89\x99"[..],
- &b"\xa5\xbc\x4b\x3c\xa0\x95\x38\x2e\x97\x38\xae\xe9\x5f\xe9\x47\x9b\x17\x87\x9b\x3a\xd5\x29\x55\x59"[..]).unwrap();
- let z = &b"\x0e\x8c\x49\x3a\x4a\xdc\x44\x5d\xc9\x28\x8a\x3b\x9b\x27\x25\x99\x22\x40\x54\x59\x2d\x72\x65\xb3"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\xbe\x08\x82\x38\x90\x2e\x99\x39\xb3\xd0\x54\xee\xeb\x84\x92\xda\xf4\xbd\xcf\x09\xa2\xab\x77\xf1"[..],
- &b"\x58\xd6\x74\x9a\x3a\x92\x3d\xc8\x04\x40\xf2\x66\x1f\xd3\x5b\x65\x16\x17\xe6\x52\x94\xb4\x63\x75"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x59\xc1\x5b\x8a\x24\x64\xe4\x1d\xfe\x43\x71\xc7\xf7\xda\xdf\x47\x0a\xe4\x25\x54\x4f\x81\x13\xbd"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x1f\xe7\x76\xf7\x35\x67\xb6\xac\x0b\x0d\x67\x64\x16\x4d\xe6\xc5\xbe\x75\x1b\xa8\xd1\xff\x45\x5e"[..],
- &b"\x4c\x16\x0b\xf3\x8a\xfb\x2b\x71\xf6\x84\x26\x16\x64\x11\x5c\xe8\x74\x55\x3e\x8b\x05\x94\x32\xd2"[..]).unwrap();
- let z = &b"\x0f\x19\x91\x08\x6b\x45\x5d\xed\x6a\x1c\x41\x46\xf7\xbf\x59\xfe\x9b\x49\x5d\xe5\x66\xeb\xc6\xbf"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\xbf\x5a\xe0\x50\x25\xe1\xbe\x61\x7e\x66\x6d\x87\xa4\x16\x83\x63\x87\x3d\x57\x61\xb3\x76\xb5\x03"[..],
- &b"\xe1\xe6\xe3\x8b\x37\x2b\x6b\xee\x0f\xf5\xb3\x50\x2d\x83\x73\x5e\x3b\x2c\x26\x82\x5e\x4f\x0f\xcc"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xa6\xe9\xb8\x85\xc6\x6b\x95\x9d\x1f\xc2\x70\x8d\x59\x1b\x6d\x32\x28\xe4\x9e\xb9\x8f\x72\x6d\x61"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x63\x2b\xb7\x65\x1d\xbf\x49\xdd\xe9\xdd\x12\x5d\x13\xfb\x23\x4e\x06\x61\x77\x23\xbe\xed\x3d\x1b"[..],
- &b"\xf4\xad\x52\x09\x63\x84\x88\x39\x7c\x5f\x44\xf9\x94\xdd\x74\x79\x80\x7e\x79\xf4\x88\x7d\x2e\x71"[..]).unwrap();
- let z = &b"\xb3\x0f\x21\x27\xc3\x4d\xf3\x5a\xaa\x91\xdb\xf0\xbb\xe1\x57\x98\xe7\x99\xa0\x3e\xd1\x16\x98\xc1"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x6c\xc4\xfe\xed\x84\xc7\xab\x0d\x09\x00\x5d\x66\x0e\xd3\x4d\xe6\x95\x5a\x94\x61\xc4\x13\x8d\x11"[..],
- &b"\x31\x22\x5f\x33\x86\x4e\xd4\x8d\xa0\x6f\xa4\x5a\x91\x3b\x46\xcf\x42\x55\x77\x42\xe3\x50\x85\xe6"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xbd\xb7\x54\x09\x6f\xfb\xfb\xd8\xb0\xf3\xcb\x04\x6c\xcb\x7c\xa1\x49\xc4\xe7\x19\x20\x67\xa3\xee"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xd9\xc0\x98\xd4\x21\xd7\x41\xf6\xfa\xab\x11\x6f\x3e\x47\x31\xd2\x8c\x55\x58\xe1\x9f\xe1\x12\xa1"[..],
- &b"\x38\xd4\xdc\x48\xcc\xdb\x1d\x3e\xd8\xd3\x1f\xd0\x67\x84\xa4\xf8\x7a\x68\xae\xc1\xcb\xd5\xb0\x8f"[..]).unwrap();
- let z = &b"\x64\xa5\xc2\x46\x59\x9d\x3e\x81\x77\xa2\x40\x2a\x11\x10\xeb\x81\xe6\xc4\x56\xab\x4e\xdb\x51\x27"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x36\x15\x73\x15\xbe\xe7\xaf\xed\xde\xd5\x8c\x4e\x8b\xa1\x4d\x34\x21\xc4\x01\xe5\x11\x35\xbc\xc9"[..],
- &b"\x37\xc2\x97\xca\x70\x3f\x77\xc5\x2b\xb0\x62\xd8\xce\x97\x1d\xb8\x40\x97\xba\x0c\x75\x3a\x41\x8f"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xd5\xbc\xf2\x53\x4d\xaf\xc3\xd9\x99\x64\xc7\xbd\x63\xab\x7b\xd1\x59\x99\xfe\x56\xdd\x96\x9c\x42"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xfd\xa1\xd5\xd2\x8d\x6f\xe0\xe7\x90\x9d\x6a\x8b\xaf\xa7\x82\x4d\xb5\x57\x2a\xb9\x2f\xfe\x7d\xe6"[..],
- &b"\x13\x4a\x29\x7c\x1d\x9c\x8b\xba\xb2\x49\xab\xac\xd9\x51\xed\x11\xe5\xa9\x9f\x92\xe7\x99\x15\x72"[..]).unwrap();
- let z = &b"\x01\x7b\x8c\xa5\x3c\x82\xfa\xb1\x63\xda\x2a\xb7\x83\x96\x6a\x39\xe0\x61\xb3\x2c\x8c\xfa\x33\x4d"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x98\x46\x4d\x47\xf0\x25\x6f\x82\x92\xe0\x27\xe8\xc9\x25\x82\xea\x77\xcf\x90\x51\xf5\xce\x8e\x5d"[..],
- &b"\x44\x95\x52\xef\x75\x78\xbe\x96\x23\x6f\xe5\xed\x9d\x06\x43\xc0\xbb\x6c\x5a\x91\x34\xb0\x10\x8d"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x43\xd4\xb9\xdf\x10\x53\xbe\x5b\x42\x68\x10\x4c\x02\x24\x4d\x3b\xf9\x59\x4b\x01\x0b\x46\xa8\xb2"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xc3\x02\x0b\x70\x91\x46\x3d\x78\x8f\x1f\x1d\x76\xf7\xcf\xee\xc8\x2e\xcd\xb3\xb7\xd9\x9c\x34\x5c"[..],
- &b"\x9a\x77\x10\xd5\x17\x95\x91\xd8\xf3\xdf\x0a\xa1\x22\x30\x17\x68\xae\x7d\xb7\xee\xe2\xd7\xf5\x83"[..]).unwrap();
- let z = &b"\x34\x0e\xf3\xdb\x3d\xbe\xbd\xd9\x1c\x62\xc3\xd4\xe1\xa3\xda\x2c\x7c\x52\xa3\x33\x8b\x86\x52\x59"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x56\x3e\xb6\x6c\x33\x4c\xf6\xf1\x23\xbf\x04\xc7\x80\x3b\x48\xa3\x11\x02\x14\x23\x7e\x98\x3b\xf5"[..],
- &b"\x0f\x35\x11\x04\x81\x91\x99\xef\x07\xc9\xa6\x05\x1d\x20\x75\x8f\x3a\xf7\x90\x27\xea\x66\xa5\x3f"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x94\xca\xc2\xc2\xca\x71\x47\x46\x40\x16\x70\xd9\x4e\xdb\xf3\xf6\x77\x86\x7b\x5a\x03\xbe\xe7\xad"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xb1\x85\x54\xa2\xe7\x43\xef\x0a\xa2\xf0\x40\x98\x7c\x4c\x45\x10\x04\xe0\x96\xdf\x3d\x80\xdd\xae"[..],
- &b"\x6e\x3e\x2c\x61\x8f\x89\x6e\x36\xba\x62\x00\x77\x68\x4b\x70\xa0\x5f\xfb\x79\xbf\x5e\x6c\x76\x40"[..]).unwrap();
- let z = &b"\x21\x62\x14\x49\x21\xdf\x51\x03\xd0\xe6\xa6\x50\xfb\x13\xfd\x24\x6f\x47\x38\xd0\x89\x6c\xe9\x2f"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x86\x82\x8c\x4a\xc9\x2b\x55\x07\x61\x8a\xec\x78\x73\xa1\xd4\xfc\x65\x43\xc5\xbe\x33\xcf\x30\x78"[..],
- &b"\xb2\x2c\xa7\x24\x37\x54\x5e\x10\xd6\xd4\xf0\x52\x42\x2e\xb8\x98\xb7\x37\xa4\xb8\x54\x3e\xe5\x50"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x2a\x3a\x9e\x33\xc8\xcc\x31\x07\xa9\xf9\x26\x5c\x3b\xde\xa1\x20\x65\x70\xe8\x6f\x92\xac\x70\x14"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xa7\xba\x38\xbe\x1b\xc6\x69\xdd\x23\xcc\xfc\xee\x06\x45\xb1\xf0\xdb\x8c\xf9\x42\xde\xaf\xae\xb6"[..],
- &b"\xb8\x2d\xb7\x9d\x80\xcd\x0e\x37\xf2\x8d\x41\x63\xad\xc3\x89\xde\xe8\xfc\x77\x97\xb5\xc9\x83\x1b"[..]).unwrap();
- let z = &b"\x4c\x69\xe7\xfe\xed\x4b\x11\x15\x9a\xdf\xc1\x6a\x60\x47\xa9\x25\x72\xea\x44\xe0\x74\x0b\x23\xaf"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x67\x00\xa1\x02\x43\x77\x81\xa9\x58\x1d\xa2\xbc\x25\xce\xd5\xab\xf4\x19\xda\x91\xd3\xc8\x03\xdf"[..],
- &b"\x71\x39\x6c\x9c\xf0\x8b\xcd\x91\x85\x4e\x3e\x6e\x42\xd8\xc6\x57\xce\x0f\x27\xab\x77\xa9\xdc\x4b"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x4a\x6b\x78\xa9\x8a\xc9\x8f\xa8\xe9\x9a\x8e\xce\x08\xec\x02\x51\x12\x5f\x85\xc6\xfd\x0e\x28\x9b"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xe7\x69\xdb\xbc\xd5\xce\x2d\x83\x51\x4b\x76\x8d\x3d\x2d\x5a\xa0\xbc\xd8\xf6\x6a\xf1\x5f\x55\x00"[..],
- &b"\x2f\xc6\xd0\xb0\x39\xe0\xf2\x8f\x74\xfb\xef\xfe\x9e\x88\x3d\x4d\xd7\x22\x96\xe4\xe9\x5c\xae\x71"[..]).unwrap();
- let z = &b"\x46\x07\x2a\xce\xfd\x67\xbf\xf5\x0d\xe3\x55\xca\x7a\x31\xfa\x6b\xe5\x9f\x26\xe4\x67\x58\x72\x59"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\xa8\x2f\x35\x4c\xf9\x7b\xee\x5d\x22\xdc\x6c\x07\x9f\x29\x02\xea\xd4\x4d\x96\xa8\xf6\x14\xf1\x78"[..],
- &b"\xa6\x54\xa9\xaa\x8a\x1a\x08\x02\xf2\xce\x0e\xe8\xa0\xf4\xeb\xe9\x6d\xee\x1b\x37\x46\x4b\x1f\xf2"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\xc5\xa6\x49\x1d\x78\x84\x4d\x66\x17\xef\x33\xbe\x6b\x8b\xd5\x4d\xa2\x21\x45\x08\x85\xd5\x95\x0f"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xdb\x1b\x24\xf7\x46\x6b\xc1\x54\xe9\xd7\xd2\xc3\xca\x52\xdc\xfe\x0b\xfc\x95\x63\xc5\xfd\xb6\xf3"[..],
- &b"\x1c\x74\xfb\xbf\x5b\xd9\x99\x21\xf1\xa9\xa7\x44\xf8\xe1\xcf\x77\x0b\xd6\xa7\x6a\x77\x2b\x30\x03"[..]).unwrap();
- let z = &b"\xec\x55\x80\xea\xbc\xa9\xf3\x38\x9d\x2b\x42\x7d\xdf\x6e\x49\xe2\x6d\x62\x9a\xfd\x03\xfa\x76\x6e"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x3c\xec\x21\xb2\x86\x68\xa1\x2a\x2c\xf7\x8e\x1a\x8e\x55\xd0\xef\xe0\x65\x15\x2f\xff\xc3\x47\x18"[..],
- &b"\x10\x29\x55\x7b\xeb\xa4\xff\x19\x92\xbd\x21\xc2\x3c\xb4\x82\x5f\x6d\xae\x70\xe3\x31\x8f\xd1\xca"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x2b\xa2\x70\x3c\x5e\x23\xf6\x46\x3c\x5b\x88\xdc\x37\x29\x2f\xab\xd3\x39\x9b\x5e\x1f\xb6\x7c\x05"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\x75\x43\x14\x89\x06\xce\xf9\xb3\x7a\x71\xa7\xc0\x83\x63\xcd\xd3\xbb\xa5\x01\x42\xd6\x52\x41\xaa"[..],
- &b"\x8b\x3a\x69\x73\xde\x8d\xc2\x71\xe2\x7c\x1e\xad\x1e\x96\x2f\xda\xae\x37\x10\xc7\x24\xda\xac\x38"[..]).unwrap();
- let z = &b"\x7f\x39\x29\xdd\x3c\xbf\x76\x73\xbc\x30\xd8\x59\xd9\x0b\x88\x03\x07\x47\x5f\x80\x06\x60\xea\x32"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp192r1>(
- &b"\x70\x82\x64\x47\x15\xb8\xb7\x31\xf8\x22\x8b\x51\x18\xe7\x27\x0d\x34\xd1\x81\xf3\x61\xa2\x21\xfc"[..],
- &b"\x46\x46\x49\xd6\xc8\x8c\xa8\x96\x14\x48\x8a\x1c\xc7\xb8\x44\x2b\xb4\x2f\x9f\xb3\x02\x0a\x3d\x76"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp192r1>(&b"\x83\x61\x18\xc6\x24\x8f\x88\x2e\x91\x47\x97\x6f\x76\x48\x26\xc1\xa2\x87\x55\xa6\x10\x29\x77\xd5"[..]).unwrap();
- let iut_pub = Point::new::<Secp192r1>(&b"\xfc\xd3\x45\xa9\x76\xc7\x20\xca\xaa\x97\xde\x66\x97\x22\x68\x25\x61\x5e\x12\x87\xa9\xef\xf6\x7e"[..],
- &b"\x58\xea\x42\xed\xbe\xea\xfc\xa9\xff\x44\xcf\xd7\xf2\x9a\xbd\x2c\xbd\xe7\x62\x6d\x79\xe4\x22\xc9"[..]).unwrap();
- let z = &b"\x72\xe8\x8f\x3e\xa6\x7d\x46\xd4\x6d\xbf\x83\x92\x6e\x7e\x2a\x6b\x85\xb5\x45\x36\x74\x1e\x6d\x2c"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
- }
-
- #[test]
- fn nist_p_224() {
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\xaf\x33\xcd\x06\x29\xbc\x7e\x99\x63\x20\xa3\xf4\x03\x68\xf7\x4d\xe8\x70\x4f\xa3\x7b\x8f\xab\x69\xab\xaa\xe2\x80"[..],
- &b"\x88\x20\x92\xcc\xbb\xa7\x93\x0f\x41\x9a\x8a\x4f\x9b\xb1\x69\x78\xbb\xc3\x83\x87\x29\x99\x25\x59\xa6\xf2\xe2\xd7"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x83\x46\xa6\x0f\xc6\xf2\x93\xca\x5a\x0d\x2a\xf6\x8b\xa7\x1d\x1d\xd3\x89\xe5\xe4\x08\x37\x94\x2d\xf3\xe4\x3c\xbd"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x8d\xe2\xe2\x6a\xdf\x72\xc5\x82\xd6\x56\x8e\xf6\x38\xc4\xfd\x59\xb1\x8d\xa1\x71\xbd\xf5\x01\xf1\xd9\x29\xe0\x48"[..],
- &b"\x4a\x68\xa1\xc2\xb0\xfb\x22\x93\x0d\x12\x05\x55\xc1\xec\xe5\x0e\xa9\x8d\xea\x84\x07\xf7\x1b\xe3\x6e\xfa\xc0\xde"[..]).unwrap();
- let z = &b"\x7d\x96\xf9\xa3\xbd\x3c\x05\xcf\x5c\xc3\x7f\xeb\x8b\x9d\x52\x09\xd5\xc2\x59\x74\x64\xde\xc3\xe9\x98\x37\x43\xe8"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x13\xbf\xcd\x4f\x8e\x94\x42\x39\x3c\xab\x8f\xb4\x6b\x9f\x05\x66\xc2\x26\xb2\x2b\x37\x07\x69\x76\xf0\x61\x7a\x46"[..],
- &b"\xee\xb2\x42\x75\x29\xb2\x88\xc6\x3c\x2f\x89\x63\xc1\xe4\x73\xdf\x2f\xca\x6c\xaa\x90\xd5\x2e\x2f\x8d\xb5\x6d\xd4"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x04\x3c\xb2\x16\xf4\xb7\x2c\xdf\x76\x29\xd6\x37\x20\xa5\x4a\xee\x0c\x99\xeb\x32\xd7\x44\x77\xda\xc0\xc2\xf7\x3d"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x2f\x90\xf5\xc8\xea\xc9\xc7\xde\xcd\xbb\x97\xb6\xc2\xf7\x15\xab\x72\x5e\x4f\xe4\x0f\xe6\xd7\x46\xef\xbf\x4e\x1b"[..],
- &b"\x66\x89\x73\x51\x45\x4f\x92\x7a\x30\x9b\x26\x9c\x5a\x6d\x31\x33\x8b\xe4\xc1\x9a\x5a\xcf\xc3\x2c\xf6\x56\xf4\x5c"[..]).unwrap();
- let z = &b"\xee\x93\xce\x06\xb8\x9f\xf7\x20\x09\xe8\x58\xc6\x8e\xb7\x08\xe7\xbc\x79\xee\x03\x00\xf7\x3b\xed\x69\xbb\xca\x09"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x75\x6d\xd8\x06\xb9\xd9\xc3\x4d\x89\x96\x91\xec\xb4\x5b\x77\x1a\xf4\x68\xec\x00\x44\x86\xa0\xfd\xd2\x83\x41\x1e"[..],
- &b"\x4d\x02\xc2\xca\x61\x7b\xb2\xc5\xd9\x61\x3f\x25\xdd\x72\x41\x3d\x22\x9f\xd2\x90\x15\x13\xaa\x29\x50\x4e\xee\xfb"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x5a\xd0\xdd\x6d\xba\xbb\x4f\x3c\x2e\xa5\xfe\x32\xe5\x61\xb2\xca\x55\x08\x14\x86\xdf\x2c\x7c\x15\xc9\x62\x2b\x08"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x5b\xca\x45\xd7\x93\xe7\xfe\x99\xa8\x43\x70\x4e\xd8\x38\x31\x5a\xb1\x4a\x5f\x62\x77\x50\x7e\x9b\xc3\x75\x31"[..],
- &b"\x43\xe9\xd4\x21\xe1\x48\x6a\xe5\x89\x3b\xfd\x23\xc2\x10\xe5\xc1\x40\xd7\xc6\xb1\xad\xa5\x9d\x84\x2c\x9a\x98\xde"[..]).unwrap();
- let z = &b"\x3f\xcc\x01\xe3\x4d\x44\x49\xda\x2a\x97\x4b\x23\xfc\x36\xf9\x56\x67\x54\x25\x9d\x39\x14\x97\x90\xcf\xa1\xeb\xd3"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x0f\x53\x7b\xf1\xc1\x12\x2c\x55\x65\x6d\x25\xe8\xaa\x84\x17\xe0\xb4\x4b\x15\x26\xae\x05\x23\x14\x4f\x99\x21\xc4"[..],
- &b"\xf7\x9b\x26\xd3\x0e\x49\x1a\x77\x36\x96\xcc\x2c\x79\xb4\xf0\x59\x6b\xc5\xb9\xee\xba\xf3\x94\xd1\x62\xfb\x86\x84"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x0a\xa6\xff\x55\xa5\xd8\x20\xef\xcb\x4e\x7d\x10\xb8\x45\xea\x3c\x9f\x9b\xc5\xdf\xf8\x61\x06\xdb\x85\x31\x8e\x22"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x2f\x96\x75\x41\x31\xe0\x96\x81\x98\xaa\x78\xfb\xe8\xc2\x01\xdc\x5f\x35\x81\xc7\x92\xde\x48\x73\x40\xd3\x24\x48"[..],
- &b"\x61\xe8\xa5\xcd\x79\x61\x52\x03\xb6\xd8\x9e\x94\x96\xf9\xe2\x36\xfe\x3b\x6b\xe8\x73\x1e\x74\x3d\x61\x55\x19\xc6"[..]).unwrap();
- let z = &b"\x49\x12\x96\x28\xb2\x3a\xfc\xef\x48\x13\x9a\x3f\x6f\x59\xff\x5e\x98\x11\xaa\x74\x6a\xa4\xff\x33\xc2\x4b\xb9\x40"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x2b\x36\x31\xd2\xb0\x61\x79\xb3\x17\x4a\x10\x0f\x7f\x57\x13\x1e\xee\xa8\x94\x7b\xe0\x78\x6c\x3d\xc6\x4b\x22\x39"[..],
- &b"\x83\xde\x29\xae\x3d\xad\x31\xad\xc0\x23\x6c\x6d\xe7\xf1\x45\x61\xca\x2e\xa0\x83\xc5\x27\x0c\x78\xa2\xe6\xcb\xc0"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xef\xe6\xe6\xe2\x5a\xff\xaf\x54\xc9\x8d\x00\x2a\xbb\xc6\x32\x8d\xa1\x59\x40\x5a\x1b\x75\x2e\x32\xdc\x23\x95\x0a"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x35\x5e\x96\x29\x20\xbd\xe0\x43\x69\x5f\x6b\xff\xb4\xb3\x55\xc6\x3d\xa6\xf5\xde\x66\x5e\xd4\x6f\x2e\xc8\x17\xe2"[..],
- &b"\x74\x8e\x09\x53\x68\xf6\x2e\x1d\x36\x4e\xdd\x46\x17\x19\x79\x3b\x40\x4a\xdb\xda\xac\xbc\xad\xd8\x89\x22\xff\x37"[..]).unwrap();
- let z = &b"\xfc\xdc\x69\xa4\x05\x01\xd3\x08\xa6\x83\x96\x53\xa8\xf0\x43\x09\xec\x00\x23\x39\x49\x52\x29\x02\xff\xa5\xea\xc6"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x45\x11\x40\x3d\xe2\x90\x59\xf6\x9a\x47\x5c\x5a\x6a\x5f\x6c\xab\xed\x5d\x9f\x01\x44\x36\xa8\xcb\x70\xa0\x23\x38"[..],
- &b"\x7d\x2d\x1b\x62\xaa\x04\x6d\xf9\x34\x0f\x9c\x37\xa0\x87\xa0\x6b\x32\xcf\x7f\x08\xa2\x23\xf9\x92\x81\x2a\x82\x8b"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x61\xcb\x29\x32\x52\x40\x01\xe5\xe9\xee\xed\x6d\xf7\xd9\xc8\x93\x5e\xe3\x32\x20\x29\xed\xd7\xaa\x8a\xcb\xfd\x51"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xd5\x0e\x4a\xda\xbf\xd9\x89\xd7\xdb\xc7\xcf\x40\x52\x54\x6c\xc7\xc4\x47\xa9\x76\x30\x43\x69\x97\xad\x4b\x95\x36"[..],
- &b"\x5b\xea\x50\x34\x73\xc5\xea\xef\x95\x52\xd4\x2c\x40\xb1\xf2\xf7\xca\x29\x27\x33\xb2\x55\xb9\xbb\xe1\xb1\x23\x37"[..]).unwrap();
- let z = &b"\x82\x7e\x90\x25\xcb\x62\xe0\xe8\x37\xc5\x96\x06\x3f\x3b\x9b\x5a\x0f\x7a\xfd\x8d\x87\x83\x20\x00\x86\xd6\x1e\xc1"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x31\x4a\x0b\x26\xdd\x31\xc2\x48\x84\x5d\x7c\xc1\x7b\x61\xca\xd4\x60\x82\x59\xbe\xd8\x5a\x58\xd1\xf1\xff\xd3\x78"[..],
- &b"\x66\xe4\xb3\x50\x35\x2e\x11\x9e\xec\xad\xa3\x82\x90\x7f\x36\x19\xfd\x74\x8e\xa7\x3a\xe4\x89\x9d\xfd\x49\x63\x02"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x8c\x7a\xce\x34\x71\x71\xf9\x2d\xef\x98\xd8\x45\x47\x5f\xc8\x2e\x1d\x14\x96\xda\x81\xee\x58\xf5\x05\xb9\x85\xfa"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xb1\xa8\xdc\xac\x89\xac\xa2\x79\x93\x20\xb4\x51\xdf\x1c\x7f\xf4\xd9\x75\x67\xab\xb6\x81\x41\xc0\xd9\x5f\xc2\xaa"[..],
- &b"\x35\x24\x95\x09\x02\xb1\x51\x0b\xdc\x98\x7d\x86\x0a\xfc\x27\xad\x87\x1c\xea\xea\x66\x93\x5a\xbd\x3c\x0a\x99\xa8"[..]).unwrap();
- let z = &b"\x33\x5b\xa5\x12\x28\xd9\x4a\xcb\xed\x85\x1c\xa7\x82\x1c\x80\x1d\x5c\xb1\xc7\x97\x5d\x7a\xa9\x0a\x71\x59\xf8\xfa"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\xab\xe6\x84\x3b\xee\xc2\xfd\x9e\x5f\xb6\x47\x30\xd0\xbe\x4d\x16\x54\x38\xce\x92\x2e\xd7\x5d\xd8\x0b\x46\x03\xe5"[..],
- &b"\x6a\xfe\x86\x73\xa9\x6c\x4b\xa9\x90\x0a\xd8\x59\x95\xe6\x31\xe4\x36\xc6\xcc\x88\xa2\xc2\xb4\x7b\x7c\x48\x86\xb8"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x38\x2f\xeb\x9b\x9b\xa1\x0f\x18\x9d\x99\xe7\x1a\x89\xcd\xfe\x44\xcb\x55\x4c\xec\x13\xa2\x12\x84\x09\x77\xfb\x68"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xab\xb6\xf1\xe3\x77\x3f\xf8\xfc\x73\xae\xa2\xa0\xb1\x07\x80\x9c\xe7\x0a\xdc\xef\xed\x6e\x41\xfc\x5c\xb4\x30\x45"[..],
- &b"\xa9\x63\x89\x7a\xe9\x06\xc1\x0a\x05\x5e\xea\xdb\x97\xff\xdd\x6f\x74\x8d\x3e\x56\x21\xe5\xff\xf3\x04\xe4\x8b\xa7"[..]).unwrap();
- let z = &b"\x8c\x2e\x62\x75\x94\x20\x6b\x34\xf7\x35\x6d\x34\x26\xeb\x3d\x79\xf5\x18\xef\x84\x3f\xbe\x94\x01\x4c\xce\xac\xe3"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x13\xcf\x9d\x6d\x2c\x9a\xae\x82\x74\xc2\x7d\x44\x6a\xfd\x0c\x88\x8f\xfd\xd5\x2a\xe2\x99\xa3\x59\x84\xd4\xf5\x27"[..],
- &b"\xdc\xbe\xe7\x5b\x51\x57\x51\xf8\xee\x2a\xe3\x55\xe8\xaf\xd5\xde\x21\xc6\x2a\x93\x9a\x65\x07\xb5\x38\xcb\xc4\xaf"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xe0\xd6\x20\x35\x10\x1e\xf4\x87\xc4\x85\xc6\x0f\xb4\x50\x0e\xeb\xe6\xa3\x2e\xc6\x4d\xbe\x97\xdb\xe0\x23\x2c\x46"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x88\x53\x77\x35\xe9\xb2\x3e\x3e\x0e\x07\x6f\x13\x5a\x82\xd3\x3f\x9b\xff\xb4\x65\xf3\xab\xce\x83\x22\xa6\x2a\x62"[..],
- &b"\xb4\xc8\xc1\x23\x67\x31\x97\x87\x5c\x0b\xd1\x4e\xd0\x97\x60\x6d\x33\x0f\xba\x2b\x92\x00\xef\x65\xa4\x47\x64\xd3"[..]).unwrap();
- let z = &b"\x63\x2a\xbb\x66\x27\x28\xdb\xc9\x94\x50\x88\x73\xd5\xc5\x27\xca\x5e\xf9\x23\xc0\xd3\x1f\xa6\xc4\x7e\xf4\xc8\x25"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x96\x5b\x63\x7c\x0d\xfb\xc0\xcf\x95\x40\x35\x68\x6d\x70\xf7\xec\x30\x92\x9e\x66\x4e\x52\x1d\xba\xa2\x28\x06\x59"[..],
- &b"\x82\xa5\x8f\xf6\x1b\xc9\x00\x19\xbb\xcb\xb5\x87\x5d\x38\x63\xdb\x0b\xc2\xa1\xfa\x34\xb0\xad\x4d\xe1\xa8\x3f\x99"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xb9\x6a\xde\x5b\x73\xba\x72\xaa\x8b\x6e\x4d\x74\xd7\xbf\x9c\x58\xe9\x62\xff\x78\xeb\x54\x22\x87\xc7\xb4\x4b\xa2"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x37\x68\x29\x26\xa5\x4f\x70\xa4\xc1\x74\x8f\x54\xd5\x0d\x5b\x00\x13\x8a\x05\x5f\x92\x4f\x2c\x65\xe5\xb0\xbb\xe4"[..],
- &b"\x59\x6a\xfe\xfc\xdd\x64\x0d\x29\x63\x50\x15\xb8\x9b\xdd\xdd\x1f\x8c\x27\x23\x68\x6d\x33\x2e\x7a\x06\xca\x87\x99"[..]).unwrap();
- let z = &b"\x34\x64\x11\x41\xaa\xb0\x5e\xf5\x8b\xd3\x76\xd6\x09\x34\x59\x01\xfb\x8f\x63\x47\x7c\x6b\xe9\x09\x7f\x03\x7f\x1f"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x73\xcc\x64\x53\x72\xca\x2e\x71\x63\x7c\xda\x94\x3d\x81\x48\xf3\x38\x2a\xb6\xdd\x0f\x2e\x1a\x49\xda\x94\xe1\x34"[..],
- &b"\xdf\x5c\x35\x5c\x23\xe6\xe2\x32\xeb\xc3\xbe\xe2\xab\x18\x73\xee\x0d\x83\xe3\x38\x2f\x8e\x6f\xe6\x13\xf6\x34\x3c"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xa4\x0d\x7e\x12\x04\x9c\x71\xe6\x52\x2c\x7f\xf2\x38\x42\x24\x06\x1c\x3a\x45\x70\x58\xb3\x10\x55\x76\x55\xb8\x54"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x39\x98\x01\x24\x3b\xfe\x0c\x2d\xa9\xb0\xa5\x3c\x8c\xa5\x7f\x2e\xee\x87\xaa\xa9\x4a\x8e\x4d\x5e\x02\x9f\x42\xca"[..],
- &b"\xaa\x49\xe6\xd4\xb4\x7c\xee\x7a\x5c\x4a\xb7\x1d\x5a\x67\xda\x84\xe0\xb9\xb4\x25\xce\x3e\x70\xda\x68\xc8\x89\xe7"[..]).unwrap();
- let z = &b"\x4f\x74\xac\x85\x07\x50\x1a\x32\xbf\xc5\xa7\x8d\x82\x71\xc2\x00\xe8\x35\x96\x6e\x18\x7e\x8d\x00\x01\x1a\x8c\x75"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x54\x65\x78\x21\x62\x50\x35\x4e\x44\x9e\x21\x54\x6d\xd1\x1c\xd1\xc5\x17\x42\x36\x73\x9a\xca\xd9\xce\x0f\x45\x12"[..],
- &b"\xd2\xa2\x2f\xcd\x66\xd1\xab\xed\xc7\x67\x66\x83\x27\xc5\xcb\x9c\x59\x90\x43\x27\x62\x39\xcf\x3c\x85\x16\xaf\x24"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xad\x25\x19\xbc\x72\x4d\x48\x4e\x02\xa6\x9f\x05\x14\x9b\xb0\x47\x71\x4b\xf0\xf5\x98\x6f\xac\x2e\x22\x2c\xd9\x46"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xdf\x9c\x1e\x0e\xf1\x5e\x53\xb9\xf6\x26\xe2\xbe\x1c\xbe\x89\x36\x39\xc0\x6f\x3e\x04\x39\xee\x95\xd7\xd4\xb1\xe3"[..],
- &b"\x7a\x52\xa7\x38\x6a\xdd\xa2\x43\xef\xdf\x89\x41\x08\x5c\x84\xe3\x12\x39\xca\xb9\x2b\x80\x17\x33\x67\x48\x96\x5e"[..]).unwrap();
- let z = &b"\xad\x09\xc9\xae\x4d\x23\x24\xea\x81\xbb\x55\x5b\x20\x0d\x3c\x00\x3e\x22\xa6\x87\x0e\xe0\x3b\x52\xdf\x49\xe4\xde"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x1d\x46\xb1\xdc\x3a\x28\x12\x3c\xb5\x13\x46\xe6\x7b\xae\xc5\x64\x04\x86\x86\x78\xfa\xf7\xd0\xe8\xb2\xaf\xa2\x2a"[..],
- &b"\x0e\xc9\xe6\x5e\xc9\x7e\x21\x83\x73\xe7\xfc\x11\x5c\x22\x74\xd5\xb8\x29\xa6\x0d\x93\xf7\x1e\x01\xd5\x81\x36\xc3"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x3d\x31\x2a\x9b\x9d\x8e\xd0\x91\x40\x90\x0b\xba\xc1\xe0\x95\x52\x7e\xbc\x9e\x3c\x64\x93\xbc\xf3\x66\x6e\x3a\x29"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xb4\xa0\x19\x8d\xc8\x81\x0e\x88\x44\x25\xb7\x50\x92\x8b\x0c\x96\x0c\x31\xf7\xa9\x96\x63\x40\x0b\x01\xa1\x79\xdf"[..],
- &b"\x81\x2b\x60\x1b\xfc\x07\x38\x24\x2c\x6f\x86\xf8\x30\xf2\x7a\xcd\x63\x2c\xa6\x18\xa0\xb5\x28\x0c\x9d\x57\x69\xf7"[..]).unwrap();
- let z = &b"\xef\x02\x9c\x28\xc6\x80\x64\xb8\xab\xd2\x96\x5a\x38\xc4\x04\xfb\x5e\x94\x4a\xce\x57\xe8\x63\x8d\xab\xa9\xd3\xcd"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x26\x6d\x03\x8c\xc7\xa4\xfe\x21\xf6\xc9\x76\x31\x8e\x82\x7b\x82\xbb\x5b\x8f\x74\x43\xa5\x52\x98\x13\x65\x06\xe0"[..],
- &b"\xdf\x12\x3d\x98\xa7\xa2\x0b\xbd\xf3\x94\x3d\xf2\xe3\x56\x34\x22\xf8\xc0\xcf\x74\xd5\x3a\xaa\xbd\xd7\xc9\x73\xba"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x8c\xe0\x82\x2d\xc2\x4c\x15\x39\x95\x75\x5a\xc3\x50\x73\x7e\xf5\x06\x64\x1c\x7d\x75\x2b\x4f\x93\x00\xc6\x12\xed"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xdf\xc7\xec\x13\x76\x90\xcd\x6d\x12\xfd\xb2\xfd\x0b\x8c\x53\x14\x58\x21\x08\x76\x9c\x2b\x72\x2f\xfb\x39\x58"[..],
- &b"\x5e\xef\x3d\xa4\xba\x45\x81\x27\x34\x6b\xb6\x40\x23\x86\x8b\xdd\xb7\x55\x8a\x2e\xcf\xc8\x13\x64\x5f\x4c\xe9\xfe"[..]).unwrap();
- let z = &b"\xf8\x3c\x16\x66\x1d\xfc\xba\xd0\x21\xcc\x3b\x5a\x5a\xf5\x1d\x9a\x18\xdb\x46\x53\x86\x6b\x3f\xf9\x07\x87\xce\x3e"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\xeb\x0a\x09\xf7\xa1\xc2\x36\xa6\x1f\x59\x58\x09\xec\x56\x70\xef\xd9\x2e\x45\x98\xd5\xe6\x13\xe0\x92\xcd\xfd\xca"[..],
- &b"\x50\x78\x7a\xe2\xf2\xf1\x5b\x88\xbc\x10\xf7\xb5\xf0\xae\xe1\x41\x83\x73\xf1\x61\x53\xae\xbd\x1f\xba\x54\x28\x8d"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x0f\xf9\xb4\x85\x32\x5a\xb7\x7f\x29\xe7\xbc\x37\x9f\xed\x74\xbf\xac\x85\x94\x82\xda\x0d\xee\x75\x28\xc1\x9d\xb2"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x7e\x60\x3e\x69\x76\xdb\x83\xc3\x60\x11\x50\x8f\xa6\x95\xd1\xb5\x15\x24\x9e\x2e\x54\xb4\x8f\xcb\xcf\xb9\x02\x47"[..],
- &b"\x01\x79\xa6\x00\xce\x86\xad\xfc\xa9\xb1\xb9\x31\xfa\x51\x73\xd6\x18\xda\x09\xe8\x41\x80\x3d\x19\xb0\x26\x42\x86"[..]).unwrap();
- let z = &b"\xf5\x12\x58\xc6\x3f\x23\x2e\x55\xa6\x6a\xa2\x5e\xbd\x59\x7b\x20\x18\xd1\x05\x2c\x02\xee\xb6\x38\x66\x75\x80\x05"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x6b\x2f\x6b\x18\xa5\x87\xf5\x62\xff\xc6\x1b\xd9\xb0\x04\x73\x22\x28\x69\x86\xa7\x8f\x1f\xd1\x39\xb8\x4f\x7c\x24"[..],
- &b"\x70\x96\x90\x8e\x46\x15\x26\x6b\xe5\x9a\x53\xcd\x65\x55\x15\x05\x6f\xf9\x23\x70\xa6\x27\x1a\x5d\x38\x23\xd7\x04"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x19\xcf\x5f\xf6\x30\x64\x67\xf2\x8b\x9f\xe0\x67\x5a\x43\xc0\x58\x25\x52\xc8\xc1\x2e\x59\xce\x7c\x38\xf2\x92\xb1"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xfc\x20\xe9\x06\xe6\x09\xc1\x12\xcf\xc2\xe0\xfe\xa6\x30\x38\x82\xc5\xdb\x94\xe8\x7e\x02\x23\x73\xab\x2c\x08\x2a"[..],
- &b"\xae\xcd\xf1\xda\xa7\x17\x82\xbc\x5a\x26\xbb\xbd\x8d\x7e\x8a\x76\x49\x0e\x26\xab\xc1\x7d\xff\xc7\x74\xbd\x73\x41"[..]).unwrap();
- let z = &b"\x7f\xdc\x96\x9a\x18\x6f\xf1\x84\x29\xf2\xa2\x76\xda\xc4\x3b\xee\xa2\x11\x82\xd8\x2c\xe2\xe5\xa0\x87\x65\x52\xb1"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x32\x81\x01\xba\x82\x6a\xcd\x75\xff\x9f\x34\xd5\x57\x4c\xe0\xdb\xc9\x2f\x70\x9b\xad\x8d\x7a\x33\xc4\x79\x40\xc1"[..],
- &b"\xdf\x39\xf1\xea\x88\x48\x8c\x55\xd5\x53\x81\x60\x87\x8b\x9c\xed\x18\xa8\x87\xea\x26\x1d\xd7\x12\xd1\x40\x24\xff"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x90\xa1\x53\x68\xe3\x53\x2c\x0b\x1e\x51\xe5\x5d\x13\x94\x47\xc2\xc8\x9b\xc1\x60\x71\x9d\x69\x72\x91\xea\x7c\x14"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xc6\x83\x7d\x50\x6e\x97\x6d\xa7\xdb\x3a\xd1\x26\x7c\x35\x9d\xff\x2e\xa6\xfb\x0b\x7f\x7f\x8e\x77\x02\x4c\x59\xe9"[..],
- &b"\x67\xeb\x49\x1d\x2f\xc8\xa5\x30\xc4\x65\x25\xd2\xa8\xb2\xd7\xc1\xdf\x5f\xba\x1a\xe7\x40\xa4\x64\x9c\x68\x3e\xe6"[..]).unwrap();
- let z = &b"\x3d\x60\xab\x6d\xb2\xb3\xff\xe2\xd2\x9c\xcf\xf4\x6d\x05\x6e\x54\x23\x0c\xf3\x49\x82\xe2\x41\x55\x6e\xd2\x92\x0c"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x81\xe3\x42\x70\x87\x1e\x2e\xbb\xd9\x41\x83\xf6\x17\xb4\xae\x15\xf0\x41\x6d\xd6\x34\xfe\x6e\x93\x4c\xf3\xc0"[..],
- &b"\x3a\x1e\x9f\x38\xa7\xb9\x0b\x73\x17\xd2\x6b\x9f\x63\x11\x06\x3a\xb5\x8b\x26\x8c\xf4\x89\xb2\xe5\x03\x86\xd5\xd6"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x8e\x08\x38\xe0\x5e\x17\x21\x49\x10\x67\xe1\xca\xbc\x2e\x80\x51\xb2\x90\xe2\x61\x6e\xec\x42\x7b\x71\x21\x89\x7d"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xe9\x15\x0f\x77\x00\x75\x62\x60\x19\xe1\x8f\x95\x47\x3b\x71\xe6\x82\x80\x41\x79\x1d\x3f\x08\xd3\xfa\xee\xaa\x2b"[..],
- &b"\x47\x5f\x70\x73\x5e\xaa\xe5\x23\x08\xa3\xb7\x63\xdc\x88\xef\xe1\x8a\xb5\x90\xeb\xaf\xa0\x35\xf6\xe0\x8b\x00\x1c"[..]).unwrap();
- let z = &b"\x91\x16\xd7\x27\x86\xf4\xdb\x5d\xf7\xa8\xb4\x30\x78\xc6\xab\x91\x60\xd4\x23\x51\x3d\x35\xea\x5e\x25\x59\x30\x6d"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x26\x23\x63\x2f\xdf\x0b\xd8\x56\x80\x5a\x69\xaa\x18\x6d\x41\x33\xef\x59\x04\xe1\xf6\x55\xa9\x72\xd6\x6c\xce\x07"[..],
- &b"\x2c\xef\x97\x28\xdd\x06\xfb\x8b\x50\x15\x0f\x52\x9b\x69\x50\x76\xd4\x50\x79\x83\x91\x25\x85\xc8\x9b\xd0\x68\x2e"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x38\x10\x6e\x93\xf1\x6a\x38\x1a\xdb\x1d\x72\xce\xe3\xda\x66\xae\x46\x2a\xd4\xbb\xfe\xa9\xec\xdf\x35\xd0\x81\x4e"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x7b\xe6\xc4\xc9\x17\x82\x9a\xb6\x57\xdd\x79\xe8\x63\x7d\x7a\xef\xd2\xf8\x1f\x0d\xe7\x65\x4d\x95\x7e\x97\x65\x8d"[..],
- &b"\x43\x0d\x22\xd9\xe8\x43\x83\x10\xf6\x1e\x0d\x43\xf2\x5f\xa3\xe3\x45\x85\xf4\x32\xba\xad\x27\xdb\x30\x21\xbf\x0d"[..]).unwrap();
- let z = &b"\x20\x7c\x53\xdc\xef\xac\x78\x9a\xaa\x02\x76\xd9\x20\x0b\x3a\x94\x0c\xe5\xf2\x29\x6f\x4c\xb2\xe8\x1a\x18\x5d\x3d"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x8e\xe4\xd1\xdc\xc3\x1d\xee\x4b\xf6\xfe\x21\xca\x8a\x58\x77\x21\xd9\x10\xac\xfb\x12\x2c\x16\xc2\xa7\x7a\x81\x52"[..],
- &b"\x4e\xbf\x32\x3f\xff\x04\xeb\x47\x70\x69\xa0\xac\x68\xb3\x45\xf6\xb1\xae\x13\x4e\xfc\x31\x94\x0e\x51\x3c\xb9\x9f"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xe5\xd1\x71\x84\x31\xcf\x50\xf6\xcb\xd1\xbc\x80\x19\xfa\x16\x76\x2d\xfa\x12\xc9\x89\xe5\x99\x99\x77\xfb\x4e\xa2"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x2e\xa4\x96\x6e\x7f\x92\xed\x7f\x5c\xc6\x1f\xde\x79\x20\x45\xf6\x3b\x73\x1d\x6e\x7d\x0d\xe2\x57\x7f\x2d\x8e\xce"[..],
- &b"\x1c\x4a\x7b\x1e\xde\x6f\x83\x91\x62\x29\x2d\xf4\x24\xbe\x78\xe8\x17\x6f\xb6\xf9\x42\xa3\xc0\x23\x91\x70\x0f\x31"[..]).unwrap();
- let z = &b"\x10\xe4\x67\xda\x34\xf4\x8a\xd7\x07\x20\x05\xbc\xcd\x6d\xa1\xb2\xba\x3f\x71\xea\xfa\x1c\x39\x38\x42\xf9\x1d\x74"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x97\xdc\xbe\x6d\x28\x33\x58\x82\xa6\xd1\x93\xcc\x54\xa1\x06\x3d\xd0\x77\x5d\xc3\x28\x56\x53\x00\xbb\x99\xe6\x91"[..],
- &b"\xda\xd1\x1d\xd5\xec\xe8\xcf\xd9\xf9\x7c\x9a\x52\x6e\x4a\x15\x06\xe6\x35\x59\x69\xee\x87\x82\x6f\xc3\x8b\xcd\x24"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x3d\x63\x56\x91\xb6\x2a\x9a\x92\x7c\x63\x39\x51\xc9\x36\x9c\x88\x62\xbd\x21\x19\xd3\x09\x70\xc2\x64\x47\x27\xd6"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x43\x8b\xbb\x98\x05\x17\xaf\xb2\x0b\xe1\xd6\x74\xe3\xac\x2b\x31\xce\xf0\x7a\x9b\x23\xfb\x8f\x6e\x38\xe0\xd6\xc0"[..],
- &b"\x0b\xe5\xf1\xc4\x7d\x58\xd2\x1b\x6e\xd2\x84\x23\xb3\x2f\x5a\x94\x75\x0d\xa4\x7e\xdc\xef\x33\xea\x79\x94\x2a\xfd"[..]).unwrap();
- let z = &b"\x82\xfd\x2f\x9c\x60\xc4\xf9\x99\xac\x00\xbb\xe6\x4b\xfc\x11\xda\x8f\xf8\xcd\xa2\xe4\x99\xfc\xed\x65\x23\x0b\xb1"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\xce\x91\x26\xdd\x53\x97\x2d\xea\x1d\xe1\xd1\x1e\xfe\xf9\x00\xde\x34\xb6\x61\x85\x9c\x46\x48\xc5\xc0\xe5\x34\xf7"[..],
- &b"\xe1\x13\xb6\xf2\xc1\x65\x9d\x07\xf2\x71\x6e\x64\xa8\x3c\x18\xbb\xce\x34\x4d\xd2\x12\x1f\xe8\x51\x68\xea\xe0\x85"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xac\xf3\xc8\x5b\xbd\xc3\x79\xf0\x2f\x5e\xa3\x6e\x7f\x0f\x53\x09\x5a\x9e\x70\x46\xa2\x86\x85\xa8\x65\x9b\xf7\x98"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xff\x75\x11\x21\x5c\x71\xd7\x96\xbd\x64\x6e\x84\x74\xbe\x44\x16\xb9\x16\x84\xce\x0d\x26\x9e\xf6\xf4\x22\x01\x3b"[..],
- &b"\xb7\xbf\x5e\x79\xb5\xa9\x39\x3b\xb9\xea\x42\xc0\xbd\xb2\xd3\xc2\xdc\x80\x6e\x1a\x73\x06\xaa\x58\xe4\xfd\xbe\xa5"[..]).unwrap();
- let z = &b"\x53\x0f\x7e\x7f\xc9\x32\x61\x3b\x29\xc9\x81\xf2\x61\xcb\x03\x6c\xba\x3f\x1d\xf3\x86\x4e\x0e\x1c\xba\x26\x85\xa2"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x84\x41\x99\x67\xd6\xcf\xad\x41\xe7\x5a\x02\xb6\xda\x60\x5a\x97\x94\x9a\x18\x3a\x97\xc3\x06\xc4\xb4\x6e\x66\xa5"[..],
- &b"\x5c\xc9\xb2\x59\x71\x8b\x1b\xc8\xb1\x44\xfd\xe6\x33\xa8\x94\x61\x6f\xfd\x59\xa3\xa6\xd5\xd8\xe9\x42\xc7\xcb\xb7"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xcf\xfd\x62\xcb\x00\xa0\xe3\x16\x3f\xbf\x2c\x39\x7f\xad\xc9\x61\x82\x10\xf8\x6b\x4f\x54\xa6\x75\x28\x73\x05\xf0"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x04\xbf\x4d\x94\x8f\x44\x30\xd1\x8b\x4e\xd6\xc9\x6d\xba\xf9\x81\xfa\x11\xa4\x03\xed\x16\x88\x7f\x06\x75\x49\x81"[..],
- &b"\x7c\x13\x26\xa9\xce\xf5\x1f\x79\xd4\xe7\x83\x03\xd6\x06\x4b\x45\x9f\x61\x25\x84\xac\x2f\xdf\x59\x3d\x7d\x5d\x84"[..]).unwrap();
- let z = &b"\x49\xf6\xfd\x01\x39\x24\x8e\xf4\xdf\x2d\xb0\x5d\x13\x19\xbd\x5b\x14\x89\xe2\x49\x82\x7a\x45\xa8\xa5\xf1\x24\x27"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x7c\x9c\xac\x35\x76\x80\x63\xc2\x82\x7f\x60\xa7\xf5\x13\x88\xf2\xa8\xf4\xb7\xf8\xcd\x73\x6b\xd6\xbc\x33\x74\x77"[..],
- &b"\x29\xee\x6b\x84\x9c\x60\x25\xd5\x77\xdb\xcc\x55\xfb\xd1\x70\x18\xf4\xed\xbc\x2e\xf1\x05\xb0\x04\xd6\x25\x7b\xcd"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\x85\xf9\x03\xe4\x39\x43\xd1\x3c\x68\x93\x2e\x71\x0e\x80\xde\x52\xcb\xc0\xb8\xf1\xa1\x41\x8e\xa4\xda\x07\x92\x99"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\x97\x0a\x4a\x7e\x01\xd4\x18\x84\x97\xce\xb4\x69\x55\xeb\x1b\x84\x2d\x90\x85\x81\x9a\x9b\x92\x5c\x84\x52\x9d\x3d"[..],
- &b"\xdf\xa2\x52\x64\x80\xf8\x33\xea\x0e\xdb\xd2\x04\xe4\xe3\x65\xfe\xf3\x47\x28\x88\xfe\x7d\x96\x91\xc3\xeb\xc0\x9f"[..]).unwrap();
- let z = &b"\x8f\x7e\x34\xe5\x97\xae\x80\x93\xb9\x82\x70\xa7\x4a\x8d\xfc\xdb\xed\x45\x7f\x42\xf4\x3d\xf4\x87\xc5\x48\x71\x61"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
-
- {
- let cav_pub = Point::new::<Secp224r1>(&b"\x08\x5a\x76\x42\xad\x8e\x59\xb1\xa3\xe8\x72\x6a\x75\x47\xaf\xbe\xcf\xfd\xac\x1d\xab\x7e\x57\x23\x0c\x6a\x9d\xf4"[..],
- &b"\xf9\x1c\x36\xd8\x81\xfe\x9b\x80\x47\xa3\x53\x07\x13\x55\x4a\x1a\xf4\xc2\x5c\x5a\x8e\x65\x4d\xcd\xcf\x68\x9f\x2e"[..]).unwrap();
- let iut_priv = Scalar::new::<Secp224r1>(&b"\xcc\xe6\x48\x91\xa3\xd0\x12\x9f\xee\x0d\x4a\x96\xcf\xbe\x7a\xc4\x70\xb8\x5e\x96\x75\x29\x05\x7c\xfa\x31\xa1\xd9"[..]).unwrap();
- let iut_pub = Point::new::<Secp224r1>(&b"\xa6\xb2\x96\x32\xdb\x94\xda\x21\x25\xdc\x1c\xf8\x0e\x03\x70\x26\x87\xb2\xac\xc1\x12\x20\x22\xfa\x21\x74\x76\x5a"[..],
- &b"\x61\x72\x3e\xdd\x73\xe1\x0d\xae\xd7\x37\x75\x27\x8f\x19\x58\xba\x56\xf1\xfc\x9d\x08\x5e\xbc\x2b\x64\xc8\x4f\xe5"[..]).unwrap();
- let z = &b"\x71\x95\x4e\x22\x61\xe8\x51\x0b\xe1\xa0\x60\x73\x36\x71\xd2\xe9\xd0\xa2\xd0\x12\xeb\x4e\x09\x55\x6d\x69\x7d\x2a"[..];
-
- let got_pub = point_mul_g(&iut_priv);
- assert_eq!(got_pub.as_bytes(), iut_pub.as_bytes());
-
- let got_z = point_mul(&iut_priv, &cav_pub).unwrap();
- assert_eq!(&got_z.as_bytes().0[..], z);
- }
- }
+ use crate::ecc::{Secp256r1, Secp384r1, Secp521r1};
#[test]
fn nist_p_256() {
diff --git a/src/ecdsa/keys.rs b/src/ecdsa/keys.rs
index 955a764..3002ebd 100644
--- a/src/ecdsa/keys.rs
+++ b/src/ecdsa/keys.rs
@@ -33,33 +33,3 @@ pub fn generate_keypair<C: Curve, R: Random>(
Ok((point, scalar))
}
}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use crate::ecdsa::{sign, verify};
- use crate::{ecc::Secp192r1, random::Yarrow};
-
- #[test]
- fn gen_keys() {
- let mut rand = Yarrow::default();
-
- for _ in 0..3 {
- let _ = generate_keypair::<Secp192r1, _>(&mut rand).unwrap();
- }
- }
-
- #[test]
- fn clone() {
- let mut rand = Yarrow::default();
- let (public, private) =
- generate_keypair::<Secp192r1, _>(&mut rand).unwrap();
- let mut msg = [0u8; 160];
-
- rand.random(&mut msg);
- let sig = sign(&private, &msg, &mut rand);
- let sig = sig.clone();
-
- assert!(verify(&public, &msg, &sig));
- }
-}
diff --git a/src/ecdsa/sign.rs b/src/ecdsa/sign.rs
index 6479ea5..b1e8571 100644
--- a/src/ecdsa/sign.rs
+++ b/src/ecdsa/sign.rs
@@ -47,180 +47,3 @@ pub fn verify(
) == 1
}
}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use crate::ecdsa::generate_keypair;
- use crate::{ecc::Secp192r1, random::Yarrow};
-
- #[test]
- fn sign_verify() {
- let mut rand = Yarrow::default();
- let (public, private) =
- generate_keypair::<Secp192r1, _>(&mut rand).unwrap();
-
- for _ in 0..3 {
- let mut msg = [0u8; 160];
-
- rand.random(&mut msg);
- let sig = sign(&private, &msg, &mut rand);
-
- assert!(verify(&public, &msg, &sig));
- }
-
- for _ in 0..3 {
- let mut msg = [0u8; 160];
-
- rand.random(&mut msg);
- let sig = sign(&private, &msg, &mut rand);
- rand.random(&mut msg);
-
- assert!(!verify(&public, &msg, &sig));
- }
- }
-
- #[test]
- fn fips_186_4() {
- use crate::hash::*;
- use crate::ecc::*;
-
- fn test<C, H>(msg: &[u8], x: &[u8], y: &[u8], r: &[u8], s: &[u8])
- where
- C: Curve,
- H: Default + Hash,
- {
- use crate::dsa::Signature;
- use crate::ecc::Point;
-
- let mut h = H::default();
- h.update(msg);
- let mut d = vec![0; h.digest_size()];
- h.digest(&mut d);
-
- let key = Point::new::<C>(x, y).unwrap();
- let sig = Signature::new(r, s);
- assert!(verify(&key, &d, &sig));
-
- // Sanity check: Change the digest and retry.
- d[0] ^= 1;
- assert!(! verify(&key, &d, &sig));
- }
-
- test::<Secp224r1, Sha224>(
- b"\xe5\xc9\x79\xf0\x83\x22\x42\xb1\x43\x07\x7b\xce\x6e\xf1\x46\xa5\x3b\xb4\xc5\x3a\xbf\xc0\x33\x47\x3c\x59\xf3\xc4\x09\x5a\x68\xb7\xa5\x04\xb6\x09\xf2\xab\x16\x3b\x5f\x88\xf3\x74\xf0\xf3\xbf\xf8\x76\x22\x78\xb1\xf1\xc3\x73\x23\xb9\xed\x44\x8e\x3d\xe3\x3e\x64\x43\x79\x6a\x9e\xca\xa4\x66\xaa\x75\x17\x53\x75\x41\x81\x86\xc3\x52\x01\x8a\x57\xce\x87\x4e\x44\xae\x72\x40\x1d\x5c\x0f\x40\x1b\x5a\x51\x80\x47\x24\xc1\x06\x53\xfd\xed\x90\x66\xe8\x99\x4d\x36\xa1\x37\xfd\xeb\x93\x64\x60\x1d\xae\xef\x09\xfd\x17\x4d\xde\x4a",
- b"\x6d\xd8\x4f\x4d\x66\xf3\x62\x84\x4e\x41\xa7\x91\x3c\x40\xb4\xaa\xd5\xfa\x9b\xa5\x6b\xb4\x4c\x2d\x2e\xd9\xef\xac",
- b"\x15\xf6\x5e\xbc\xdf\x2f\xd9\xf8\x03\x53\x85\xa3\x30\xbd\xab\xec\x0f\x1c\xd9\xcc\x7b\xc3\x1d\x2f\xad\xbe\x7c\xda",
- b"\x12\x70\x51\xd8\x53\x26\x04\x91\x15\xf3\x07\xaf\x2b\xc4\x26\xf6\xc2\xd0\x8f\x47\x74\xa0\xb4\x96\xfb\x69\x82\xb1",
- b"\x68\x57\xe8\x44\x18\xc1\xd1\x17\x93\x33\xb4\xe5\x30\x7e\x92\xab\xad\xe0\xb7\x4f\x75\x21\xad\x78\x04\x4b\xf5\x97",
- );
- test::<Secp224r1, Sha256>(
- b"\x5d\x8e\xbd\xf9\xeb\x28\xb4\x7b\xda\xfa\xa3\x6b\xf0\xb6\x6a\x9e\xaf\x99\xb6\xc8\x39\x59\xda\x4f\x2b\x11\x51\xb4\xf4\xec\xd2\x8f\xb1\x15\xa6\x4c\x0c\xb9\x49\x10\x93\xa7\xe9\xb9\xc5\x3e\xc4\x23\xe4\xc7\x2e\x77\x65\xbb\x9c\x81\x8d\xa0\xe8\xc4\x28\x66\x7e\x44\x47\x4a\x71\xdb\x48\x67\x13\x0c\x77\xc4\x0b\xfd\x85\x44\xb2\xd7\xb9\xd6\x46\x4d\x2b\x8e\x6a\x48\x48\x21\x53\x25\x6a\x32\x43\x7c\x3a\x74\x72\x31\xf5\x11\x34\xdd\x14\xc7\x03\x40\x7e\x31\x14\x6a\x6f\xcd\xe2\x3b\xed\xed\xcf\x16\x95\x04\x86\xe9\x0c\xa6\x9a\xc0",
- b"\x0d\xc2\xcd\xdd\xb9\x90\x34\x1a\xdb\x1d\xe7\x3f\x02\xd8\x7f\xc3\x82\x24\x85\xa6\x59\xa1\x51\x45\xf4\x25\x1d\x5f",
- b"\xcf\x78\xb2\xa8\x3c\x73\x52\xed\xa1\xaf\x2c\x74\xe1\x80\x4e\xa0\x4b\x35\xf7\x6c\x04\xe8\x9d\x90\x28\x1d\xc2\xbb",
- b"\x82\x98\x2b\x38\xed\x46\x51\x38\xdf\x40\x18\xd7\xcf\xb8\x35\xed\xcb\x59\x1c\xb5\x74\x46\xca\x49\xd1\x63\x78\x2b",
- b"\x8e\xf1\xd7\xb3\x26\xca\xbe\xe7\xf7\xab\x95\xb7\xb9\x8d\x3c\x27\xa0\x69\xc0\xfd\x95\xa1\x59\x9c\x0c\xcb\x42\x2b",
- );
- test::<Secp224r1, Sha384>(
- b"\xfc\xb2\x72\xc8\x28\xfe\x8f\xd3\xc6\xf8\xde\x94\x10\xc7\xb6\xe2\xb3\x67\x17\xc1\xb0\xe5\xe3\x59\xe9\x10\x9b\xd7\xfc\x37\x89\x78\xaa\x98\x18\x2a\x9d\x99\x96\x18\x98\xed\x88\x99\x9b\x05\x0d\x3b\x64\xd1\x45\x7d\x7a\x89\x9d\x6d\x27\x3b\x9f\x4d\xde\x2a\xaf\xa3\x6d\x76\x32\x9d\x62\x50\x90\x43\xc3\x38\xf2\x65\xfc\x4c\x7d\x93\x84\x59\xb7\xfa\x3b\x23\x0a\x9f\x6c\xb6\x32\xb6\x14\x89\x54\x6b\xb4\x18\x1a\x5a\xd7\xf0\xd7\x36\x9b\x8c\xac\xed\x48\xeb\x37\x4b\x07\x5b\x2b\x32\x5b\xc8\x6a\xdd\x0f\x3b\x68\x0c\xd9\xe8\x0a\xcd",
- b"\x38\x58\xa5\x76\xee\xf2\xce\x24\xd0\x17\x66\x99\x7f\xb8\x1b\x3f\x3f\x78\xb6\x10\x4c\xd1\x88\x61\x0b\xe2\x21\xd7",
- b"\x95\xff\xc6\x77\xac\x7b\xfe\x3e\x0b\xb4\xcf\xfb\x17\x35\x5a\x96\x4c\x83\x56\xa8\x07\x15\x1b\x3c\xba\x5d\x1f\x4e",
- b"\x18\xc9\x08\x54\x18\x43\xfc\xda\xc9\x9b\x9f\xf6\xbb\x39\x7f\x3f\x80\x94\xd1\x6b\x42\x67\x02\x16\xe4\xea\xa2\xd7",
- b"\xc1\x07\xa8\xa5\x08\xff\x57\xc5\xd4\xf7\x8f\x86\xcc\x37\xe1\x29\xc8\x64\xd1\xc4\x4e\xd5\xe7\x39\x09\x61\x3b\x74",
- );
- test::<Secp224r1, Sha512>(
- b"\xe6\xcd\xee\x85\x58\xbc\x1e\xac\xc2\x4e\x82\xf0\x62\x4c\xe8\xd0\x2c\xc8\xd9\x25\xb4\xdd\x3d\xec\x3a\x72\xf4\xa4\xe0\xfb\x76\x07\x6b\xfa\x3e\xf2\xe2\xc3\x3b\xdd\x7c\x27\xb3\x22\xbd\xc0\x9b\xbf\xee\x8f\xe4\x6f\x75\xdb\xd7\xbb\xd2\xaf\x09\x69\x0b\x71\x37\x94\x3e\xfe\x21\x70\x6e\x0a\x1b\x6d\x30\x89\x54\x0f\xc5\x8d\x85\xdd\xb5\x5e\xa8\x36\x61\x6d\xb5\x73\xe3\x6c\x52\x1b\xe0\x08\x89\x3f\x40\xa0\xa7\xc3\x49\x60\x2c\xc1\x78\xea\x43\xbe\x59\xd3\x1e\xc6\x44\x9e\x7f\xf2\xc5\x37\x93\x79\xf7\xd7\x64\x51\x34\xdf\x1b\xc3",
- b"\x67\x73\xa0\x43\x6a\x9c\x42\x63\x57\x30\x41\x3b\x19\xaa\x41\x66\xf0\x8c\x69\xc0\xe5\x00\x29\x53\xda\x42\x25\x3b",
- b"\x55\x51\x38\x29\x0b\x09\x3b\xf2\xfe\x79\xac\xda\x91\x31\xd9\x20\xcd\x1e\x7a\xc4\x3f\xb8\x77\x57\x76\xcd\x71\x3c",
- b"\x8e\x92\xcf\x7a\x67\x4a\xa5\xf7\x54\x2d\xd9\x5c\x69\x55\x89\xa0\x57\x47\x43\x16\x92\xed\xd0\x48\x04\x29\x9b\x8f",
- b"\xaf\x49\x08\xb4\x1f\x81\x80\xb7\x1a\x6f\xf1\x0f\xd5\x1f\x3d\x14\x31\x47\xaf\x6d\xdd\xdf\x75\x34\xd3\x28\x4e\xd9",
- );
-
- test::<Secp256r1, Sha224>(
- b"\xfc\x3b\x82\x91\xc1\x72\xda\xe6\x35\xa6\x85\x9f\x52\x5b\xea\xf0\x1c\xf6\x83\x76\x5d\x7c\x86\xf1\xa4\xd7\x68\xdf\x7c\xae\x05\x5f\x63\x9e\xcc\xc0\x8d\x7a\x02\x72\x39\x4d\x94\x9f\x82\xd5\xe1\x2d\x69\xc0\x8e\x24\x83\xe1\x1a\x1d\x28\xa4\xc6\x1f\x18\x19\x31\x06\xe1\x2e\x5d\xe4\xa9\xd0\xb4\xbf\x34\x1e\x2a\xcd\x6b\x71\x5d\xc8\x3a\xe5\xff\x63\x32\x8f\x83\x46\xf3\x55\x21\xca\x37\x8b\x31\x12\x99\x94\x7f\x63\xec\x59\x3a\x5e\x32\xe6\xbd\x11\xec\x4e\xdb\x0e\x75\x30\x2a\x9f\x54\xd2\x12\x26\xd2\x33\x14\x72\x9e\x06\x10\x16",
- b"\xf0\x4e\x9f\x28\x31\xd9\x69\x7a\xe1\x46\xc7\xd4\x55\x2e\x5f\x91\x08\x5c\xc4\x67\x78\x40\x0b\x75\xb7\x6f\x00\x20\x52\x52\x94\x1d",
- b"\xbd\x26\x71\x48\x17\x4c\xd0\xc2\xb0\x19\xcd\x0a\x52\x56\xe2\xf3\xf8\x89\xd1\xe5\x97\x16\x03\x72\xb5\xa1\x33\x9c\x8d\x78\x7f\x10",
- b"\x5d\x95\xc3\x85\xee\xba\x0f\x15\xdb\x0b\x80\xae\x15\x19\x12\x40\x91\x28\xc9\xc8\x0e\x55\x42\x46\x06\x7b\x8f\x6a\x36\xd8\x5e\xa5",
- b"\xdb\x5d\x8a\x1e\x34\x5f\x88\x3e\x4f\xcb\x38\x71\x27\x6f\x17\x0b\x78\x3c\x1a\x1e\x9d\xa6\xb6\x61\x59\x13\x36\x8a\x85\x26\xf1\xc3",
- );
- test::<Secp256r1, Sha256>(
- b"\x21\x18\x8c\x3e\xdd\x5d\xe0\x88\xda\xcc\x10\x76\xb9\xe1\xbc\xec\xd7\x9d\xe1\x00\x3c\x24\x14\xc3\x86\x61\x73\x05\x4d\xc8\x2d\xde\x85\x16\x9b\xaa\x77\x99\x3a\xdb\x20\xc2\x69\xf6\x0a\x52\x26\x11\x18\x28\x57\x8b\xcc\x7c\x29\xe6\xe8\xd2\xda\xe8\x18\x06\x15\x2c\x8b\xa0\xc6\xad\xa1\x98\x6a\x19\x83\xeb\xee\xc1\x47\x3a\x73\xa0\x47\x95\xb6\x31\x9d\x48\x66\x2d\x40\x88\x1c\x17\x23\xa7\x06\xf5\x16\xfe\x75\x30\x0f\x92\x40\x8a\xa1\xdc\x6a\xe4\x28\x8d\x20\x46\xf2\x3c\x1a\xa2\xe5\x4b\x7f\xb6\x44\x8a\x0d\xa9\x22\xbd\x7f\x34",
- b"\x10\x5d\x22\xd9\xc6\x26\x52\x0f\xac\xa1\x3e\x7c\xed\x38\x2d\xcb\xe9\x34\x98\x31\x5f\x00\xcc\x0a\xc3\x9c\x48\x21\xd0\xd7\x37\x37",
- b"\x6c\x47\xf3\xcb\xbf\xa9\x7d\xfc\xeb\xe1\x62\x70\xb8\xc7\xd5\xd3\xa5\x90\x0b\x88\x8c\x42\x52\x0d\x75\x1e\x8f\xaf\x3b\x40\x1e\xf4",
- b"\x54\x2c\x40\xa1\x81\x40\xa6\x26\x6d\x6f\x02\x86\xe2\x4e\x9a\x7b\xad\x76\x50\xe7\x2e\xf0\xe2\x13\x1e\x62\x9c\x07\x6d\x96\x26\x63",
- b"\x4f\x7f\x65\x30\x5e\x24\xa6\xbb\xb5\xcf\xf7\x14\xba\x8f\x5a\x2c\xee\x5b\xdc\x89\xba\x8d\x75\xdc\xbf\x21\x96\x6c\xe3\x8e\xb6\x6f",
- );
- test::<Secp256r1, Sha384>(
- b"\x78\x43\xf1\x57\xef\x85\x66\x72\x2a\x7d\x69\xda\x67\xde\x75\x99\xee\x65\xcb\x39\x75\x50\x8f\x70\xc6\x12\xb3\x28\x91\x90\xe3\x64\x14\x17\x81\xe0\xb8\x32\xf2\xd9\x62\x71\x22\x74\x2f\x4b\x58\x71\xce\xea\xfc\xd0\x9b\xa5\xec\x90\xca\xe6\xbc\xc0\x1a\xe3\x2b\x50\xf1\x3f\x63\x91\x8d\xfb\x51\x77\xdf\x97\x97\xc6\x27\x3b\x92\xd1\x03\xc3\xf7\xa3\xfc\x20\x50\xd2\xb1\x96\xcc\x87\x2c\x57\xb7\x7f\x9b\xdb\x17\x82\xd4\x19\x54\x45\xfc\xc6\x23\x6d\xd8\xbd\x14\xc8\xbc\xbc\x82\x23\xa6\x73\x9f\x6a\x17\xc9\xa8\x61\xe8\xc8\x21\xa6",
- b"\x76\x0b\x56\x24\xbd\x64\xd1\x9c\x86\x6e\x54\xcc\xd7\x4a\xd7\xf9\x88\x51\xaf\xdb\xc3\xdd\xea\xe3\xec\x2c\x52\xa1\x35\xbe\x9c\xfa",
- b"\xfe\xca\x15\xce\x93\x50\x87\x71\x02\xee\xe0\xf5\xaf\x18\xb2\xfe\xd8\x9d\xc8\x6b\x7d\xf0\xbf\x7b\xc2\x96\x3c\x16\x38\xe3\x6f\xe8",
- b"\xbd\xff\x14\xe4\x60\x03\x09\xc2\xc7\x7f\x79\xa2\x59\x63\xa9\x55\xb5\xb5\x00\xa7\xb2\xd3\x4c\xb1\x72\xcd\x6a\xcd\x52\x90\x5c\x7b",
- b"\xb0\x47\x9c\xdb\x3d\xf7\x99\x23\xec\x36\xa1\x04\xa1\x29\x53\x4c\x5d\x59\xf6\x22\xbe\x7d\x61\x3a\xa0\x45\x30\xad\x25\x07\xd3\xa2",
- );
- test::<Secp256r1, Sha512>(
- b"\xea\x95\x85\x9c\xc1\x3c\xcc\xb3\x71\x98\xd9\x19\x80\x3b\xe8\x9c\x2e\xe1\x0b\xef\xdc\xaf\x5d\x5a\xfa\x09\xdc\xc5\x29\xd3\x33\xae\x1e\x4f\xfd\x3b\xd8\xba\x86\x42\x20\x3b\xad\xd7\xa8\x0a\x3f\x77\xee\xee\x94\x02\xee\xd3\x65\xd5\x3f\x05\xc1\xa9\x95\xc5\x36\xf8\x23\x6b\xa6\xb6\xff\x88\x97\x39\x35\x06\x66\x0c\xc8\xea\x82\xb2\x16\x3a\xa6\xa1\x85\x52\x51\xc8\x7d\x93\x5e\x23\x85\x7f\xe3\x5b\x88\x94\x27\xb4\x49\xde\x72\x74\xd7\x75\x4b\xde\xac\xe9\x60\xb4\x30\x3c\x5d\xd5\xf7\x45\xa5\xcf\xd5\x80\x29\x3d\x65\x48\xc8\x32",
- b"\xc6\x2c\xc4\xa3\x9a\xce\x01\x00\x6a\xd4\x8c\xf4\x9a\x3e\x71\x46\x69\x55\xbb\xee\xca\x5d\x31\x8d\x67\x26\x95\xdf\x92\x6b\x3a\xa4",
- b"\xc8\x5c\xcf\x51\x7b\xf2\xeb\xd9\xad\x6a\x9e\x99\x25\x4d\xef\x0d\x74\xd1\xd2\xfd\x61\x1e\x32\x8b\x4a\x39\x88\xd4\xf0\x45\xfe\x6f",
- b"\x6e\x7f\xf8\xec\x7a\x5c\x48\xe0\x87\x72\x24\xa9\xfa\x84\x81\x28\x3d\xe4\x5f\xcb\xee\x23\xb4\xc2\x52\xb0\xc6\x22\x44\x2c\x26\xad",
- b"\x3d\xfa\xc3\x20\xb9\xc8\x73\x31\x81\x17\xda\x6b\xd8\x56\x00\x0a\x39\x2b\x81\x56\x59\xe5\xaa\x2a\x6a\x18\x52\xcc\xb2\x50\x1d\xf3",
- );
-
- test::<Secp384r1, Sha224>(
- b"\x94\xf8\xbf\xbb\x9d\xd6\xc9\xb6\x19\x3e\x84\xc2\x02\x3a\x27\xde\xa0\x0f\xd4\x83\x56\x90\x9f\xae\xc2\x16\x19\x72\x43\x96\x86\xc1\x46\x18\x4f\x80\x68\x6b\xc0\x9e\x1a\x69\x8a\xf7\xdf\x9d\xea\x3d\x24\xd9\xe9\xfd\x6d\x73\x48\xa1\x46\x33\x9c\x83\x92\x82\xcf\x89\x84\x34\x5d\xc6\xa5\x10\x96\xd7\x4a\xd2\x38\xc3\x52\x33\x01\x2a\xd7\x29\xf2\x62\x48\x1e\xc7\xcd\x64\x88\xf1\x3a\x6e\xba\xc3\xf3\xd2\x34\x38\xc7\xcc\xb5\xa6\x6e\x2b\xf8\x20\xe9\x2b\x71\xc7\x30\xbb\x12\xfd\x64\xea\x17\x70\xd1\xf8\x92\xe5\xb1\xe1\x4a\x9e\x5c",
- b"\x3a\x65\xb2\x6c\x08\x10\x2b\x44\x83\x8f\x8c\x23\x27\xea\x08\x0d\xaf\x1e\x4f\xc4\x5b\xb2\x79\xce\x03\xaf\x13\xa2\xf9\x57\x5f\x0f\xff\x9e\x2e\x44\x23\xa5\x85\x94\xce\x95\xd1\xe7\x10\xb5\x90\xce",
- b"\xfe\x9d\xcb\xcb\x2e\xc6\xe8\xbd\x8e\xd3\xaf\x3f\xf0\xaa\x61\x9e\x90\x0c\xc8\xba\xb3\xf5\x0f\x6e\x5f\x79\xfa\xc0\x91\x64\xfb\x6a\x20\x77\xcc\x4f\x1f\xed\x3e\x9e\xc6\x89\x9e\x91\xdb\x32\x9b\xf3",
- b"\x67\x70\xee\xa9\x36\x9d\x67\x18\xe6\x0d\xd0\xb9\x1a\xee\x84\x5f\xf7\xed\x7e\x0f\xcc\x91\x67\x5f\x56\xd3\x2e\x52\x27\xfd\x3a\x46\x12\xbb\xcb\x15\x56\xfe\x94\xa9\x89\xb9\xe3\xbc\xc2\x5b\xb2\x0e",
- b"\xc4\x30\x72\xf7\x06\xc9\x81\x26\xd0\x6a\x82\xb0\x42\x51\xe3\xec\xb0\xba\x66\xc4\xbb\x6c\xd7\xc0\x25\x91\x9b\x9c\xc6\x01\x9c\xdc\x63\x52\x56\xd2\xa7\xfa\x01\x7b\x80\x6b\x1e\x88\x64\x9d\x2c\x0d",
- );
- test::<Secp384r1, Sha256>(
- b"\x64\xf9\xf0\x5c\x28\x05\xac\xf5\x9c\x04\x7b\x5f\x5d\x2e\x20\xc3\x92\x77\xb6\xd6\x38\x0f\x70\xf8\x7b\x72\x32\x7a\x76\x17\x0b\x87\x2b\xfe\x4b\x25\xc4\x51\x60\x2a\xcf\xb6\xa6\x31\xbb\x88\x5e\x26\x55\xae\xe8\xab\xe4\x4f\x69\xc9\x0f\xb2\x1f\xfd\xe0\x3c\xef\x2a\x45\x2c\x46\x8c\x63\x69\x86\x7d\xfd\x8a\xa2\x6a\xc2\x4e\x16\xaa\x53\xb2\x92\x37\x5a\x8d\x8f\xbf\x98\x8e\x30\x2b\xf0\x00\x88\xe4\xc0\x61\xaa\x12\xc4\x21\xd8\xfe\x3c\xbd\x72\x73\xb0\xe8\x99\x37\x01\xdf\x1c\x59\x43\x1f\x43\x6a\x08\xb8\xe1\x5b\xd1\x23\xd1\x33",
- b"\x16\x6e\x6d\x96\xcb\x60\xd9\x16\xfd\x19\x88\x8a\x2d\xd9\x45\xa3\x30\x6f\xf0\xd7\xb0\xa5\xe3\x07\x29\xf4\x7d\x3d\xac\x3d\xe2\xbe\x3f\xd5\xcd\x74\x37\xe9\xa8\x0d\x6c\x48\xcf\x96\x0d\x2d\x36\xf8",
- b"\xe6\xb2\xb7\x0f\x13\x10\x92\xae\x21\x0f\x29\xcc\x6b\xad\x70\x13\x18\xbd\xdb\x31\xbd\xdf\x92\x16\x95\x85\x5c\x62\x08\x94\x11\x00\xd0\xce\xe5\xd1\x07\x99\xf8\xb8\x35\xaf\xe3\xea\x51\x0e\x82\x29",
- b"\xd9\x12\x4c\x42\x85\x80\x80\xc6\x24\x00\xe4\xd4\xd8\x13\x63\x04\xe0\x3d\x91\x0c\xbe\x9b\x9b\x34\x87\xf4\xd2\x7c\x7e\x05\x40\xa3\x14\xd3\x4b\xef\x8c\x85\x00\x45\xc8\x74\x6c\xa6\x31\xc1\x1c\x42",
- b"\xbb\xf6\x42\x4a\x3b\x70\x16\x6f\xa7\x99\xf4\x9e\x91\x84\x39\xd5\x15\x32\x70\x39\x25\x8e\xf9\xbd\x88\x43\x5a\x59\xc9\xc1\x96\x59\xf8\xec\x3c\x86\x60\x72\x0b\x0c\x08\x35\x4f\xf6\x0e\x0f\x5a\x76",
- );
- test::<Secp384r1, Sha384>(
- b"\x0e\x64\x6c\x6c\x3c\xc0\xf9\xfd\xed\xef\x93\x4b\x71\x95\xfe\x38\x37\x83\x6a\x9f\x6f\x26\x39\x68\xaf\x95\xef\x84\xcd\x03\x57\x50\xf3\xcd\xb6\x49\xde\x74\x5c\x87\x4a\x6e\xf6\x6b\x3d\xd8\x3b\x66\x06\x8b\x43\x35\xbc\x0a\x97\x18\x41\x82\xe3\x96\x5c\x72\x2b\x3b\x1a\xee\x48\x8c\x36\x20\xad\xb8\x35\xa8\x14\x0e\x19\x9f\x4f\xc8\x3a\x88\xb0\x28\x81\x81\x6b\x36\x6a\x09\x31\x6e\x25\x68\x52\x17\xf9\x22\x11\x57\xfc\x05\xb2\xd8\xd2\xbc\x85\x53\x72\x18\x3d\xa7\xaf\x3f\x0a\x14\x14\x8a\x09\xde\xf3\x7a\x33\x2f\x8e\xb4\x0d\xc9",
- b"\xa3\x9a\xc3\x53\xca\x78\x79\x82\xc5\x77\xaf\xf1\xe8\x60\x1c\xe1\x92\xaa\x90\xfd\x0d\xe4\xc0\xed\x62\x7f\x66\xa8\xb6\xf0\x2a\xe5\x13\x15\x54\x3f\x72\xff\xc1\xc4\x8a\x72\x69\xb2\x5e\x7c\x28\x9a",
- b"\x90\x64\xa5\x07\xb6\x6b\x34\x0b\x6e\x0e\x0d\x5f\xfa\xa6\x7d\xd2\x0e\x6d\xaf\xc0\xea\x6a\x6f\xae\xe1\x63\x51\x77\xaf\x25\x6f\x91\x08\xa2\x2e\x9e\xdf\x73\x6a\xb4\xae\x8e\x96\xdc\x20\x7b\x1f\xa9",
- b"\xee\x82\xc0\xf9\x05\x01\x13\x6e\xb0\xdc\x0e\x45\x9a\xd1\x7b\xf3\xbe\x1b\x1c\x8b\x8d\x05\xc6\x00\x68\xa9\x30\x6a\x34\x63\x26\xff\x73\x44\x77\x6a\x95\xf1\xf7\xe2\xe2\xcf\x94\x77\x13\x0e\x73\x5c",
- b"\xaf\x10\xb9\x0f\x20\x3a\xf2\x3b\x75\x00\xe0\x70\x53\x6e\x64\x62\x9b\xa1\x92\x45\xd6\xef\x39\xaa\xb5\x7f\xcd\xb1\xb7\x3c\x4c\x6b\xf7\x07\x0c\x62\x63\x54\x46\x33\xd3\xd3\x58\xc1\x2a\x17\x81\x38",
- );
- test::<Secp384r1, Sha512>(
- b"\xdb\xd8\xdd\xc0\x27\x71\xa5\xff\x73\x59\xd5\x21\x65\x36\xb2\xe5\x24\xa2\xd0\xb6\xff\x18\x0f\xa2\x9a\x41\xa8\x84\x7b\x6f\x45\xf1\xb1\xd5\x23\x44\xd3\x2a\xea\x62\xa2\x3e\xa3\xd8\x58\x4d\xea\xae\xa3\x8e\xe9\x2d\x13\x14\xfd\xb4\xfb\xbe\xcd\xad\x27\xac\x81\x0f\x02\xde\x04\x52\x33\x29\x39\xf6\x44\xaa\x9f\xe5\x26\xd3\x13\xce\xa8\x1b\x9c\x3f\x6a\x8d\xbb\xea\xfc\x89\x9d\x0c\xda\xeb\x1d\xca\x05\x16\x0a\x8a\x03\x96\x62\xc4\xc8\x45\xa3\xdb\xb0\x7b\xe2\xbc\x8c\x91\x50\xe3\x44\x10\x3e\x40\x44\x11\x66\x8c\x48\xaa\x77\x92",
- b"\x54\xc7\x9d\xa7\xf8\xfa\xee\xee\x6f\x3a\x1f\xdc\x66\x4e\x40\x5d\x5c\x0f\xb3\xb9\x04\x71\x5f\x3a\x9d\x89\xd6\xfd\xa7\xea\xbe\x6c\xee\x86\xef\x82\xc1\x9f\xca\x0d\x1a\x29\xe0\x9c\x1a\xcf\xcf\x18",
- b"\x92\x6c\x17\xd6\x87\x78\xeb\x06\x6c\x20\x78\xcd\xb6\x88\xb1\x73\x99\xe5\x4b\xde\x5a\x79\xef\x18\x52\x35\x2a\x58\x96\x7d\xff\x02\xc1\x7a\x79\x2d\x39\xf9\x5c\x76\xd1\x46\xfd\xc0\x86\xfe\x26\xb0",
- b"\x9d\xbf\xa1\x47\x37\x57\x67\xdd\xe8\x1b\x01\x4f\x1e\x3b\xf5\x79\xc4\x4d\xd2\x24\x86\x99\x8a\x9b\x6f\x9e\x09\x20\xe5\x3f\xaa\x11\xee\xd2\x9a\x4e\x23\x56\xe3\x93\xaf\xd1\xf5\xc1\xb0\x60\xa9\x58",
- b"\xe4\xd3\x18\x39\x1f\x7c\xbf\xe7\x0d\xa7\x89\x08\xd4\x2d\xb8\x52\x25\xc8\x5f\x4f\x2f\xf4\x13\xec\xad\x50\xaa\xd5\x83\x3a\xbe\x91\xbd\xd5\xf6\xd6\x4b\x0c\xd2\x81\x39\x8e\xab\x19\x45\x20\x87\xdd",
- );
-
- test::<Secp521r1, Sha224>(
- b"\xc6\x43\x19\xc8\xaa\x1c\x1a\xe6\x76\x63\x00\x45\xae\x48\x8a\xed\xeb\xca\x19\xd7\x53\x70\x41\x82\xc4\xbf\x3b\x30\x6b\x75\xdb\x98\xe9\xbe\x43\x82\x34\x23\x3c\x2f\x14\xe3\xb9\x7c\x2f\x55\x23\x69\x50\x62\x98\x85\xac\x1e\x0b\xd0\x15\xdb\x0f\x91\x29\x13\xff\xb6\xf1\x36\x1c\x4c\xc2\x5c\x3c\xd4\x34\x58\x3b\x0f\x7a\x5a\x9e\x1a\x54\x9a\xa5\x23\x61\x42\x68\x03\x79\x73\xb6\x5e\xb5\x9c\x0c\x16\xa1\x9a\x49\xbf\xaa\x13\xd5\x07\xb2\x9d\x5c\x7a\x14\x6c\xd8\xda\x29\x17\x66\x51\x00\xac\x9d\xe2\xd7\x5f\xa4\x8c\xb7\x08\xac\x79",
- b"\x00\x01\x88\x36\x6b\x94\x19\xa9\x00\xab\x0e\xd9\x63\x34\x26\xd5\x1e\x25\xe8\xdc\x03\xf4\xf0\xe7\x54\x99\x04\x24\x39\x81\xec\x46\x9c\x8d\x6d\x93\x8f\x67\x14\xee\x62\x0e\x63\xbb\x0e\xc5\x36\x37\x6a\x73\xd2\x4d\x40\xe5\x8a\xd9\xeb\x44\xd1\xe6\x06\x3f\x2e\xb4\xc5\x1d",
- b"\x00\x98\x89\xb9\x20\x3d\x52\xb9\x24\x3f\xd5\x15\x29\x4a\x67\x4a\xfd\x6b\x81\xdf\x46\x37\xff\xdd\xdc\x43\xa7\x41\x47\x41\xed\xa7\x8d\x8a\xa8\x62\xc9\xcb\xbb\x61\x8a\xce\xc5\x5b\xb9\xa2\x9a\xac\x59\x61\x6f\xc8\x04\xa5\x2a\x97\xa9\xfc\x4d\x03\x25\x4f\x44\x69\xef\xfe",
- b"\x01\xd5\x94\x01\xb8\xac\x43\x88\x55\xd5\x45\xa6\x99\x99\x11\x42\x68\x50\x77\xa4\x09\xde\x24\x18\xc7\xcc\xfe\x01\xa4\x77\x1b\x38\x70\xe7\x62\x87\xa9\x65\x4c\x20\x9b\x58\xa1\x2b\x0f\x51\xe8\xdc\x56\x8e\x33\x14\x0a\x6b\x63\x03\x24\xf7\xef\x17\xca\xa6\x4b\xf4\xc1\x39",
- b"\x01\x43\xaf\x36\x0b\x79\x71\x09\x5b\x3b\x50\x67\x9a\x13\xcd\x49\x21\x71\x89\xea\xee\x47\x13\xf4\x20\x17\x20\x17\x52\x16\x57\x3c\x68\xf7\xac\x6f\x68\x8b\xfe\x6e\xb9\x40\xa2\xd9\x71\x80\x9b\xf3\x6c\x0a\x77\xde\xcc\x55\x3b\x02\x5e\xd4\x19\x35\xa3\x89\x86\x85\x18\x3b",
- );
- test::<Secp521r1, Sha256>(
- b"\x91\xf1\xca\x8c\xe6\x68\x1f\x4e\x1f\x11\x7b\x91\x8a\xe7\x87\xa8\x88\x79\x8a\x9d\xf3\xaf\xc9\xd0\xe9\x22\xf5\x1c\xdd\x6e\x7f\x7e\x55\xda\x99\x6f\x7e\x36\x15\xf1\xd4\x1e\x42\x92\x47\x98\x59\xa4\x4f\xa1\x8a\x5a\x00\x66\x62\x61\x0f\x1a\xaa\x28\x84\xf8\x43\xc2\xe7\x3d\x44\x17\x53\xe0\xea\xd5\x1d\xff\xc3\x66\x25\x06\x16\xc7\x06\xf0\x71\x28\x94\x0d\xd6\x31\x2f\xf3\xed\xa6\xf0\xe2\xb4\xe4\x41\xb3\xd7\x4c\x59\x2b\x97\xd9\xcd\x91\x0f\x97\x9d\x7f\x39\x76\x7b\x37\x9e\x7f\x36\xa7\x51\x9f\x2a\x4a\x25\x1e\xf5\xe8\xaa\xe1",
- b"\x01\x67\xd8\xb8\x30\x82\x59\xc7\x30\x93\x1d\xb8\x28\xa5\xf6\x96\x97\xec\x07\x73\xa7\x9b\xde\xdb\xaa\xf1\x51\x14\xa4\x93\x70\x11\xc5\xae\x36\xab\x05\x03\x95\x73\x73\xfe\xe6\xb1\xc4\x65\x0f\x91\xa3\xb0\xc9\x2c\x2d\x60\x4a\x35\x59\xdd\x2e\x85\x6a\x9a\x84\xf5\x51\xd9",
- b"\x01\x9d\x2c\x13\x46\xaa\xda\xa3\x09\x0b\x59\x81\xf5\x35\x32\x43\x30\x0a\x4f\xf0\xab\x96\x1c\x4e\xe5\x30\xf4\x13\x3f\xe8\x5e\x6a\xab\x5b\xad\x42\xe7\x47\xee\xe0\x29\x8c\x2b\x80\x51\xc8\xbe\x70\x49\x10\x9a\xd3\xe1\xb5\x72\xdd\xa1\xca\xc4\xa0\x30\x10\xf9\x9f\x20\x6e",
- b"\x01\xff\x09\x74\x85\xfa\xf3\x2c\xe9\xe0\xc5\x57\xee\x06\x45\x87\xc1\x2c\x48\x34\xe7\xf0\x98\x8c\xf1\x81\xd0\x7b\xa9\xee\x15\xae\x85\xa8\x20\x8b\x61\x85\x00\x80\xfc\x4b\xbe\xdb\xd8\x25\x36\x18\x1d\x43\x97\x34\x59\xf0\xd6\x96\xac\x5e\x6b\x8f\x23\x30\xb1\x79\xd1\x80",
- b"\x00\x30\x6d\xc3\xc3\x82\xaf\x13\xc9\x9d\x44\xdb\x7a\x84\xed\x81\x3c\x87\x19\xc6\xed\x3b\xbe\x75\x1e\xad\x0d\x48\x7b\x5a\x4a\xa0\x18\x12\x98\x62\xb7\xd2\x82\xcc\xe0\xbc\x20\x59\xa5\x6d\x77\x22\xf4\xb2\x26\xf9\xde\xb8\x5d\xa1\x2d\x5b\x40\x64\x8b\xf6\xec\x56\x81\x28",
- );
- test::<Secp521r1, Sha384>(
- b"\x4b\xe8\x1d\xcf\xab\x39\xa6\x4d\x6f\x00\xc0\xd7\xff\xf9\x4d\xab\xdf\x34\x73\xdc\x49\xf0\xe1\x29\x00\xdf\x32\x8d\x65\x84\xb8\x54\xfb\xae\xba\xf3\x19\x4c\x43\x3e\x9e\x21\x74\x33\x42\xe2\xdd\x05\x6b\x44\x5c\x8a\xa7\xd3\x0a\x38\x50\x4b\x36\x6a\x8f\xa8\x89\xdc\x8e\xce\xc3\x5b\x31\x30\x07\x07\x87\xe7\xbf\x0f\x22\xfa\xb5\xbe\xa5\x4a\x07\xd3\xa7\x53\x68\x60\x53\x97\xba\x74\xdb\xf2\x92\x3e\xf2\x0c\x37\xa0\xd9\xc6\x4c\xae\xbc\xc9\x31\x57\x45\x6b\x57\xb9\x8d\x4b\xec\xb1\x3f\xec\xb7\xcc\x7f\x37\x40\xa6\x05\x7a\xf2\x87",
- b"\x00\xcf\xa5\xa8\xa3\xf1\x5e\xb8\xc4\x19\x09\x56\x73\xf1\xd0\xbd\x63\xb3\x96\xff\x98\x13\xc1\x8d\xfe\x5a\xa3\x1f\x40\xb5\x0b\x82\x48\x1f\x9e\xd2\xed\xd4\x7a\xe5\xea\x6a\x48\xea\x01\xf7\xe0\xad\x00\x00\xed\xf7\xb6\x6f\x89\x09\xee\x94\xf1\x41\xd5\xa0\x7e\xfe\x31\x5c",
- b"\x01\x8a\xf7\x28\xf7\x31\x8b\x96\xd5\x7f\x19\xc1\x10\x44\x15\xc8\xd5\x98\x95\x65\x46\x5e\x42\x9b\xc3\x0c\xf6\x5c\xed\x12\xa1\xc5\x85\x6a\xc8\x6f\xca\x02\x38\x8b\xc1\x51\xcf\x89\x95\x9a\x4f\x04\x85\x97\xa9\xe7\x28\xf3\x03\x4a\xa3\x92\x59\xb5\x98\x70\x94\x61\x87\xbf",
- b"\x01\x9c\xf9\x1a\x38\xcc\x20\xb9\x26\x9e\x74\x67\x85\x7b\x1f\xc7\xea\xbb\x8c\xea\x91\x5a\x31\x35\xf7\x27\xd4\x71\xe5\xbf\xcf\xb6\x6d\x32\x1f\xab\xe2\x83\xa2\xcf\x38\xd4\xc5\xa6\xec\xb6\xe8\xcb\xee\x10\x30\x47\x43\x73\xbb\x87\xfc\xdf\xcc\x95\xcf\x85\x7a\x8d\x25\xd0",
- b"\x01\xcf\x9a\xcd\x94\x49\xc5\x75\x89\xc9\x50\xf2\x87\x84\x2f\x9e\x24\x87\xc5\x61\x09\x55\xb2\xb5\x03\x5f\x6a\xac\xfd\x24\x02\xf5\x11\x99\x8a\x1a\x94\x2b\x39\xc3\x07\xfc\x2b\xca\xb2\xc8\xd0\xda\xe9\x4b\x55\x47\xdd\xcc\xfb\x10\x12\xca\x98\x5b\x3e\xdf\x42\xbb\xba\x8b",
- );
- test::<Secp521r1, Sha512>(
- b"\x54\x3c\x37\x4a\xf9\x0c\x34\xf5\x0e\xe1\x95\x00\x6d\x5f\x9d\x8d\xd9\x86\xd0\x9a\xd1\x82\xfc\xbe\xfa\x08\x55\x67\x27\x5e\xee\x1e\x74\x2b\xfe\x0a\xf3\xd0\x58\x67\x5a\xde\xb5\xb9\xf8\x7f\x24\x8b\x00\xa9\xfb\xd2\xaa\x77\x91\x29\x12\x3a\x5b\x98\x3f\x2f\x26\xfc\x3c\xaf\x2e\xa3\x42\x77\x55\x0c\x22\xfe\x8c\x81\x4c\x73\x9b\x46\x97\x2d\x50\x23\x29\x93\xcd\xdd\x63\xa3\xc9\x9e\x20\xf5\xc5\x06\x7d\x9b\x57\xe2\xd5\xdb\x94\x31\x7a\x5a\x16\xb5\xc1\x2b\x5c\x4c\xaf\xbc\x79\xcb\xc2\xf9\x94\x0f\x07\x4b\xbc\x7d\x0d\xc7\x1e\x90",
- b"\x00\x9e\xc1\xa3\x76\x1f\xe3\x95\x80\x73\xb9\x64\x7f\x34\x20\x2c\x5e\x8c\xa2\x42\x8d\x05\x6f\xac\xc4\xf3\xfe\xdc\x70\x77\xfa\x87\xf1\xd1\xeb\x30\xcc\x74\xf6\xe3\xff\x3d\x3f\x82\xdf\x26\x41\xce\xa1\xeb\x3f\xf1\x52\x9e\x8a\x38\x66\xae\x20\x55\xaa\xce\xc0\xbf\x68\xc4",
- b"\x00\xbe\xd0\x26\x1b\x91\xf6\x64\xc3\xff\x53\xe3\x37\xd8\x32\x1c\xb9\x88\xc3\xed\xc0\x3b\x46\x75\x46\x80\x09\x7e\x5a\x85\x85\x24\x5d\x80\xd0\xb7\x04\x5c\x75\xa9\xc5\xbe\x7f\x59\x9d\x3b\x5e\xea\x08\xd8\x28\xac\xb6\x29\x4a\xe5\x15\xa3\xdf\x57\xa3\x7f\x90\x3e\xf6\x2e",
- b"\x00\xce\xf3\xf4\xba\xbe\x6f\x98\x75\xe5\xdb\x28\xc2\x7d\x6a\x19\x7d\x60\x7c\x36\x41\xa9\x0f\x10\xc2\xcc\x2c\xb3\x02\xba\x65\x8a\xa1\x51\xdc\x76\xc5\x07\x48\x8b\x99\xf4\xb3\xc8\xbb\x40\x4f\xb5\xc8\x52\xf9\x59\x27\x3f\x41\x2c\xbd\xd5\xe7\x13\xc5\xe3\xf0\xe6\x7f\x94",
- b"\x00\x09\x7e\xd9\xe0\x05\x41\x6f\xc9\x44\xe2\x6b\xcc\x36\x61\xa0\x9b\x35\xc1\x28\xfc\xcc\xdc\x27\x42\x73\x9c\x8a\x30\x1a\x33\x8d\xd7\x7d\x9d\x13\x57\x16\x12\xa3\xb9\x52\x4a\x61\x64\xb0\x9f\xe7\x36\x43\xbb\xc3\x14\x47\xee\x31\xef\x44\xa4\x90\x84\x3e\x4e\x7d\xb2\x3f",
- );
- }
-}
--
2.36.1