-
Notifications
You must be signed in to change notification settings - Fork 7
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
Bring NTT sections of ML-KEM up to gold standard #147
Labels
Comments
This was referenced Oct 3, 2024
marsella
added a commit
that referenced
this issue
Oct 15, 2024
marsella
added a commit
that referenced
this issue
Oct 15, 2024
This doesn't replace all uses of `Z_q_256`, but it gets all the easy ones.
marsella
added a commit
that referenced
this issue
Oct 15, 2024
This replaces `'`s with suffixes explictly describing what type of data each NTT function operates over.
marsella
added a commit
that referenced
this issue
Oct 15, 2024
This adds some documentation around the NTT module explaining where the spec says it's allowed to choose any version of their algorithms that are the same.
marsella
added a commit
that referenced
this issue
Oct 16, 2024
Several properties didn't have correct `repl` commands in the docstrings.
marsella
added a commit
that referenced
this issue
Oct 16, 2024
marsella
added a commit
that referenced
this issue
Oct 16, 2024
- Adds docs to BitRev and contains its behavior a bit better - Adjust spacing, naming, etc in MultiplyNTTs and BaseCaseMultiply
marsella
added a commit
that referenced
this issue
Oct 16, 2024
This doesn't make them spec adherent but it simplifies the section a bit.
marsella
added a commit
that referenced
this issue
Oct 17, 2024
aims to match the spec more closely, as much as that's possible with the built-in limitations of cryptol.
marsella
added a commit
that referenced
this issue
Oct 17, 2024
marsella
added a commit
that referenced
this issue
Oct 31, 2024
marsella
added a commit
that referenced
this issue
Oct 31, 2024
This doesn't replace all uses of `Z_q_256`, but it gets all the easy ones.
marsella
added a commit
that referenced
this issue
Oct 31, 2024
This replaces `'`s with suffixes explictly describing what type of data each NTT function operates over.
marsella
added a commit
that referenced
this issue
Oct 31, 2024
This adds some documentation around the NTT module explaining where the spec says it's allowed to choose any version of their algorithms that are the same.
marsella
added a commit
that referenced
this issue
Oct 31, 2024
Several properties didn't have correct `repl` commands in the docstrings.
marsella
added a commit
that referenced
this issue
Oct 31, 2024
marsella
added a commit
that referenced
this issue
Oct 31, 2024
- Adds docs to BitRev and contains its behavior a bit better - Adjust spacing, naming, etc in MultiplyNTTs and BaseCaseMultiply
marsella
added a commit
that referenced
this issue
Oct 31, 2024
This doesn't make them spec adherent but it simplifies the section a bit.
marsella
added a commit
that referenced
this issue
Oct 31, 2024
aims to match the spec more closely, as much as that's possible with the built-in limitations of cryptol.
marsella
added a commit
that referenced
this issue
Oct 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now there is a bunch of stuff related to NTT (Section 4.3) in the main body of ML-KEM. There are naive and fast versions of the NTT algorithm (with a "dispatcher" to hard-code which one to use), as well as 1D and 2D applications. We should try to contain this a little more intentionally.
There are also some places where the NTT-related code doesn't obviously align with the spec.
NTT
over vectors andNTTInv
over single elements and vectors. RenameNTT'
andNTT
toNTT
andNTT_Vec
, and similarly forNTTInv
(related: Bring encoding and compression functions in ML-KEM up to gold standard #144 discusses the naming choice)NTT
,NTT_Vec
,NTTInv
,NTTInv_Vec
, and, if they're included,MultiplyNTTs
and theR_q
/T_q
types.ParametericNTT
) to more obviously match the spec.BitRev7
is supposed to operate over 7-bit vectors but it currently operates over 8-bit vectors. Try to align this better with the spec.BitRev7
inParametricNTT
is different from what's in the spec. Fix it or add a comment explaining why they're equivalent.MultiplyNTTs
better with the spec. E.g. the exponent for zeta is not the same as what's in the spec. Fix it or add a comment explaining why they're equivalent.The text was updated successfully, but these errors were encountered: