-
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
tests: Add Wycheproof ECDH vectors #1492
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,18 @@ | |
`b063b4aedae951c69df014cd25fa6d69ae9e8cb9`, see | ||
https://github.com/google/wycheproof/blob/b063b4aedae951c69df014cd25fa6d69ae9e8cb9/testvectors_v1/ecdsa_secp256k1_sha256_bitcoin_test.json | ||
|
||
* The file `ecdh_secp256k1_test.json` in this directory | ||
comes from Google's project Wycheproof with git commit | ||
`d9f6ec7d8bd8c96da05368999094e4a75ba5cb3d`, see | ||
https://github.com/google/wycheproof/blob/d9f6ec7d8bd8c96da05368999094e4a75ba5cb3d/testvectors_v1/ecdh_secp256k1_test.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wycheproof ownership was recently moved to C2SP (https://github.com/C2SP/wycheproof community maintenance), so this should be updated to the new URL.) See @FiloSottile's talk https://archive.org/details/oscw-2024-fillippo-valsorda-cryptographic-test-vectors for background.) You could update the other URLs in a separate commit, and update the ECDSA vectors, see C2SP/wycheproof#91 (if you're willing to care of this in this PR). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure thing, we will open a concurrent PR to update this. I think it will be cleaner. |
||
|
||
* The file `ecdsa_secp256k1_sha256_bitcoin_test.h` is generated from | ||
`ecdsa_secp256k1_sha256_bitcoin_test.json` using the script | ||
`tests_wycheproof_generate.py`. | ||
`tests_wycheproof_generate_ecdsa.py`. | ||
|
||
* The file `ecdh_secp256k1_test.h` is generated from | ||
`ecdh_secp256k1_test.json` using the script | ||
`tests_wycheproof_generate_ecdh.py`. | ||
|
||
------------------------------------------------------------------------------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this to
expected_parses
or similar?result
is a bit imprecise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
result
is a bit imprecise, but it's what wycheproof uses in their test vectors (and it is used for different purposes all together, so it seems a bit hard to fix this for them...). Let me know if this is not acceptable, happy to change it to something else. We use it for "expected parses" but also "expected ECDH function outcome".