Skip to content

ML-DSA: add ACVP specification rejection vectors (§6.1.2 Table 1, Table 2).#207

Merged
cpu merged 2 commits intoC2SP:mainfrom
cpu:cpu-mldsa-acvp-rejection-vecs
Jan 27, 2026
Merged

ML-DSA: add ACVP specification rejection vectors (§6.1.2 Table 1, Table 2).#207
cpu merged 2 commits intoC2SP:mainfrom
cpu:cpu-mldsa-acvp-rejection-vecs

Conversation

@cpu
Copy link
Member

@cpu cpu commented Jan 19, 2026

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):

  • 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.

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.

cpu added 2 commits January 19, 2026 14:17
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.
@cpu cpu self-assigned this Jan 19, 2026
@cpu
Copy link
Member Author

cpu commented Jan 26, 2026

@sgmenda Do you have some time you could spend looking at this branch, or giving it a spin downstream?

@sgmenda
Copy link
Contributor

sgmenda commented Jan 26, 2026

@cpu of course, blocked some time later today to review.

Copy link
Contributor

@sgmenda sgmenda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks so much for crafting these vectors :shipit:

@cpu
Copy link
Member Author

cpu commented Jan 27, 2026

Thanks for taking a look! 🙇

@cpu cpu merged commit ad6ac18 into C2SP:main Jan 27, 2026
1 check passed
@cpu cpu deleted the cpu-mldsa-acvp-rejection-vecs branch January 27, 2026 19:59
cpu added a commit to cpu/wycheproof that referenced this pull request Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants