Open Yawning opened 5 months ago
I'm slowly working on this in a private repo.
Unfortunately BLAKE2, MD5, Keccak, and TupleHash don't have wycheproof artifacts, but I'm largely interested in this for ECC, AES, RSA.
This covers everything currently in core/crypto that has corresponding wycheproof test cases:
Notes:
-o:speed
when building.The corpus of test vectors is rather large, and I wrote this as a stand-alone executable rather than using core:testing
(which can be changed), so this could be ran from a CI workflow so that people aren't forced to checkout the test vector repo.
The compiler also intermittently segfaulted when building the binary, but short of "it happened, but when I re-ran the build" I don't have futher information.
While core/crypto has test cases lifted from various sources, there is always room for improvement, and testing the various primitives against the test vectors from the wycheproof collection would be nice to have, especially to catch the extremely subtle implementation errors, and edge-cases that are possible in the harder to implement primitives (ECC, RSA, etc).
I was/will probably do this at some point, but my bandwidth is limited, and this would be a good first project for someone.
tests/core/download_assets.py
test/core/crypto/test_crypto_wycheproof.odin
that parses the JSON files, and runs the testsIf someone wants to tackle this before I get to it, please ask me questions about it if any arise.