test: v0.2.0 signature vectors (ACVP ML-DSA, Wycheproof, RFC 8032, RFC 10073)

Official vectors for the signature tests, fetched 2026-11-25 at the commits
docs/02_signatures.md names: ACVP keyGen and sigGen at 2972def2, sigVer at
a7f283cd (after the ModifyZ correction), Wycheproof at 20b25694, the
composite-sigs repository at f0627ab, and RFC 8032 section 7.1.

Files under about 1 MB are kept whole. The larger ones are reduced to their
ML-DSA-65 groups and a few cases per group by make_subsets.py, which checks
each original's sha256 and drops only whole cases and groups; RFC 8032's
vectors are extracted from the RFC text by extract_rfc8032.py. SOURCES.md
records the URL, commit, git blob, original sha256 and the selection of
every file.
This commit is contained in:
2026-11-25 12:40:04 +01:00
parent c7294612ae
commit 5b9e3ee8fb
11 changed files with 7518 additions and 1 deletions
+46 -1
View File
@@ -1,6 +1,7 @@
# Known-answer vector sources
Every file here is kept byte-for-byte as published (`.gitattributes` marks the folder `-text`).
Every v0.1.0 file here is kept byte-for-byte as published; v0.2.0 adds three subsets and one
extraction, each made by a script in this folder (below). `.gitattributes` marks the folder `-text`.
The tests check each file's sha256 before using it, so a changed file fails the test instead of
silently changing what is verified. Fetched 2026-11-25.
@@ -18,6 +19,50 @@ URLs:
Only the ML-KEM-768 groups of the ACVP files are used (the files also hold 512 and 1024).
## v0.2.0: signatures (ML-DSA-65, Ed25519, the RFC 10073 composite)
Fetched 2026-11-25 with curl from `raw.githubusercontent.com` (RFC 8032 from `www.rfc-editor.org`),
each into its own empty directory, and handled as data. Every git blob id below matches the GitHub
API tree listing of the named commit. The tests check the sha256 of the file **in this folder**.
**Kept whole, byte for byte** (each under about 1 MB):
| File | sha256 (= the original) | Source |
|:--|:--|:--|
| `acvp-ml-dsa-keyGen-FIPS204-internalProjection.json` | `e67ee6540d40e11506c3c4e3b1f79fc1cefcd49820db99fc61f87cc8ba463baf` | NIST ACVP-Server `gen-val/json-files/ML-DSA-keyGen-FIPS204/internalProjection.json` at `2972def23bf9f3680c2c531561ed9bdd0f1086ad` (2026-07-20); 882,437 bytes, blob `ebf2104da140b725675aea4cc47676c0536421f7` |
| `wycheproof-ed25519_test.json` | `752d2ea7d7c6cf4736381b6cbacb61f8182b126ab7cd9b058f00c50084975536` | C2SP Wycheproof `testvectors_v1/ed25519_test.json` at `20b256949ea8f21a11375619b1825027ca0668bd` (2026-10-12); 126,699 bytes, blob `42d44cd7eca6003c7de611b6487c9cc57a124b38` |
| `wycheproof-mldsa_65_sign_seed_test.json` | `e26b2bb9ab8d45ed570ba6828c7e40b6fa3e1545bb8bc2c449c77531760133e0` | Wycheproof `testvectors_v1/mldsa_65_sign_seed_test.json` at the same commit; 886,331 bytes, blob `ff302e20c0b847e66fdcc7444cd63fc1cd7bf634` |
**Reduced subsets** (the original is larger than about 1 MB, or holds other algorithms). Made by
`make_subsets.py` in this folder, which refuses an original whose sha256 is not the one below,
keeps every selected test case and group header unchanged (whole cases and whole groups are
dropped, never fields), and writes two-space-indented JSON with LF endings; two runs gave identical
bytes. Command: `python -I make_subsets.py --acvp-siggen ... --acvp-sigver ... --wycheproof-mldsa-verify ... --composite ... --out .`
| File here (sha256) | Original (sha256, size, blob) | Selection |
|:--|:--|:--|
| `acvp-ml-dsa-sigGen-FIPS204-internalProjection.subset.json` (`ca1f1697d78b2280d854bbe0f8e86d3601695013f14e7bb4ce0604bc80ed2b4e`) | ACVP-Server `gen-val/json-files/ML-DSA-sigGen-FIPS204/internalProjection.json` at `2972def23bf9f3680c2c531561ed9bdd0f1086ad`: `72dcaf5f69853ca267ccd16af9cb40949786aca0fcfbf05d1ebeba132b93af22`, 8,971,659 bytes, blob `c090942249958e2071d56bf458b19e31256ded3e` | ML-DSA-65 groups without HashML-DSA (`preHash`): tgId 3, 9, 10 (deterministic) and 15, 21, 22 (hedged, with `rnd`); the first 3 cases of each by tcId (31-33, 121-123, 136-138, 211-213, 301-303, 316-318), 18 cases |
| `acvp-ml-dsa-sigVer-FIPS204-internalProjection.subset.json` (`d005dfeee9039f751299a6430fdac509b97ad9ab7d25b0b502dc9a2b59b7fb0c`) | ACVP-Server `gen-val/json-files/ML-DSA-sigVer-FIPS204/internalProjection.json` at **`a7f283cdc87d2d6dd93c1bac59e5622c5f9f8324`** (2026-07-31, after the ModifyZ correction): `47cdd6314c7f746d02421ffcba89d4dbc7bb875ac49e07a029fdfc26fba55437`, 4,533,178 bytes, blob `4c8caf12220e44dfa711fefe20e0285aaad844be` | ML-DSA-65 groups without `preHash`: tgId 3, 9, 10; the first case of each (testPassed, reason) pair, so one valid case and one of each of the four modifications (message, commitment, z, hint) per group, 15 cases |
| `wycheproof-mldsa_65_verify_test.subset.json` (`47fc788c0913dc41cfd0ef5bc9ed44c779a6bdeeb8b3700077fd572527c33870`) | Wycheproof `testvectors_v1/mldsa_65_verify_test.json` at `20b256949ea8f21a11375619b1825027ca0668bd`: `1ca235f61928421a173a171780beb00264ae9155dc33c52a11e1766cc7979034`, 1,664,284 bytes, blob `fa871a3c8c76b0cf871879243ad34fa2cbd79000` | All 25 groups; in each, at most 4 cases per (result, set of flags), first by tcId: 70 of 210 cases, every flag kept (most of the dropped ones are 40 `ManySteps` valid signatures and 44 `InfinityNormViolation` cases); `numberOfTests` is updated to 70 |
| `composite-sigs-testvectors-MLDSA65-Ed25519.subset.json` (`33311f63d2c5a21d5dd4b05eb864de38bd7572108b38de713a40312d2b893b34`) | `lamps-wg/draft-composite-sigs` `src/testvectors.json` at `f0627ab34acfe1aee0abce4bee91ed2b577eab76` (2026-01-07): `a60f697f9fd94c3cd5e4501a40c4396d9a9ffc7cf0f8a1ddd87dedbb46a7abf0`, 491,883 bytes, blob `eac3df25ca915882d3bcb3062835555787b02f5a` | The top-level `m` and `ctx`, and only the `tcId = "id-MLDSA65-Ed25519-SHA512"` entry of `tests` (unchanged, with its `x5c`) |
**Extracted from a text RFC** by `extract_rfc8032.py` in this folder (it checks the RFC's sha256,
skips page breaks, joins the hex lines and checks each stated length):
| File here (sha256) | Original | Selection |
|:--|:--|:--|
| `rfc8032-7.1-ed25519.json` (`fad8e499cdc3e0324a5b4a93cdbabb33f8aed1df73ecacfdb364f433b0fdf12b`) | <https://www.rfc-editor.org/rfc/rfc8032.txt>: `ed63657ff389301282b169b0abde9b5dd2c7e4d524fdfa5da6ff3094fc93c4c3`, 103,210 bytes | §7.1, the five Ed25519 vectors: TEST 1, 2, 3, 1024 and SHA(abc) |
URLs, with `<commit>` as in the tables:
- `https://raw.githubusercontent.com/usnistgov/ACVP-Server/<commit>/gen-val/json-files/ML-DSA-{keyGen,sigGen,sigVer}-FIPS204/internalProjection.json`
- `https://raw.githubusercontent.com/C2SP/wycheproof/<commit>/testvectors_v1/{ed25519_test,mldsa_65_sign_seed_test,mldsa_65_verify_test}.json`
- `https://raw.githubusercontent.com/lamps-wg/draft-composite-sigs/<commit>/src/testvectors.json`
Not used: the HashML-DSA (`preHash`) groups (Arcanum signs pure ML-DSA only); the ML-DSA-44 and
ML-DSA-87 groups; the full sigGen/sigVer/verify files (their sha256 above lets anyone check the
subsets against them by rerunning the script).
## Vectors kept in test source
| Test | Source |