Large language models tested on implementing post quantum cryptography standards
PQCImplement-Bench: Evaluating LLMs on Implementing NIST Post-Quantum Standards in Production Cryptographic Libraries
Cryptography and SecurityArtificial IntelligenceSoftware Engineering
Summary
Current internet security could be broken by future quantum computers, so new cryptography standards have been created to protect data. This paper looks at whether AI coding tools can write software patches that correctly add these new cryptography methods into existing systems. The authors made a benchmark from real coding tasks plus tests to check if solutions work and follow the standards. They tested three large language models and found performance varies widely but can be improved with more detailed instructions. They provide the data and code for others to continue this work.
What this means in practice
- •For software developers in cryptography: Evaluate and improve AI-assisted code generation for updating cryptographic libraries to meet new quantum-resistant standards.
- •For security compliance teams: Verify that cryptographic software patches conform to NIST post-quantum standards using an automated benchmark and test suites.
Authors
Souhardya Saha Dip, Moshood A. Fakorede, A. B. Siddique, Umar Farooq
Abstract
A large-scale quantum computer would break the public-key cryptography that protects today's communications, and NIST has standardized ML-KEM, ML-DSA, and SLH-DSA (FIPS 203-205) as replacements that cryptographic libraries must implement. It remains unexplored whether coding agents can turn such a standard into a working and conforming patch for an existing library. This paper presents PQCImplement-Bench, a benchmark comprising 15 tasks derived from 14 pull requests across nine repositories and seven programming languages, each pairing a pre-change repository snapshot with a reviewed specification of requirements and interfaces. The benchmark grades patches with two independent test oracles that separate correctness within the repository from conformance to the standard. One oracle consists of relevant repository tests, and the other consists of NIST validation vectors for each standard. We evaluate three models, GPT-6.1-Sol, Kimi K3.1 Pro, and GLM-5.3-FlashX in OpenHands. Given only the problem statement, GPT-6.1-Sol reaches a mean pass rate of 29.0% on the validation vectors and 18.9% on repository tests. With the interface specification added, the pass rate for GPT-6.1-Sol rises to 100%, while Kimi K3.1 Pro reaches 55.8% and GLM-5.3-FlashX 6.7%. On the repository tests, the three models reach mean pass rates of 93.7%, 52.4%, and 0.0%. We release the dataset and evaluation framework for future research.