diff --git a/wycheproof2blb/src/ecdsa.rs b/wycheproof2blb/src/ecdsa.rs index 186c5515..08d82e26 100644 --- a/wycheproof2blb/src/ecdsa.rs +++ b/wycheproof2blb/src/ecdsa.rs @@ -54,7 +54,7 @@ pub fn generator(data: &[u8], algorithm: &str, _key_size: u32) -> Vec let mut infos = vec![]; for g in &suite.test_groups { - assert_eq!(g.key.curve, algorithm); + assert!(algorithm.starts_with(&g.key.curve)); assert!(matches!( g.sha.as_str(), "SHA-224" | "SHA-256" | "SHA-384" | "SHA-512" diff --git a/wycheproof2blb/src/main.rs b/wycheproof2blb/src/main.rs index 1e3ccba1..e0ab0870 100644 --- a/wycheproof2blb/src/main.rs +++ b/wycheproof2blb/src/main.rs @@ -121,11 +121,14 @@ fn main() { file: "ecdsa_secp256r1_sha256_test.json", generator: ecdsa::generator, }, - // There's also "ecdsa_secp256r1_sha256_p1363_test.json" with a different signature encoding. "secp256k1" => Algorithm { file: "ecdsa_secp256k1_sha256_test.json", generator: ecdsa::generator, }, + "secp256k1-p1316" => Algorithm { + file: "ecdsa_secp256k1_sha256_p1363_test.json", + generator: ecdsa::generator, + }, "secp384r1" => Algorithm { file: "ecdsa_secp384r1_sha384_test.json", generator: ecdsa::generator,