PQCImplement-Bench: A Real-World Test of LLMs Implementing Post-Quantum Cryptography Standards

A new benchmark, PQCImplement-Bench, evaluates whether coding agents can turn NIST post-quantum cryptography standards into compliant patches for existing libraries.
PQCImplement-Bench is the first benchmark to systematically examine whether coding agents can implement the NIST post-quantum cryptography standards (FIPS 203-205) as usable patches for existing cryptographic libraries. It contains 15 tasks drawn from 14 real PRs across nine repositories, covering seven languages. The benchmark uses dual-track scoring: repository tests measure engineering integration, and NIST test vectors measure standard conformance. Evaluating three models in the OpenHands environment found that with only the problem statement, GPT-6.1-Sol's test-vector pass rate was just 29.0%; after adding interface specifications, it rose to 100%, and the repository test pass rate rose from 18.9% to 93.7%. The gap between models is significant, with GLM-5.3-FlashX nearly unable to complete the tasks. The core conclusion is that interface specifications, rather than cryptographic knowledge, are the key lever for current performance improvements.

Once large-scale quantum computers arrive, the public-key cryptography protecting today's communications will be broken outright. NIST has standardized ML-KEM, ML-DSA, and SLH-DSA (FIPS 203-205) as replacements, leaving the engineering community with the remaining question: how do cryptographic libraries turn these standards into mergeable patches? A new paper's PQCImplement-Bench targets exactly this gap—it aims to answer a question that has not been systematically examined before: can coding agents turn a standards document into a genuinely usable, spec-compliant implementation in an existing library?
Why a Dedicated Benchmark Is Needed
Most existing code-generation evaluations stay at the function or problem level, with clear inputs and outputs and clean context. Embedding a cryptographic standard into a mature open-source library is a fundamentally different kind of work: it requires understanding the repository's existing abstraction layers, interface conventions, and testing style, while also ensuring the implementation matches NIST test vectors byte for byte. These two things are not equivalent—code that runs in the repository does not mean it conforms to the standard; conforming to the standard does not mean it fits into the existing engineering structure.
The core design of PQCImplement-Bench is to evaluate these two kinds of correctness separately. According to the paper, it contains 15 tasks drawn from 14 real pull requests across nine code repositories, covering seven programming languages. Each task provides a pre-change repository snapshot plus a reviewed requirements and interface specification. This sourcing approach means the tasks are not constructed out of thin air but originate from changes that have actually occurred in real development.
NIST Post-Quantum Cryptography Standards: In August 2024, the U.S. National Institute of Standards and Technology (NIST) officially released three post-quantum cryptography standards: FIPS 203 (ML-KEM, a module-lattice-based key-encapsulation mechanism), FIPS 204 (ML-DSA, a module-lattice-based digital signature algorithm), and FIPS 205 (SLH-DSA, a stateless hash-based signature algorithm). These three standards stem from NIST's post-quantum cryptography standardization process launched in 2016, aiming to defend against the threat quantum computers pose to traditional public-key cryptography such as RSA and ECC. ML-KEM evolved from CRYSTALS-Kyber, ML-DSA derives from CRYSTALS-Dilithium, and SLH-DSA is based on SPHINCS+. The standard texts not only define the mathematical algorithms but also include key encoding, parameter sets, and test vectors, serving as the authoritative basis for cryptographic library implementations.
Dual-Track Scoring: Repository Tests and NIST Test Vectors
The benchmark uses two independent test oracles for scoring, a design worth discussing separately.
The first oracle is the repository's own relevant tests. It measures whether the patch works correctly in the existing codebase, does not break existing behavior, and is compatible with the project's engineering conventions. The second oracle is the NIST test vectors corresponding to each standard, which measure the implementation's conformance to the standard, independent of the repository itself.
The benefit of separate scoring is that it can pinpoint the type of failure. A patch may pass the repository tests yet get one byte wrong in a test vector, or it may be perfect on the standard vectors yet fail to compile in the repository. Mixing the two into a single score loses this information.
NIST test vectors (Known Answer Tests, KAT) are test data files accompanying cryptographic standards, typically containing a set of deterministic inputs (such as seeds, keys, and messages) and the corresponding expected outputs (such as ciphertexts, signatures, and shared secrets). Implementers must compute outputs with their own code and compare them byte by byte against the vectors; only a full match counts as a pass. KAT is an industry convention for conformance testing of cryptographic implementations, and NIST has published official KAT files for FIPS 203-205. Unlike repository unit tests, KAT does not care about code structure or interface style; it only checks whether the algorithm output is exactly consistent with the standard, so it can independently measure the dimension of "standard conformance."
Experimental Results: The Leverage Effect of Interface Specifications
The paper evaluated three models in the OpenHands environment: GPT-6.1-Sol, Kimi K3.1 Pro, and GLM-5.3-FlashX. The results show a distribution with plenty of room for interpretation.
When given only the problem statement, GPT-6.1-Sol achieved an average pass rate of 29.0% on test vectors and 18.9% on repository tests. This shows that with natural-language descriptions alone, the model's ability to reproduce cryptographic standards is quite limited.
After adding interface specifications, the situation changed markedly. GPT-6.1-Sol's test-vector pass rate rose to 100%, Kimi K3.1 Pro reached 55.8%, and GLM-5.3-FlashX reached 6.7%. On repository tests, the three scored 93.7%, 52.4%, and 0.0%, respectively.
The most direct takeaway from these numbers is: models do not lack cryptographic knowledge; what they lack is precise constraints on the target repository's interfaces and structure. Once the interface specification makes clear "what it should look like," the most capable model can fully implement the standard. Conversely, GLM-5.3-FlashX is near zero on both dimensions simultaneously, indicating that this type of task has a clear capability threshold that cannot be compensated for by prompt engineering alone.
OpenHands is an open-source AI software engineering agent framework (formerly OpenDevin) that provides a sandboxed environment for code editing, command execution, and test running, commonly used to evaluate LLMs' autonomous programming capabilities in real repositories. In this study, OpenHands serves as the unified agent runtime, meaning that after receiving a task, the model can autonomously explore the repository snapshot, modify files, and run tests; its performance reflects end-to-end engineering capability rather than single-turn code-generation quality. This also suggests that evaluation results are closely tied to the scaffolding design of the agent framework, and different frameworks may yield different numbers.
Implications for Engineering Practice
The value of this benchmark is not just in the rankings. It fixes "standard conformance" and "engineering integration" as two separately measurable dimensions, providing a reusable evaluation framework for future research. The paper states that the dataset and evaluation framework have both been released for subsequent research.
From a practical development perspective, the results suggest a pragmatic path: when having agents implement high-risk tasks such as cryptographic standards, investing effort in writing precise interface specifications yields far higher returns than repeatedly tweaking prompts. An interface specification is essentially making human understanding of the repository explicit, and that is precisely what current models lack most.
At the same time, limitations should be noted. The scale of 15 tasks and nine repositories is still limited, and the coverage is reproduction of existing PRs rather than entirely new designs; evaluation was conducted only in the OpenHands environment, and performance may differ under other agent frameworks. The version codenames in the model names also indicate that these results are highly time-sensitive; as models iterate, absolute numbers will change rapidly, and what remains truly stable is the structural finding that "interface specifications bring order-of-magnitude improvements."
FAQ
What does PQCImplement-Bench evaluate? It evaluates whether coding agents can generate usable and compliant patches for existing cryptographic libraries based on the NIST post-quantum cryptography standards (FIPS 203-205).
Why use two test oracles? Repository tests measure engineering integration, while NIST test vectors measure standard conformance; only by separating the two can the specific cause of a patch failure be pinpointed.
Why do interface specifications have such a large impact? They make the target repository's structural and interface constraints explicit, compensating for the model's insufficient understanding of the specific codebase.
One-line Summary
A new benchmark, PQCImplement-Bench, evaluates whether coding agents can turn NIST post-quantum cryptography standards into compliant patches for existing libraries.
Paragraph Summary
PQCImplement-Bench is the first benchmark to systematically examine whether coding agents can implement the NIST post-quantum cryptography standards (FIPS 203-205) as usable patches for existing cryptographic libraries. It contains 15 tasks drawn from 14 real PRs across nine repositories, covering seven languages. The benchmark uses dual-track scoring: repository tests measure engineering integration, and NIST test vectors measure standard conformance. Evaluating three models in the OpenHands environment found that with only the problem statement, GPT-6.1-Sol's test-vector pass rate was just 29.0%; after adding interface specifications, it rose to 100%, and the repository test pass rate rose from 18.9% to 93.7%. The gap between models is significant, with GLM-5.3-FlashX nearly unable to complete the tasks. The core conclusion is that interface specifications, rather than cryptographic knowledge, are the key lever for current performance improvements.
Related articles

Cursor Renamed to Grok Build: The AI Coding Shakeup After SpaceX's Acquisition
Cursor is officially renamed GrokBuild following SpaceX's over $40 billion all-stock acquisition and product rewrite. This article covers the reasons, performance gains, naming conflicts, and impact on developers.

Free Alternatives to Paid AI Tools: An Open-Source Substitute Guide for Claude, Cursor, and ElevenLabs
Introducing GoFreeAuls, a site cataloging free open-source alternatives to paid AI tools like Claude, Cursor, and ElevenLabs, including OpenCode, ComfyUI, and Voice Studio, plus a look at the real barriers to local deployment and who it suits.

Open-Source Plugin Superpowers: Turn Claude Code and Cursor into Senior Engineers
Discover the free GitHub plugin Superpowers, which makes Claude Code and Cursor work like senior engineers: spec first, five-minute tasks, and enforced red-green TDD.