[crypto] ML-DSA-87: forward number-theoretic transform (2/24)#29333
Merged
nasahlpa merged 1 commit intolowRISC:masterfrom Feb 19, 2026
Merged
[crypto] ML-DSA-87: forward number-theoretic transform (2/24)#29333nasahlpa merged 1 commit intolowRISC:masterfrom
nasahlpa merged 1 commit intolowRISC:masterfrom
Conversation
e169140 to
f5c981a
Compare
etterli
reviewed
Feb 18, 2026
Contributor
etterli
left a comment
There was a problem hiding this comment.
Looks nice, especially due to the nice modularization.
Comment on lines
+733
to
+734
| here. Make sure that these are not placed at the end of the .data section in | ||
| the ELF file to guarantee that correct placement of the stack. */ |
Contributor
Author
There was a problem hiding this comment.
You can specify the order the input files to gnu-as, for example:
otbn_sim_test(
name = "mldsa87_keygen_wycheproof_g1_test",
srcs = mldsa87_srcs + [
# This is a top-level OTBN application test.
# Make sure the memory file is placed after all the sources.
"//sw/otbn/crypto/mldsa87:mldsa87_keygen.s",
"//sw/otbn/crypto/mldsa87:mldsa87_keygen_mem.s",
"mldsa87_keygen_test.s",
],
testcase = "mldsa87_keygen_wycheproof_g1_test.hjson",
)
Contributor
There was a problem hiding this comment.
Ok. Maybe that the location of mldsa87_ntt.s must not be there is something worth to add to the readme?
Contributor
Author
There was a problem hiding this comment.
Right. It should be there. Let me fix it.
etterli
reviewed
Feb 18, 2026
bb70488 to
8ef75ba
Compare
etterli
approved these changes
Feb 18, 2026
nasahlpa
approved these changes
Feb 19, 2026
Member
nasahlpa
left a comment
There was a problem hiding this comment.
Thanks for the comprehensive documentation, this makes it easier to review :-)
This is an implementation of the forward number-theoretic transform over the polynomial ring Z_q[X] / (X^256 + 1) using the 512-th root of unity 1753. Signed-off-by: Andrea Caforio <andrea.caforio@lowrisc.org>
8ef75ba to
7b54457
Compare
This was referenced Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an implementation of the forward number-theoretic transform over the
polynomial ring
Z_q[X] / (X^256 + 1)using the 512-th root of unity 1753.Design rationale (from
mldsa87_ntt.s):This is a series of PRs that in their composition result in FIPS-204-compliant OTBN implementation of ML-DSA-87 verify.
Resources
Preamble
[crypto] ML-DSA-87 verify (1/24) #29299docNumber-theoretic transform
NTTINTTPolynomial arithmetic
poly_add,poly_sub,poly_mulpoly_mul_addXOF
xof_init,xof_poll,xof_finishxof_absorbxof_squeezeRounding
shift_leftdecomposeReduction
reduceInfinity norm
norm_checkSampling
rej_ntt_poly,expand_asample_in-ballchallenge_hashEncoding
decode_zdecode_t1decode_hintencode_w1Vector operations
sig_decodenorm_check_zA*z,c * t1,Az - ct1use_hintEpilogue
app