-
Notifications
You must be signed in to change notification settings - Fork 12
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 checksum KAT to Github Workflow #29
Add checksum KAT to Github Workflow #29
Conversation
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.
Please rebase on top of main and resolve any conflicts.
Do you think it's possible to switch to actual NISTKATs?
Unfortunately, the hashes in the kyber repo are not up to date, but you can generate them yourself from the code in https://github.com/pq-crystals/kyber/tree/standard.
You would have to re-implement it along the lines of https://github.com/PQClean/PQClean/blob/master/test/crypto_sign/nistkat.c - which should not be too hard. This will be much easier to match against the official testvectors that will be published by NIST togethr
MLKEM512:
4b88ac7643ff60209af1175e025f354272e88df827a0ce1c056e403629b88e04
MLKEM768:
21b4a1e1ea34a13c26a9da5eeb9325afb5ca11596ca6f3704c3f2637e3ea7524
MLKEM1024:
6471398b0a728ee1ef39e93bb89b526fbf59587a3662edadbcfc6c88a512cd71
b56bf74
to
ec3d9cd
Compare
Good idea. I will add NISTKAT test. I see it's no harm to add independent test as long as our checksum match NISTKAT. We can always fall back to add a |
4a3b2c3
to
2feba80
Compare
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
b76b05a
to
6ba15c6
Compare
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Co-authored-by: Matthias J. Kannwischer <[email protected]> Signed-off-by: cothan <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
Signed-off-by: Duc Tri Nguyen <[email protected]>
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.
Thanks for making the changes. This looks good to me now.
* Add checksum KAT to Github Action Signed-off-by: Duc Tri Nguyen <[email protected]> * add make mlkem and make clean to build Signed-off-by: Duc Tri Nguyen <[email protected]> * add checksum for test_kyber* Signed-off-by: Duc Tri Nguyen <[email protected]> * Add NISTKAT Signed-off-by: Duc Tri Nguyen <[email protected]> * Add hashsum for NISTKAT Signed-off-by: Duc Tri Nguyen <[email protected]> * Add SPDX header Signed-off-by: Duc Tri Nguyen <[email protected]> * Add NISTKAT to Makefile Signed-off-by: Duc Tri Nguyen <[email protected]> * Update gitignore Signed-off-by: Duc Tri Nguyen <[email protected]> * fix format Signed-off-by: Duc Tri Nguyen <[email protected]> * forward output to pipe directly Signed-off-by: Duc Tri Nguyen <[email protected]> * extract 1st column Signed-off-by: Duc Tri Nguyen <[email protected]> * remove for loop Signed-off-by: Duc Tri Nguyen <[email protected]> * Simplify Makefile Signed-off-by: Duc Tri Nguyen <[email protected]> * check return code only Signed-off-by: Duc Tri Nguyen <[email protected]> * Update .github/workflows/build.yml Co-authored-by: Matthias J. Kannwischer <[email protected]> Signed-off-by: cothan <[email protected]> * replace nistkat Signed-off-by: Duc Tri Nguyen <[email protected]> * fix incorrect space Signed-off-by: Duc Tri Nguyen <[email protected]> --------- Signed-off-by: Duc Tri Nguyen <[email protected]> Signed-off-by: cothan <[email protected]> Co-authored-by: Matthias J. Kannwischer <[email protected]>
This PR should be merged after #24 .
This PR add:
gen_KAT.c
: A way to deterministic generate KAT file.gen_NISTKAT.c
: Generate NISTKAT file to compare with official/upstream ML-KEM KATs.checksum.sh
: A bash script run executable and compare output of executable with an hash.Github workflow
to test checksum of MLKEM512, 768, 1024 from 10,000 iterations.