← Back to section · Research Resources

Test Vectors and Benchmark Code: ACVP, KAT, and Cross-Platform Timing Frameworks

Test vectors settle whether an implementation is right; benchmark frameworks settle how fast it is. This guide maps where NIST's ACVP vectors, per-algorithm KAT files, SUPERCOP, and pqm4 live, and how to use them correctly.

Published 22 November 2026 · 6 min read · PQ Frontier

Test Vectors and Benchmark Code: ACVP, KAT, and Cross-Platform Timing Frameworks
AI-generated site artwork
Video explainer · Open Source Code Index: from repositories to trusted code

Two kinds of resources, two different questions

The most easily confused items in a code index are test vectors and benchmark code: the former answer “is the implementation correct”, the latter “how fast is it”, and their repository shapes and usage patterns are entirely different. Test vectors are frozen input–output pairs with documentation of how they were generated; benchmark code is a measurement harness that prescribes how to time, how to exclude noise, and how to summarize results. A researcher who conflates the two when citing others’ conclusions — comparing, say, the speed from an implementation’s bundled demo program against framework numbers from a paper — produces conclusions that were never comparable to begin with. This guide walks through the authoritative sources on both lines separately.

Official test vectors: ACVP and standard-supplied material

After an algorithm is standardized, the authoritative source of test vectors is NIST’s Automated Cryptographic Validation Protocol (ACVP). In its public code repositories, NIST publishes the ACVP protocol specification, a demonstration server, and test vector sets generated for standards including FIPS 203, FIPS 204, and FIPS 205; anyone can download the vectors, run their own implementation locally, and compare intermediate values and outputs item by item. This is the public version of the same mechanism the CMVP validation process uses, which makes it the closest thing to an official reference point.

Three points matter when using ACVP vectors. First, version correspondence: vector sets are updated as standard texts and the protocol are revised, so record the vector set’s version or retrieval date when downloading. Second, how to read coverage: vectors are usually grouped by parameter set and operation type, and passing one group proves only that group’s behavior — reports should state which groups were covered. Third, exploiting intermediate values: good vector sets give not only final outputs but key intermediate states, and comparing intermediates first when debugging localizes a fault to a single step instead of merely telling you “the result is wrong”.

In the pre-standardization phase, the main source of test vectors was the KAT files bundled in each submission package (see this section’s submission package guide); they are the same in nature, with authority deriving from the submission teams. Vectors from the two phases must not be mixed: algorithms had encodings and derivation procedures changed during standardization, and checking a new implementation against an old KAT yields nothing but a screen full of mismatches.

Benchmark frameworks: SUPERCOP, pqm4, and library-bundled timing

Cross-implementation speed comparison needs a public framework. SUPERCOP is a benchmarking suite long used in the cryptography community: it measures the same operation across many implementations on one machine under uniform rules and publishes complete results from each run; when researchers cite an algorithm’s speed, SUPERCOP data is among the most common sources. Its value lies in uniform rules and publicly archived results; its weakness is an update cadence that lags behind new algorithms’ iteration, so check which implementation version the data corresponds to.

The representative framework on the embedded side is pqm4: it targets ARM Cortex-M4 microcontrollers, collects post-quantum implementations and measurements for that platform, and prescribes uniform methods for timing and stack-usage measurement. Whenever the question is whether an algorithm can run on an IoT-class device, pqm4-style data is the first reference. On the desktop and server side, besides SUPERCOP, the timing programs bundled with aggregate libraries (such as liboqs’s speed test tools) have the lowest barrier to use, but they compare only implementations within the same library and are heavily influenced by build options, so cross-paper citations must state the build configuration.

In recent years, dedicated benchmark repositories for post-standardization algorithms have also appeared, maintained by communities or institutions, collecting cycle counts, key and ciphertext sizes, and similar data for implementations on uniform hardware. These repositories update quickly, but their maintainers and methodological transparency vary; before citing one, check whether its measurement methodology is documented completely.

Measurement traps: why numbers so often fail to match

The most common sources of divergence when reproducing benchmark numbers are four. First, the implementation path: a portable implementation and a vector-instruction-optimized implementation of the same algorithm can differ several-fold in speed, and a report that names the algorithm but not the path has effectively said nothing. Second, build options: optimization level, whether the target instruction set is enabled, and linking choices all move results significantly. Third, timing methodology: wall-clock time versus processor cycle counts, and measuring on a busy shared machine versus a dedicated one, can flip conclusions entirely; rigorous frameworks report cycle counts over multiple runs with summary statistics. Fourth, low-frequency operations such as key generation being measured too few times, so random fluctuation is mistaken for a conclusion.

One further caveat applies specifically to cryptographic implementations: constant-time behavior. Benchmark frameworks measure average speed, but security also requires that execution time not vary with secret data, and the community maintains dedicated timing-leak detection tools (of the statistical-testing dudect kind) to assess exactly this. An implementation that is fast enough but leaks through timing is unusable in the cryptographic sense, so when citing benchmark data, also note whether the implementation declares and verifies constant-time behavior.

Building vectors and benchmarks into your own workflow

For readers writing implementations, the advice is to move both kinds of resources to the front of the development process rather than bolting them on at the end. Use test vectors as the regression anchor during development: after changing any operation, first run the vector groups for the affected parameter sets, and stop to investigate the moment something goes red, so errors do not amplify layer by layer through later code. Use a benchmark framework as a periodic performance sentinel: keep one fixed measurement script in your own repository, and whenever you claim to have “optimized an operation”, attach a before-and-after comparison from the same machine and configuration. Many open-source projects are organized exactly this way — their repositories hold vector-checking scripts and benchmark scripts side by side — and when taking over or reviewing such a project, the completeness of these two things is a good first gauge of its engineering quality.

Citation norms

When citing test vectors, give the vector set’s name, version, and retrieval date; when citing benchmark numbers, give the four elements: framework name, machine configuration, implementation path, and build options. Performance conclusions meeting these conditions are the only ones qualified to be checked by others. Conversely, an unsourced claim that “algorithm A is some percent faster than algorithm B” — whether from a paper or vendor material — should first be interrogated against the checklist in this guide before being believed.

Tags: test vectorsACVPbenchmarkingSUPERCOP