Skip to content

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

Evidence

Related results across the group

All results from OrbitalProof · The OrbitalProof home page

How we show numbers

Every result figure links to the file it comes from. See our published files