← Back to section · Standards & Specifications

Test Vectors Have Versions Too: From Submission KATs to ACVP Validation

Whether an implementation is right is decided by test vectors — but the vectors themselves change with the standard. Why submission-era KAT files cannot validate a final-standard implementation, how NIST's ACVP protocol organizes validation vectors for ML-KEM/ML-DSA/SLH-DSA, and what the intermediate-values documents solve.

Published 22 November 2026 · 5 min read · PQ Frontier

Test Vectors Have Versions Too: From Submission KATs to ACVP Validation
AI-generated site artwork
Video explainer · Version Comparison: signatures across versions

There is no “looks right” for cryptographic implementations — only “passes the test vectors”. Yet in the post-quantum migration, a pitfall that trips up implementer after implementer is that test vectors themselves have versions. Use the wrong version’s vectors and a correct implementation gets judged wrong, while a wrong one may “pass”. This article traces how vectors evolved from the submission era to the final standards, and what validating an ML-KEM, ML-DSA, or SLH-DSA implementation correctly looks like today.

Submission-era KATs: snapshots bound to the submission packages

During the NIST competition, every submission package came with known-answer test (KAT) files: given fixed seeds, they list the public keys, private keys, ciphertexts, or signatures that should result. They were part of the evaluation process, letting NIST and the community check reference-implementation behavior. But KATs faithfully record the submission algorithms: in Kyber’s KATs, key generation follows the expansion without parameter-set domain separation; in Dilithium’s KATs, signatures carry no context domain separation.

The moment the final changes landed, those vectors expired. The failure mode is deceptively confusing: validate an ML-KEM implementation against Kyber KATs and the very first hash output of key generation already mismatches, after which everything is wrong — it looks like a hopeless implementation when in fact only the vector version is off. The reverse risk is more insidious: an implementer who bends the code to “make the tests pass” against old vectors will have reverted the implementation to submission behavior, diverging from the final standard.

The authoritative channel of the final era: ACVP

After finalization, the authoritative validation channel is NIST’s ACVP (Automated Cryptographic Validation Protocol). It works as a structured exchange between a server and the module under test: the module first registers the algorithms, parameter sets, and modes it supports; the server generates a targeted vector set; the module computes and returns responses; the server judges pass or fail. ML-KEM key generation/encapsulation/decapsulation, ML-DSA key generation/signing/verification, and the SLH-DSA counterparts each have their own test types, and the cases reach down to the internal-algorithm level — which is exactly why the finals wrote internal algorithms with explicit randomness inputs into the standards: without that layer, the server could not drive a module with fixed inputs and reproduce expected outputs.

Note that ACVP cases are not a static file but are generated on demand from the registration information: two modules supporting the same algorithm do not receive identical case sets, because the server tailors and combines tests according to each module’s declared parameter sets, modes, and capabilities. This stands in sharp contrast to the submission era’s “one KAT file for everyone” model — it rules out implementers overfitting to a fixed vector list, and makes “passed” genuinely correspond to the full scope a module claims to support. For signature algorithms, the cases also distinguish generation styles such as deterministic versus randomized signing, driving the internal interfaces item by item — which is why the finals had to specify the internal algorithms’ input surfaces in such detail.

Passing ACVP is a component of a FIPS 140-3 module certificate. In other words, the ultimate commercial evidence for “conforms to FIPS 203” is not a vendor’s self-test report but ACVP runs plus laboratory review. This also explains why vector versions must correspond strictly to standard versions: ACVP’s case-generation logic is written against the final text.

Intermediate-values documents: prying open the black box

Vectors that show only final outputs have a natural defect: when the output mismatches, the implementer does not know which step went wrong. To address this, NIST published intermediate-values documents for the three finals, giving the intermediate results of key steps inside the internal algorithms: what the seed expansion produces, what matrix sampling yields, what the NTT transform outputs, and so on. Debugging becomes a walk along the steps, comparing as you go; the first step that deviates is where the problem lives — perhaps byte order, perhaps the sampler’s rejection logic, perhaps bit ordering in an encoding.

Intermediate values and ACVP vectors are complementary: the former serve development debugging, the latter formal validation, and both are strictly bound to the final text. There is a records-management moral here too: vector files should be archived and labeled together with the version of the standard text they belong to. A stray “pqc-kat.json” of unknown provenance lying in a repository is not much better than having no tests at all.

Engineering practice: manage vectors as versioned dependencies

In day-to-day engineering, test vectors deserve the same version management discipline as library dependencies. First, pin the source and version: annotate every vector set in the test suite with which text it comes from (submission KATs, ACVP cases, or the intermediate-values documents) and which parameter set it covers; vectors of unknown provenance should be removed from the regression set outright. Second, when a test fails, question the version before the code: put “does the vector version match the implementation’s target version?” at the top of the debugging checklist — this single item saves enormous time otherwise spent hunting bugs in a correct implementation. Third, maintain both vector tracks during the dual-track period: while libraries and systems support submission and final versions side by side (for example, to stay compatible with experimental-era deployments), regression tests must label which version each case verifies, lest an all-green run conceal that one of the versions has quietly drifted from its text. Fourth, watch for ACVP-side updates: ACVP test logic is revised as standards receive errata and implementation guidance evolves, so validation schedules should leave slack for vector-side change rather than being nailed to a single passing run.

Summary

Test vectors are the shadow of a standard: revise the standard and the shadow must be redrawn. Submission KATs belong to competition history, ACVP vectors to the compliance present, and intermediate values to the debugging toolbox. Before citing any vector set, an implementer must first answer one question: which version of the text does it correspond to? If that cannot be answered, any number of vectors is just noise. In the next article we move from the validation laboratory to live protocols, and look at how implementers handle version differences in real systems.

Tags: Test VectorsACVPKATFIPS 140-3