Closed Sajjon closed 1 year ago
@Lukasa aha! swift-crypto
contains four Wycheproof test vectors which are not at all used:
ecdh_test.json
ecdh_webcrypto_test.json
ecdsa_test.json
ecdsa_webcrypto_test.json
So I propose we delete them, it is a bit misleading to have them there. And then I can add new tests ECDSA using IEEE P1316 encoding, using ECDSASignature.init:rawRepresentation
initialiser for which Wycheproof v1 vendors:
ecdsa_secp256r1_sha256_p1363_test.json
ecdsa_secp256r1_sha512_p1363_test.json
ecdsa_secp384r1_sha384_p1363_test.json
ecdsa_secp384r1_sha512_p1363_test.json
ecdsa_secp521r1_sha512_p1363_test.json
So I propose the four unused vectors gets deleted, and I add a new unit tests, and update ECDSASignatureTests
to be shared for current tests and for the P1316
format tests, by accepting a function pointer to an ECDSASignature initializer, using init:derRepresentation
for current tests, and using init:rawRepresentation
init for the P1316 test vectors, what do you think about that @Lukasa ?
EDIT: done: https://github.com/apple/swift-crypto/pull/167
Hey @Sajjon, are there any further vectors you'd like to add as part of this ticket?
@Lukasa I think I'm done for now, I will close this issue.
This issue is an umbrella issue where we can keep track of my efforts upgrading all Wycheproof test vectors from v0 to v1.
aes_gcm
- #156chacha20_polt1305
- #157ecdh_secp256r1_test
- #160ecdh_secp256r1_ecpoint_test
- #158ecdh_secp384r1_test
- #162ecdh_secp384r1_ecpoint_test
- #161ecdh_secp521r1_test
- #163ecdh_secp521r1_ecpoint_test
- #164ecdsa_secp256r1_sha256_test
open PR #166ecdsa_secp256r1_sha512_test
open PR #166ecdsa_secp384r1_sha384_test
open PR #166ecdsa_secp384r1_sha512_test
open PR #166ecdsa_secp521r1_sha512_test
open PR #166eddsa_test
(renamed ->ed25519_test
) - #159x25519_test
- #155