ML-DSA: add ACVP specification rejection vectors (§6.1.2 Table 1, Table 2).#207
Merged
ML-DSA: add ACVP specification rejection vectors (§6.1.2 Table 1, Table 2).#207
Conversation
The NIST ACVP specification for ML-DSA includes a table with "Known Answer Tests for Rejection Cases". These Known Answer Tests exercise all rejection paths in FIPS 204 Algorithm 7 (ML-DSA.Sign_internal): - ML-DSA-44: `z`, `r0`, `ct0`, `h` rejections - ML-DSA-65/87: `z`, `r0`, `h` rejections Notably, the `ct0` rejection (`||ct0||∞ ≥ γ2`) is unique to ML-DSA-44.
The NIST ACVP specification for ML-DSA includes a table with "Known Answer Tests for Number of Rejection Cases". These tests verify at least 32 rejections occur, detecting implementations that abort early and potentially leak information about the underlying key.
Member
Author
|
@sgmenda Do you have some time you could spend looking at this branch, or giving it a spin downstream? |
Contributor
|
@cpu of course, blocked some time later today to review. |
sgmenda
approved these changes
Jan 27, 2026
Contributor
sgmenda
left a comment
There was a problem hiding this comment.
lgtm, thanks so much for crafting these vectors ![]()
Member
Author
|
Thanks for taking a look! 🙇 |
This was referenced Jan 30, 2026
Merged
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.
Summary
This branch integrates ML-DSA test vectors from the two tables provided in draft-celi-acvp-ml-dsa §6.1.2 for signature generation rejection cases.
Updates #193
mldsa: add draft-celi-acvp-ml-dsa table 1 vectors
The NIST ACVP specification for ML-DSA includes a table with "Known Answer Tests for Rejection Cases".
These Known Answer Tests exercise all rejection paths in FIPS 204 Algorithm 7 (
ML-DSA.Sign_internal):z,r0,ct0,hrejectionsz,r0,hrejectionsNotably, the
ct0rejection (||ct0||∞ ≥ γ2) is unique to ML-DSA-44.I wrote a Go program to generate/verify the Wycheproof formatted vector data using the Go stdlib-internal ML-DSA impl, and then wrote a small Python script w/ the help of Claude to merge the new vector data into the existing files. Source code for both is here.
mldsa: add draft-celi-acvp-ml-dsa table 2 vectors
The NIST ACVP specification for ML-DSA includes a table with "Known Answer Tests for Number of Rejection Cases".
These tests verify at least 32 rejections occur, detecting implementations that abort early and potentially leak information about
the underlying key.
I used the same generate + merge approach for Table 2 as Table 1, source code is here.