test: the six mandatory tests, pinned KAT vectors, fuzz target and cargo-deny config (written before the code)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Known-answer vector sources
|
||||
|
||||
Every file here is kept byte-for-byte as published (`.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.
|
||||
|
||||
| File | sha256 | Source |
|
||||
|:--|:--|:--|
|
||||
| `acvp-ml-kem-keyGen-FIPS203-internalProjection.json` | `d7a62a2c3476957f56dd8d24f9004ea6776ccfe995ffe71a65bb9506dc9c7b1b` | NIST ACVP-Server, `gen-val/json-files/ML-KEM-keyGen-FIPS203/internalProjection.json` at commit `975de31eb83d87039ec88934fdc47d8c312b892d` (2026-08-12). Git blob `99973426c8dd03f227ace6d7ac917ba4443e2f27` matches the GitHub API listing. |
|
||||
| `acvp-ml-kem-encapDecap-FIPS203-internalProjection.json` | `a556952ce869bb89c3a3196a701dad89647c193a34c86eafb61a9d710d5b810f` | NIST ACVP-Server, `gen-val/json-files/ML-KEM-encapDecap-FIPS203/internalProjection.json` at the same commit. Git blob `73692fe52abe2f937b7884baa46475c77c68a1d3` matches. |
|
||||
| `xwing-test-vectors.json` | `409efe197550b22985b4a0419418a0c5f2c2b193426c55bd998399ec8d3e614d` | The X-Wing draft authors' repository, `dconnolly/draft-connolly-cfrg-xwing-kem`, `spec/test-vectors.json` at commit `984c2f7a93b8f8d8f8073ebb53f9f4ce50b5babd` (2026-09-23, the day draft -11 was posted). The same three vectors are in Appendix C of draft -11 (spot-checked: seed and ss of vectors 1–2, ss of vector 3), and, pretty-printed, in RustCrypto `x-wing` 0.1.1 `tests/test-vectors.json` (identical after removing whitespace). |
|
||||
|
||||
URLs:
|
||||
|
||||
- <https://github.com/usnistgov/ACVP-Server/tree/975de31eb83d87039ec88934fdc47d8c312b892d/gen-val/json-files>
|
||||
- <https://github.com/dconnolly/draft-connolly-cfrg-xwing-kem/blob/984c2f7a93b8f8d8f8073ebb53f9f4ce50b5babd/spec/test-vectors.json>
|
||||
- <https://www.ietf.org/archive/id/draft-connolly-cfrg-xwing-kem-11.txt>, Appendix C
|
||||
|
||||
Only the ML-KEM-768 groups of the ACVP files are used (the files also hold 512 and 1024).
|
||||
|
||||
## Vectors kept in test source
|
||||
|
||||
| Test | Source |
|
||||
|:--|:--|
|
||||
| X25519 scalar multiplication, two vectors (RFC 7748 §5.2) | RFC 7748, <https://www.rfc-editor.org/rfc/rfc7748.txt>; the same bytes are in `x25519-dalek` 3.0.0 `tests/x25519_tests.rs` |
|
||||
| X25519 iterated, 1 and 1,000 iterations (RFC 7748 §5.2) | RFC 7748 §5.2 |
|
||||
| X25519 Diffie–Hellman, Alice and Bob (RFC 7748 §6.1) | RFC 7748 §6.1; also in `x25519-dalek` 3.0.0 `tests/x25519_tests.rs` |
|
||||
|
||||
Not run: the RFC 7748 1,000,000-iteration vector (minutes in a debug build).
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user