TRANSMISSION // 2612.03088v1
Can AI Agents Implement Post-Quantum Cryptography?
Source published
A benchmark finds that coding agents’ cryptography results depend strongly on clear interfaces—and that passing software tests alone does not establish standards conformance.

Post-quantum cryptography standards must be integrated into real software libraries, not just described on paper. PQCImplement-Bench tests whether coding agents can make that change, using selected repository tests and independent NIST validation vectors.
A cryptographic standard can specify how an algorithm should behave, yet implementing it in a real software library involves more than translating equations into code. A patch must fit the library’s programming interfaces, key formats and build system—and produce the outputs the standard requires. PQCImplement-Bench asks whether AI coding agents can handle that work, and how evaluation changes when they receive a clear description of what to implement.
The question matters because NIST has standardized three post-quantum cryptography algorithms: ML-KEM for key encapsulation, and ML-DSA and SLH-DSA for digital signatures. These standards are replacements for public-key methods that a sufficiently capable quantum computer could break. Software implementing them must work with its host project and follow the standards.
Two different tests for a patch
The researchers assembled 15 implementation tasks from 14 pull requests in nine software repositories, spanning seven programming languages. The tasks cover the three NIST algorithm families. For each, they supplied an earlier version of the repository and a task description. In one version, agents received a problem statement; in the more detailed version, they also received requirements and interface specifications. Agents could consult the relevant NIST standards through a limited search tool. The paper says the upstream implementation and pull-request test patch were hidden during evaluation.
Three models—GPT-6.1-Sol, Kimi K3.1 Pro and GLM-5.3-FlashX—attempted the tasks using the OpenHands coding-agent framework. Each attempt had the same stated limits on time, steps and model cost. The researchers ran each model once per task and setting.
Patches were assessed in two ways. Selected repository tests checked particular behaviors expected by the project’s tests. Separately, NIST’s published Automated Cryptographic Validation Protocol (ACVP) vectors checked whether implementations returned specified outputs for fixed inputs. These are different checks: a patch can pass selected project tests but produce incorrect cryptographic results, or match the vectors while failing those project tests.
Results depended on the task description
With requirements and interfaces included, GPT-6.1-Sol achieved a mean pass rate of 100% on assigned ACVP cases and 93.7% on repository test cases. Kimi K3.1 Pro averaged 55.8% on ACVP cases and 52.4% on repository tests. GLM-5.3-FlashX averaged 6.7% on ACVP cases and passed none of the repository test cases in this setup. These averages give equal weight to each task, rather than to each individual test case.
The clearest comparison came from a separate experiment with GPT-6.1-Sol. When researchers removed the requirements and interface sections, leaving only the problem statement, its mean ACVP pass rate fell from 100% to 29.0%. The diagnostic repository-test rate for those same conformance patches fell from 99.4% to 18.9%. Most newly unsuccessful evaluations were build failures. The authors report that, without the interface details, patches could name types, functions and files differently from what tests and drivers expected. Because those patches did not build, the experiment does not establish whether their underlying algorithm implementations would have been correct.
The two evaluators also caught different problems. For example, Kimi’s patch for the liboqs-2175 task passed all selected repository cases but only 53.5% of its assigned ACVP cases. Conversely, its OpenSSL-26715-b conformance patch passed every ACVP case while failing all seven repository cases. This illustrates why neither test suite alone provides a complete picture.
What the scores do—and don’t—show
These results describe a particular benchmark, not all cryptographic programming. The dataset contains 15 tasks across three algorithm families, and some tasks require internal interfaces that constrain implementation choices. The study also tests one attempt per model, task and setting, under specific agent configurations and resource limits. GLM-5.3-FlashX reached the step limit in all its attempts; its scores therefore reflect performance within that budget, not what might happen with more time.
Most importantly, passing the tests does not prove that code is secure. The benchmark measures functional behavior on finite inputs, not timing leaks or other side channels, and it does not provide a security proof or certification. The paper notes that published validation vectors do not detect timing vulnerabilities. The authors also identify possible prior exposure to public upstream patches and vectors as a potential confound.
PQCImplement-Bench is presented in a version-one arXiv preprint, so its findings should be treated as preliminary rather than settled evidence. Its contribution is a proposed way to evaluate coding agents: specify interfaces clearly, then check both compatibility with the software project and conformance to the cryptographic standard. The reported results apply to the tested models, tasks and setup; they are not a basis for trusting AI-generated cryptographic code without independent review and security analysis.
- post-quantum cryptography
- AI coding agents
- cryptographic software
- NIST standards
- benchmarking
- software testing
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Why passing tests didn’t catch these AI coding defects
Source published
Shared keywords: ai coding agents, software testing
Why AI coding agents struggle to clean up old code
Source published
Shared keywords: ai coding agents, software testing
Why Passing Tests May Not Prove an AI Patch Is Correct
Source published
Shared keywords: ai coding agents, software testing
A green build can still hide a swallowed error
Source published
Shared keywords: ai coding agents, software testing
A Proposed Way to Secure Coding-Agent Benchmarks
Source published
Shared keywords: ai coding agents, software testing