Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Wycheproof multiple ECDSA test vectors to v1 #166

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

Sajjon
Copy link
Contributor

@Sajjon Sajjon commented Apr 4, 2023

Update Wycheproof ECDSA test vectors to v1. This PR updates one single unit test file: ECDSASignatureTests which contains tests for P256, P383 and P521 with different Hash Function versions. Since all curves with HashFunctions are put in the same unit test file I had to update all vectors simultaneously.

@Lukasa let me know if you prefer it I break out the each test vector file into seperate unit test files, and do one PR per test vector file.

Checklist

  • I've run tests to see all new and existing tests pass
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

If you've made changes to gyb files

  • I've run .script/generate_boilerplate_files_with_gyb and included updated generated files in a commit of this pull request

Motivation:

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:

The following Wycheproof test vectors have been updated:

  • ecdsa_secp256r1_sha256_test.json
  • ecdsa_secp256r1_sha512_test.json
  • ecdsa_secp384r1_sha384_test.json
  • ecdsa_secp384r1_sha512_test.json
  • ecdsa_secp521r1_sha512_test.json

The following unit test file have been updated ECDSASignatureTests.swift, with a trivial JSON key change: key -> publicKey.

Result:

Many more tests are run.

@Sajjon Sajjon changed the title Update Wycheproof multiple ecdsa test vectors to v1 Update Wycheproof multiple ECDSA test vectors to v1 Apr 4, 2023
@Lukasa
Copy link
Collaborator

Lukasa commented Apr 6, 2023

@swift-server-bot test this please

@Lukasa Lukasa added the needs-no-version-bump For PRs that when merged do not need a bump in version number. label Apr 6, 2023
@Lukasa Lukasa merged commit d1047c1 into apple:main Apr 6, 2023
@Sajjon Sajjon deleted the wycheproofv1/ecdsa_tests branch April 14, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-no-version-bump For PRs that when merged do not need a bump in version number.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants