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

Add test vectors from Project Wycheproof for secp256r1 #2007

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ criterion = "0.5.1"
serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] }
serde_json = "1.0.40"
sha2 = "0.10"
sha3 = "0.10"
hex = "0.4"
hex-literal = "0.3.1"
english-numbers = "0.3"
Expand Down
21 changes: 21 additions & 0 deletions packages/crypto/testdata/wycheproof/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Wycheproof test data

This folder contains test vectors from
[Project Wycheproof](https://github.com/google/wycheproof) to increase the test
coverage of signature verification implementations.

This test data is used by integration tests in `test/wycheproof_*.rs`.

## Update

To ensure integrity of the files and update them to the latest version, run this
from the repo root:

```sh
(cd packages/crypto/testdata/wycheproof \
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha256_test.json > ecdsa_secp256r1_sha256_test.json \
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha512_test.json > ecdsa_secp256r1_sha512_test.json \
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha3_256_test.json > ecdsa_secp256r1_sha3_256_test.json \
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha3_512_test.json > ecdsa_secp256r1_sha3_512_test.json \
)
```
6,502 changes: 6,502 additions & 0 deletions packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha256_test.json

Large diffs are not rendered by default.

6,582 changes: 6,582 additions & 0 deletions packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha3_256_test.json

Large diffs are not rendered by default.

7,246 changes: 7,246 additions & 0 deletions packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha3_512_test.json

Large diffs are not rendered by default.

7,206 changes: 7,206 additions & 0 deletions packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha512_test.json

Large diffs are not rendered by default.

Loading
Loading