-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Wycheproof tests vectors #1106
Comments
@real-or-random Any progress on this? I've written a Swift wrapper called I've also done the necessary filtering out test vector which are incompatible with this library. In This is such an important library since so many libraries build on top of it. I would love for this library to vendors thousands of test vectors for:
I would be happy to contribute, but my C skills is not the greatest... how would one parse JSON i C? But I could probably easilty contribute once some first tests parsing JSON is up! :) |
@Sajjon That sounds very interesting. Parsing JSON is indeed a pain point, but since it's really only for tests, and test vectors rarely change, we can really do whatever is most convenient. For example, we could just have a Python script that parses the JSON and outputs C data structures and literals... This was recently done in the fork secp256k1-zkp for MuSig2 test vectors (see https://github.com/BlockstreamResearch/secp256k1-zkp/blob/master/contrib/musig2-vectors.py). Not exactly elegant, but it does the job. We could do the same here. What do you think? Please let us know if you run into any issues / API inconveniences with your Swift wrapper. By the way, I'm currently out of office, so I won't reply quickly. |
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are pulled from the Wycheproof repo using a python script to emit C code. The script is embedded as a comment. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are pulled from the Wycheproof repo using a python script to emit C code. The script is embedded as a comment. Co-authored-by: Sean Andersen <[email protected]>
We opened a PR that adds coverage for ECDSA Wycheproof test vectors at #1245 . We wrote a small Python script that parses the JSON and outputs C data structure, and embedded it in the source file (much like it is done elsewhere). All the tests for ECDSA pass from the latest drop of Wycheproof (released about 3 weeks ago). |
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are pulled from the Wycheproof repo using a python script to emit C code. The script is embedded as a comment. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
e5de454 tests: Add Wycheproof ECDSA vectors (RandomLattice) Pull request description: This PR adds a test using the Wycheproof vectors as outlined in #1106. We add all 463 ECDSA test vectors. These vectors cover: - edge cases in arithmetic operations - signatures with special values for (r,s) that should be rejected - special cases of public keys The vectors are pulled from the Wycheproof project using a python script to emit C code. All the new ECDSA Wycheproof vectors pass. ACKs for top commit: sipa: ACK e5de454 real-or-random: ACK e5de454 Tree-SHA512: e9684f14ff3f5225a4a4949b490e07527d559c28aa61ed03c03bc52ea64785f0b80b9e1b1628665eacf24006526271ea0fb108629c9c3c1d758e52d214a056f1
Adds a test using the Wycheproof vectors as outlined in bitcoin-core#1106. The vectors are taken from the Wycheproof repo. We use a python script to convert the JSON-formatted vectors into C code. Co-authored-by: Sean Andersen <[email protected]>
Though we have good tests, the Wycheproof test vectors will be a good addition.
The test cases are in a simple JSON format: https://github.com/google/wycheproof/tree/master/testvectors We could either parse them (e.g., https://github.com/zserge/jsmn is very thin, MIT single-header parser that we ), or have a small script (in whatever language) that converts the vectors to C code.
The text was updated successfully, but these errors were encountered: