A formally verified ML-KEM library, liboqs and NIST's own test vectors agree byte for byte
On 60 NIST test vectors, the verified Rust library, liboqs and NIST's expected answers agree byte for byte.
ML-KEM is the quantum-resistant key-exchange standard the United States standards body, NIST, has published. The lab ran the same NIST test vectors through two separately written implementations, a formally verified Rust library and the widely used liboqs library, and compared every output byte with NIST's expected answers.
What it shows
NIST publishes test vectors for ML-KEM: inputs with the exact outputs a correct implementation must produce. The lab ran one set of these vectors through two libraries. One is a Rust library from Cryspen whose core code is formally verified by its authors. The other is liboqs from the Open Quantum Safe project, whose ML-KEM code comes from a separate implementation. Every output from both libraries matched NIST's expected bytes.
Because the two libraries were written separately, their agreement is a real check that they interoperate, not one library checked against itself.
Why it matters, and to whom
This is for teams adopting quantum-resistant key exchange in products, Wi-Fi among them, who need to know that the libraries they might ship give identical results. A byte-for-byte match on NIST's own vectors is the first thing such a team checks.
How it was checked
The evidence file names the command that runs the comparison and records its run on a clean copy of the code.
Testing the check
The lab tested the check by breaking it on purpose. It changed one character of NIST's expected shared secret for one vector, and the check failed. In a second test it deleted one vector, so that the count no longer matched the claim, and the check failed again.
What it does not claim
- It does not claim that the idea is new. The Rust library already tests itself against NIST's vectors, and Frost has published liboqs against NIST's test-vector service together with full agreement between several implementations. When each library matches NIST's answers on the same vectors, their agreement with each other follows. This result is a re-run of known checks on one set of vectors.
- It does not claim to re-run the formal verification. That proof is the Rust library's authors' work; the lab's limits say the whole-library proof step was not re-run, and what is claimed is byte agreement.
- It does not claim a certification. Matching published test vectors is not a validation by a certifying body.
How to reproduce it
The evidence file names the command and the commit of the lab's code. A stronger test would run every published vector set, including key generation and decapsulation with malformed inputs, through both libraries, and add a third, separately written implementation.
Prior art
- Frost, "A Reproducibility Protocol for Cross-Implementation Evaluation of Post-Quantum ACVP Test Vectors": publishes liboqs against NIST's test-vector service and full agreement between several implementations
- Bhargavan, Kiefer and Tamvada, "Verified ML-KEM (Kyber) in Rust" (Cryspen): how the Rust library is verified, by extracting F* code with the hax tool
- Cryspen, libcrux ML-KEM test of NIST's vectors: the library's own test against NIST's vectors
- Open Quantum Safe, "ML-KEM" algorithm page: names the source of liboqs's ML-KEM code, which is separate from the Rust library
Evidence
- The evidence file for this result
- The published claim, with its limits
- All our published files, each with a fingerprint you can check
Related results across the group
- A proof that, in the lab's model of an access point running its admission module, sign-in memory stays bounded however many devices connect
- The chip netlist whose area and delay are published matches its design: a formal equivalence proof
- Searching for combined Wi‑Fi sign-in attacks without hints: a budgeted search and a complete one