diff options
author | tb <> | 2018-10-04 18:25:50 +0000 |
---|---|---|
committer | tb <> | 2018-10-04 18:25:50 +0000 |
commit | 3fef1c8a86f2e52bea9aceb90034f5e14be7846f (patch) | |
tree | 621e9d0fed4baf808417ff03729422c86b3ea9c7 | |
parent | 4262a9f00da30d97050510800e73eea3457e4a79 (diff) | |
download | openbsd-3fef1c8a86f2e52bea9aceb90034f5e14be7846f.tar.gz openbsd-3fef1c8a86f2e52bea9aceb90034f5e14be7846f.tar.bz2 openbsd-3fef1c8a86f2e52bea9aceb90034f5e14be7846f.zip |
While we don't explicitly support curve secp256r1, we can run 1250 tests
against its ANSI equivalent prime256v1 (compare RFC 4492, Appendix A).
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index e00edc03a2..92313f4afc 100644 --- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wycheproof.go,v 1.67 2018/09/30 10:56:46 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.68 2018/10/04 18:25:50 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
@@ -274,6 +274,7 @@ var nids = map[string]int{ | |||
274 | "brainpoolP512t1": C.NID_brainpoolP512t1, | 274 | "brainpoolP512t1": C.NID_brainpoolP512t1, |
275 | "secp224r1": C.NID_secp224r1, | 275 | "secp224r1": C.NID_secp224r1, |
276 | "secp256k1": C.NID_secp256k1, | 276 | "secp256k1": C.NID_secp256k1, |
277 | "secp256r1": C.NID_X9_62_prime256v1, // RFC 4492, Table 6, p.32 | ||
277 | "secp384r1": C.NID_secp384r1, | 278 | "secp384r1": C.NID_secp384r1, |
278 | "secp521r1": C.NID_secp521r1, | 279 | "secp521r1": C.NID_secp521r1, |
279 | "SHA-1": C.NID_sha1, | 280 | "SHA-1": C.NID_sha1, |
@@ -1224,11 +1225,6 @@ func runECDHTest(nid int, doECpoint bool, wt *wycheproofTestECDH) bool { | |||
1224 | } | 1225 | } |
1225 | 1226 | ||
1226 | func runECDHTestGroup(algorithm string, wtg *wycheproofTestGroupECDH) bool { | 1227 | func runECDHTestGroup(algorithm string, wtg *wycheproofTestGroupECDH) bool { |
1227 | // No secp256r1 support. | ||
1228 | if wtg.Curve == "secp256r1" { | ||
1229 | return true | ||
1230 | } | ||
1231 | |||
1232 | doECpoint := false | 1228 | doECpoint := false |
1233 | if wtg.Encoding == "ecpoint" { | 1229 | if wtg.Encoding == "ecpoint" { |
1234 | doECpoint = true | 1230 | doECpoint = true |
@@ -1288,11 +1284,6 @@ func runECDSATest(ecKey *C.EC_KEY, nid int, h hash.Hash, wt *wycheproofTestECDSA | |||
1288 | } | 1284 | } |
1289 | 1285 | ||
1290 | func runECDSATestGroup(algorithm string, wtg *wycheproofTestGroupECDSA) bool { | 1286 | func runECDSATestGroup(algorithm string, wtg *wycheproofTestGroupECDSA) bool { |
1291 | // No secp256r1 support. | ||
1292 | if wtg.Key.Curve == "secp256r1" { | ||
1293 | return true | ||
1294 | } | ||
1295 | |||
1296 | fmt.Printf("Running %v test group %v with curve %v, key size %d and %v...\n", algorithm, wtg.Type, wtg.Key.Curve, wtg.Key.KeySize, wtg.SHA) | 1287 | fmt.Printf("Running %v test group %v with curve %v, key size %d and %v...\n", algorithm, wtg.Type, wtg.Key.Curve, wtg.Key.KeySize, wtg.SHA) |
1297 | 1288 | ||
1298 | nid, err := nidFromString(wtg.Key.Curve) | 1289 | nid, err := nidFromString(wtg.Key.Curve) |