Closed Sajjon closed 1 year ago
Hrm, this will need to be cleaned up to merge nicely on the patch we just landed. I'm inclined, in general, to try not to add new test files here: I think keeping them merged together is reasonable.
@Lukasa ok I will rework the PR a bit and try first not adding any init test swift files
What about my removal of the 4 unused test vectors, are you OK with that?
@Lukasa I've reverted the unit test file changes, and updated the description in the PR to reflect the modifications => ready for re-review.
@swift-server-bot test this please
This PR is branched from source branch of https://github.com/apple/swift-crypto/pull/166, so please do review and merge that first.
Add five new Wychyeproof ECDSA test vectors using IEEE P1363 format
Checklist
If you've made changes to
gyb
files.script/generate_boilerplate_files_with_gyb
and included updated generated files in a commit of this pull requestMotivation:
We ought to use as many and as up to date test vectors as possible. Wycheproofs v0 were created 4 years ago and were due some upgrade.
Modifications:
ecdh_test
,ecdh_webcrypto_test
,ecdsa_test
,ecdsa_webcrypto_test
ecdsa_secp256r1_sha256_p1363_test
,ecdsa_secp256r1_sha512_p1363_test
,ecdsa_secp384r1_sha384_p1363_test
,ecdsa_secp384r1_sha512_p1363_test
,ecdsa_secp521r1_sha512_p1363_test
.ECDSASignatureTests
renamingtestWycheProofEdDSA
->testWycheproofEdDSA
,testWycheProofP256
->testWycheproofP256DER
and analgously for P384 and P521.ECDSASignatureTests
with three new unit test functionstestWycheproofP256P1363
testWycheproofP384P1363
testWycheproofP521P1363
Result:
(252 + 322 + 270 + 308 + 308 =) 1460 new tests are being run for ECDSA.