-
Notifications
You must be signed in to change notification settings - Fork 24
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
ml-kem: fix potential kyberslash attack #18
Conversation
You should be able to enable the |
I have updated the I am still working to understand why the |
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.
Couple of nits, but overall LGTM. Thanks!
You can explicitly annotate the places which operate on public values with |
adds lint ignore to tests
I have updated the initial commit as per @bifurcation 's comments as well as adding the |
in response to @bifurcation 's comment (I am unable to in a thread): Yes, of course, I don't know how I didn't see that... I've done a little bit of testing and it appears that it is not always true that I have also done some testing of the preservation of input under Here is a link to a playground demonstrating my findings on the above. I will continue to do work on this, but hope you will be able to give some insight on the issue. |
re: |
Will bumping the clippy version in tests also affect the MSRV? I've also been having trouble running that lint on my local on stable (despite my stable being v1.78.0) and only having it recognised on nightly/beta. |
Nope, clippy is just a linter and doesn’t impact MSRV |
Sidebar: it doesn't look like we're impacted by this? https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hqbtIGFKIpU/m/cnE3pbueBgAJ |
OK, I played around with this a little:
|
Doesn't seem obvious to me. Filed #25 to track this. |
Thanks @bifurcation for that, I have updated all the tests and the clippy version in the workspace actions. |
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.
A few minor / aesthetic comments, but overall, this is getting pretty much done.
Build is green as of 3a205fd |
pushed changes re. @bifurcation comments |
@tarcieri I'm good with merging this if you are. |
We should probably cut a release with this fix. Should we file a RUSTSEC advisory as well? |
Released as v0.1.1 in #28 |
Updates the
compress
method to remove division of secret values by public value (q) as described in the kyberslash attackAlso updates tests to use inequality as per 4.7 in FIPS 203 draft to not use floating point arithmetic.