Skip to content

Commit 7d74266

Browse files
authored
Merge pull request #2007 from CosmWasm/secp256r1-wycheproof
Add test vectors from Project Wycheproof for secp256r1
2 parents e49d834 + a0efe13 commit 7d74266

File tree

8 files changed

+27964
-0
lines changed

8 files changed

+27964
-0
lines changed

Cargo.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/crypto/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ criterion = "0.5.1"
2929
serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] }
3030
serde_json = "1.0.40"
3131
sha2 = "0.10"
32+
sha3 = "0.10"
3233
hex = "0.4"
3334
hex-literal = "0.3.1"
3435
english-numbers = "0.3"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Wycheproof test data
2+
3+
This folder contains test vectors from
4+
[Project Wycheproof](https://github.com/google/wycheproof) to increase the test
5+
coverage of signature verification implementations.
6+
7+
This test data is used by integration tests in `test/wycheproof_*.rs`.
8+
9+
## Update
10+
11+
To ensure integrity of the files and update them to the latest version, run this
12+
from the repo root:
13+
14+
```sh
15+
(cd packages/crypto/testdata/wycheproof \
16+
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha256_test.json > ecdsa_secp256r1_sha256_test.json \
17+
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha512_test.json > ecdsa_secp256r1_sha512_test.json \
18+
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha3_256_test.json > ecdsa_secp256r1_sha3_256_test.json \
19+
&& curl -sSL https://github.com/google/wycheproof/raw/master/testvectors_v1/ecdsa_secp256r1_sha3_512_test.json > ecdsa_secp256r1_sha3_512_test.json \
20+
)
21+
```

packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha256_test.json

Lines changed: 6502 additions & 0 deletions
Large diffs are not rendered by default.

packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha3_256_test.json

Lines changed: 6582 additions & 0 deletions
Large diffs are not rendered by default.

packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha3_512_test.json

Lines changed: 7246 additions & 0 deletions
Large diffs are not rendered by default.

packages/crypto/testdata/wycheproof/ecdsa_secp256r1_sha512_test.json

Lines changed: 7206 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)