---
title: "PQCMigrate-Bench: Can LLM Agents perform Real-World Post-Quantum Cryptographic Migrations?"
authors: ["Krishna Upadhyay", "Daniel Liu", "A. B. Siddique", "Umar Farooq"]
date: "2026-12-03"
version: "v1"
address: "https://iraven.io/papers/pqcmigrate-bench-can-llm-agents-perform-2612-06106"
source: "https://arxiv.org/abs/2612.06106"
venue: "arXiv"
licence: "Creative Commons Attribution 4.0 International"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
---

## Abstract

Software that relies on public-key cryptography must migrate to post-quantum cryptography (PQC). Migration requires changes to how software generates and encodes keys, which algorithms it offers to peers, and how it derives shared secrets and produces signatures. Because systems upgrade at different times, migrated software must remain compatible with peers that still use classical algorithms. We present PQCMigrate-Bench, a benchmark of 22 tasks built from real-world PQC changes in 17 open-source repositories spanning nine programming languages. The tasks include bindings to existing PQC libraries, extensions of protocols and key formats, and protocol redesigns. We evaluate GLM 5.3 Flash and GPT-6.2 Sol under a ReAct-style agentic setup, with hidden tests for grading. GLM 5.3 Flash resolved 50% of the tasks and GPT-6.2 Sol resolved 55%. Each migration task involves several components, such as key generation, key encoding, encapsulation, and protocol handshakes. For error analysis, we evaluate each component separately. GPT-6.2 Sol passed all tests for 67% of the components and GLM 5.3 Flash passed for 57%, and most of this difference lies in key encapsulation and decapsulation. We release the benchmark and agentic harness for future research.

## Introduction

Data sent today may still need to stay private for decades. An attacker can record encrypted traffic today and decrypt it later if a quantum computer becomes capable of breaking the public-key cryptography that protected it. NIST will deprecate the quantum-vulnerable public-key algorithms after 2030 and disallow them after 2035 (National Institute of Standards and Technology 2026), and it has standardized ML-KEM for key establishment and ML-DSA and SLH-DSA for signatures (National Institute of Standards and Technology 2024a; National Institute of Standards and Technology 2024b; National Institute of Standards and Technology 2024c). Software that relies on public-key cryptography has to migrate to post-quantum cryptography (PQC). It also has to stay backward compatible during the migration, because the systems that communicate with it upgrade at different times. Since version 10.0, OpenSSH has used the hybrid key exchange `mlkem768x25519-sha256` by default. This exchange combines ML-KEM with classical X25519, and the OpenSSH client still supports classical key exchanges for older servers (OpenSSH Project 2025). LLM agents that edit, build, and test code in real repositories (Jimenez et al. 2024) could carry out part of this migration, but only if their patches are correct and backward compatible.

Adding a hybrid key exchange to an SSH client (Kampanakis et al. 2026) changes what the client offers to the server, how it encodes the messages they exchange, and how it derives the session key from two shared secrets. The classical exchange must keep working for servers that have not upgraded. A build and the existing test suite can leave these requirements untested. Two copies of a patched library can agree on a key that another implementation derives differently. A client can negotiate PQC with an upgraded server and fail to connect to an older one. The tests that grade a patch therefore determine which of these problems an evaluation can detect.

Earlier studies of LLMs for PQC migration used paired Python fragments and local changes in open-source repositories (Pallarés de Bonrostro et al. 2026), or signature migration in two repositories (Campbell 2026). Repository benchmarks such as SWE-bench grade a patch with tests for the requested change and tests for regressions (Jimenez et al. 2024), and gaps in those tests can let incorrect patches pass (Fujii et al. 2026). For PQC changes, a test that calls a new interface cannot run before the interface exists, so test selection has to distinguish a missing result from a failure. A single pass or fail verdict also does not show which part of the change failed or what the agent checked before submitting.

We study whether LLM agents can make backward-compatible PQC migrations. We build a benchmark from real-world PQC changes, report baseline results for two models under a ReAct-style agentic setup (Yao et al. 2023), and analyze their errors through four research questions (RQs). **RQ1.** How many tasks do the agents resolve, and how does the outcome depend on the scope of the change? **RQ2.** Which requirements do unresolved patches violate? **RQ3.** What do agents test before they submit, and how does that evidence compare with the grade? **RQ4.** Which components do the patches implement incorrectly, and how precisely can a failed test be traced to one of them?

![Figure](figures/f1-process.svg)

Figure 1: Task construction and grading. The base revision provides the starting code, and the gold revision provides the reference implementation. We compare test results at these revisions to select the required tests. Only the grader receives those tests.

PQCMigrate-Bench contains 22 tasks built from changes that add or integrate ML-KEM, ML-DSA, SLH-DSA, or the earlier Kyber and Falcon schemes in 17 open-source repositories written in nine languages. One task is a binding that connects an existing implementation to a call site, seventeen extend a protocol or key format, two redesign part of a protocol, and two implement a PQC algorithm. The agent receives the starting checkout without network access, a description of the requested change, and, where needed, a short contract test that specifies the expected interface. Because each task supplies the specification and the dependencies, we measure how well agents implement a specified change. A separate grader runs hidden tests. Tests that fail or report no result at the starting revision and pass on the reference implementation check the change. Tests that pass at both revisions check for regressions. A patch resolves a task when all of them pass. For 21 tasks, 78 variants of the reference code each replace one component with a stub. A test that fails under exactly one stub isolates that component. We evaluate GLM 5.3 Flash and GPT-6.2 Sol under the same ReAct-style agent in Inspect AI (AI Security Institute, UK 2024).

In the LLM evaluation (RQ1), GPT-6.2 Sol resolved 12 of the 22 tasks (55%) and GLM 5.3 Flash resolved 11 (50%). Both resolved the binding task and about half of the extensions, and neither resolved a protocol redesign. No regression test failed in either run, so every failure came from the requested change (RQ2). Four unresolved patches from each agent passed at least 80% of the tests for that change. Several failures involved behavior that a test between two copies of the patched code would not exercise. The SSH.NET patch from GLM 5.3 Flash derived the hybrid key incorrectly and failed the exchange with OpenSSH. Five unresolved attempts ended with passing at least one test (RQ3). For instance, on Skywire, GPT-6.2 Sol tested a handshake between two updated peers, and its patch then failed the hidden test of falling back to the classical exchange for an older peer. At the component level (RQ4), GPT-6.2 Sol passed all tests for 67% of the 75 components and GLM 5.3 Flash for 57%, with most of the gap in encapsulation and decapsulation.

This paper makes three contributions.

- **Benchmark.** We build PQCMigrate-Bench, 22 tasks drawn from real-world PQC changes in 17 open-source repositories across nine languages. Hidden tests check both the requested change and existing behavior, and the grader separates missing results from failures. We release the benchmark and the agentic harness.
- **Baseline results.** We evaluate GLM 5.3 Flash and GPT-6.2 Sol under the ReAct-style agent and analyze what each agent tests before it submits the task. Both LLMs managed to resolve about half of the tasks.
- **Error analysis.** Using 78 variants of the reference code across 21 tasks, each with one component replaced by a stub, we score each patch by component. We find that most component failures involve more than one component, and that a local test between updated peers can pass while fallback to an older peer fails.

## Benchmark Construction

We drew the 22 tasks from changes in 17 open-source repositories where we could recover the starting and reference revisions, reproduce the build, and test the requested behavior (Figure 1). The tasks span nine languages. Reference patches change between one and nineteen files, with a median of eight, excluding dependency files. The set covers ML-KEM, ML-DSA, and SLH-DSA, as well as historical changes based on Kyber and Falcon (Bos et al. 2018; Fouque et al. 2018). Each task follows the algorithm or draft targeted by the upstream change. In rPGP, we split one upstream change into tasks for key encapsulation and two signature schemes. The later tasks start with the earlier changes applied.

Table 1 lists the requested changes, the tests required for each, and each model’s result. We classify one task as a binding that connects an existing implementation to a call site. Seventeen are extensions, such as adding a key format or a new exchange to an existing protocol. Two redesign part of a protocol, and two implement a PQC algorithm. The categories describe the reference change.

**Agent prompt** Add `mlkem768x25519-sha256`. *Contract test excerpt*

```
config := &ssh.ClientConfig{}
config.SetDefaults()
if config.KeyExchanges[0] !=
    "mlkem768x25519-sha256" {
    t.Fatalf("got %q",
        config.KeyExchanges[0])
}
```

**Held-out grading** The test invokes the hybrid exchange directly and compares the client and server results. Both sides use Go’s implementation. Both submitted patches passed the exchange test and all 305 regression tests.

Figure 2: The prompt and grading checks for the Go crypto hybrid SSH task. The contract excerpt omits the imports and test wrapper.

### What the Agent Sees

The task description identifies the behavior to add. When needed, we supply the required dependency changes in the checkout. Where an example helps clarify the expected interface, we include a short contract test in the agent’s prompt. We check each example against the reference implementation. The grader uses a separate test suite. In Figure 2, the contract checks that the new SSH exchange appears first in the default list.

### Selecting Required Tests

We take tests from the upstream change and add held-out tests for ten tasks where the upstream suite leaves behavior uncovered. We run the suite at the starting revision and retain tests that pass in all three runs on the reference implementation. Among the retained tests, failures and absent results at the starting revision define the tests for the change. Tests that pass at both revisions check for regressions.

These groups describe what the tests did at the two revisions. A test can first become runnable because a change introduces an interface that it calls. It may still check compatibility with an existing mode. The Skywire fallback test below is one such case.

Table 1: The benchmark’s whole-task set and each model’s result. Tests counts the required tests for the change, and each model’s column gives how many it passed. Bold marks a resolved task. B: build failed. N: the test runner produced no results. In both cases no required test passed.

| Repository | Requested change | Tests | GLM 5.3 Flash | GPT-6.2 Sol |
|---|---|---|---|---|
| Activeledger | ML-DSA and Falcon identity signatures | 16 | **16** | 15 |
| Kage | Hybrid recipient encryption | 263 | B | 261 |
| Apache MINA SSHD | Hybrid ML-KEM key exchanges | 54 | **54** | **54** |
| Cisco MLS++ | ML-KEM for Messaging Layer Security | 5 | **5** | **5** |
| pdfsign | ML-DSA PDF signing and verification | 405 | **405** | **405** |
| age | Hybrid recipient encryption | 245 | 243 | **245** |
| Go crypto | ML-DSA for SSH authentication | 541 | 536 | 534 |
| Go crypto | Hybrid ML-KEM key exchange for SSH | 1 | **1** | **1** |
| Keycloak | ML-DSA key support | 80 | **80** | B |
| ngchain-js | ML-DSA and SLH-DSA signatures | 31 | 27 | **31** |
| OpenSSL | ML-KEM-768 support | 2 | 1 | **2** |
| AsyncSSH | Hybrid ML-KEM key exchanges | 19 | **19** | **19** |
| rPGP | Hybrid ML-KEM encryption in OpenPGP | 8 | 2 | 5 |
| rPGP | Composite ML-DSA signatures in OpenPGP | 15 | 7 | 7 |
| rPGP | SLH-DSA signatures in OpenPGP | 24 | **24** | N |
| rustls | ML-DSA signature verification | 4 | **4** | **4** |
| rustls | Hybrid X25519 and draft Kyber exchange | 7 | **7** | **7** |
| PuTTY | ML-KEM implementation and hybrid exchange | 41 | 13 | B |
| Skywire | ML-KEM in the Noise handshake | 29 | 28 | 28 |
| SSH.NET | Hybrid X25519 and ML-KEM key exchange | 1 | 0 | **1** |
| Xray-core | ML-KEM for VLESS encryption | 50 | 20 | 21 |
| Xray-core | ML-DSA server certificate verification | 14 | **14** | **14** |

## Evaluation

We ran one attempt per model and task using GLM 5.3 Flash (OpenRouter 2026a) and GPT-6.2 Sol (OpenRouter 2026b). Both used the same ReAct agent (Yao et al. 2023) in Inspect AI (AI Security Institute, UK 2024), with a shell and a checkout without upstream history or network access. Both runs had an effective \$2 API cost cap per task, which no attempt reached. GLM used a temperature of zero, and GPT left the temperature unset. We graded both sets of submissions with the same grader.

The grader prepares dependencies before applying submitted code in a separate offline container. It discards edits to tests and rejects patches that edit the prescribed dependency files. A patch resolves the task if all required tests pass. We distinguish a failed test from a required test that did not report a result, since neither a build failure nor an absent report shows how the requested behavior would have executed.

**Component variants.**

For 21 tasks we built 78 variants of the reference code, each with one part replaced by a stub. A test that reports a failure under one stub points to that part among the variants where the test ran. A test that fails under several stubs points to those parts together. We use reported failures from the whole-task suite for attribution. Each variant keeps the rest of the reference code fixed. The agents attempt the whole change, and we use the variants to interpret their grades.

**Agent testing.**

We classify shell calls from the session logs by command. Reads and searches count as exploration. We also distinguish edits, builds, test runs, Git commands, and other calls. To count a last test run as passing, we require a passing outcome, at least one executed test, and zero reported failures. We inspect selected sessions to see what their tests covered. Our patterns can miss tests invoked through scripts.

## Results

### Baseline Resolution

GLM 5.3 Flash resolved 11 of 22 tasks and GPT-6.2 Sol resolved 12. Each resolved the binding task and ten of the seventeen extensions. Of the two algorithm implementations, GPT resolved OpenSSL and GLM resolved neither. The protocol redesigns in Skywire and Xray-core remained unresolved in all four attempts. Each requires changes to several steps of an existing protocol.

![Figure](figures/f2-outcomes.svg)

Figure 3: Grades for each model’s 22 attempts. The no-report category covers attempts where the test runner produced no usable results.

GPT resolved seven of the 12 ML-KEM tasks and GLM resolved four (Figure 4). For ML-DSA, GLM resolved five of eight and GPT resolved four. The task counts for Falcon, draft Kyber, and SLH-DSA are at most two each. The ML-KEM group itself spans changes as different as calling an existing library in Cisco MLS++ and implementing the algorithm in PuTTY.

![Figure](figures/f3-by-algorithm.svg)

Figure 4: Tasks resolved by the PQC scheme the task asks the agent to add. Tasks that add two schemes count under both.

Table 1 gives the grades for individual tasks. GLM alone resolved Keycloak, rPGP’s SLH-DSA task, and Activeledger. GPT alone resolved the SSH.NET exchange, ngchain-js, OpenSSL, and age. Neither model resolved rPGP’s other two tasks, which add key encapsulation and composite signatures.

**Where the models disagree.**

On the four tasks only GPT resolved, GLM ran its own tests and made 45 to 111 tool calls. Each of its failures traces to the specification rather than to the build. In SSH.NET it combined the shared secrets with the wrong hash (described below). In ngchain-js it left wallet serialization limited to the classical key, and four round-trip tests failed. In OpenSSL and age, a held-out internal test and the command-line test script failed; we did not pin down the cause of either.

On the three tasks only GLM resolved, GPT stopped after 4 to 16 tool calls and ran no tests. In rPGP it implemented only the algorithm identifiers named in the contract and stated that its patch did not cover signing or verification. The other two differences come partly from the benchmark. The Keycloak contract checks only that a map named `PREFIXES` exists. The held-out test reads it from the same package as a map to byte arrays, and GPT’s private map of hex strings did not compile against it. GPT’s Activeledger patch failed one of 16 tests. That test makes 80 signatures in pure JavaScript under the test runner’s default two-second timeout.

### What the Tests Reveal

Of the 21 unresolved attempts, 17 produced a failed test. Three failed to build, and one produced no test reports (Figure 3). The appendix lists every unresolved attempt (Figure 10).

Four unresolved submissions per model passed at least 80% of the tests for the change (Table 1). GLM’s age patch passed 243 of 245 and GPT’s Kage patch passed 261 of 263. No reported regression check failed in either run. The remaining failures can still affect how a patch works with existing peers, as in the Skywire example below.

**A new exchange with an independent peer.**

In SSH.NET, GLM’s patch passed all 33 regression tests. Its failure came from the sole test for the change, which forces the new hybrid exchange with OpenSSH. The patch hashed the ML-KEM shared secret with SHA3-256 before combining it, while `mlkem768x25519-sha256` hashes the concatenation of the two shared secrets with SHA-256. GLM’s local checks were the existing key-exchange unit tests, none of which connects to another implementation. Two copies of the patched library would agree on the same wrong key.

**Missing results after a failed build.**

GLM’s Kage patch did not build, which kept all 263 required tests from reporting results. Treating those 263 missing results as failed assertions would give this one task more weight than hundreds of executed checks elsewhere. We give each task one verdict and retain the distinction between missing results and observed failures for diagnosis.

### What Agents Test Before Submission

Exploration accounted for 64–72% of tool calls across the model and outcome groups (Figure 5). Among attempts with a recognized edit, GLM first edited at call 28.5 at the median, and GPT at call 7.5. Our command patterns identified no edit in eight GPT attempts. We identified at least one test command in 19 GLM attempts and 13 GPT attempts.

![Figure](figures/f4-trajectory-mix.svg)

Figure 5: Share of tool calls in each category, pooling calls by model and task outcome.

GLM made more tool calls than GPT on all 22 tasks, a median of 5.5 times as many (Figure 6). Its calls cost less, and it was still the cheaper attempt on 10 tasks. The gap was widest on the seven tasks neither model resolved, where GLM made a median of 140 calls and GPT 19. Over all attempts, GLM made 88 tool calls at the median, and GPT made 15.5. GLM’s median was 111 calls on unresolved tasks and 52 on resolved tasks, with average API costs of \$0.38 and \$0.08. The GPT medians were 15.5 and 15 calls, with average costs of \$0.19 and \$0.13. GLM’s longest run, on Kage, used 259 calls and produced a patch that failed to build.

![Figure](figures/f5-effort.svg)

Figure 6: Tool calls and API cost per task. Each row joins the two models’ attempts on one task. Circles mark resolved attempts and crosses unresolved ones. Rows are grouped by which model resolved the task. Both axes use logarithmic scales.

Five attempts ended their recorded local testing with a pass and still failed grading (Table 2). Local runs include both repository tests and tests the agents wrote during an attempt. To understand what a pass meant, we checked the inputs and assertions in the recorded commands and compared them with the requirements exercised by the grader. The appendix counts every build and test run (Figure 9).

Table 2: Local testing in the agent logs. The last column counts attempts whose last recorded test command reported at least one passing test and zero failures, and was recorded as successful.

| Model | Grade | Attempts | Test command | Last test passed |
|---|---|---|---|---|
| GLM 5.3 Flash | Resolved | 11 | 9 | 4 |
| GLM 5.3 Flash | Unresolved | 11 | 10 | 4 |
| GPT-6.2 Sol | Resolved | 12 | 7 | 1 |
| GPT-6.2 Sol | Unresolved | 10 | 6 | 1 |

**Skywire.**

GPT’s first recorded test command ran the Noise package suite and reported 32 passes. It then wrote a temporary test to exercise key encapsulation and a handshake in which both peers run the new code. The command ran that test on its own, reported a pass, and removed the temporary file. The held-out run passed 28 of 29 checks. The failed check simulates an older responder and requires the initiator to fall back to the classical exchange and continue sending and receiving data. The local test examined the upgrade path between two updated peers. The held-out test examined a mixed deployment.

### Tracing Failures to Components

Both models failed Go SSH ML-DSA checks that reject malformed signatures, such as empty, truncated, or extended ones. In the reference code, those checks failed with the verification stub and passed with each of the other stubs. A reviewer can start by tracing how each patch verifies signatures. In Skywire, both patches failed the check for connecting to an older peer. That check reported no failure under any reference stub. It gives a way to reproduce the compatibility problem while leaving its source open.

Among the 17 attempts with a failed test for the change, seven had at least one failure that pointed to a single component. Thirteen had a failure linked to several components. Some attempts had both. A round-trip test can expose a mismatch and leave both encapsulation and decapsulation as possible sources. For each operation, only one of the ten tasks with that variant had a test that isolated it. Every observed failure tied to either operation also implicated another component (Figure 7). In Xray VLESS, separate checks pointed to the client and server handshakes in both submissions (Figure 8 in the appendix). Table 4 in the appendix gives the failures by task.

Table 3 compares the models on the same variants. For key generation, 13 tasks had at least one linked check. GPT passed every linked check on ten of those tasks and GLM on eight. The count of 13 includes tasks where a submission had missing test results. We exclude the three variants that had no linked checks at all.

Table 3: Component pass counts. A pass means every check linked to the variant passed on the submitted patch.

| Component | Variants with checks | GLM passes | GPT passes |
|---|---|---|---|
| Key generation | 13 | 8 | 10 |
| Key encoding | 11 | 6 | 7 |
| Encapsulation | 10 | 5 | 8 |
| Decapsulation | 10 | 5 | 8 |
| Signature verification | 5 | 3 | 2 |
| Signing | 3 | 2 | 1 |
| Integration | 6 | 4 | 5 |
| Client handshake | 3 | 1 | 2 |
| Server handshake | 2 | 1 | 1 |
| Parameters | 2 | 1 | 1 |
| Types represented once | 10 | 7 | 5 |
| Total | 75 | 43 | 50 |

![Figure](figures/f6-component-roles.svg)

Figure 7: Outcomes by component role. G marks GLM and S marks GPT. A pass requires every linked check to pass. An isolated failure takes precedence over a shared failure. Incomplete results have a missing check and no reported failure. Other groups roles with one variant each.

## Discussion

The Go example separates two requirements that are easy to combine in a task description. The client must offer the hybrid exchange in the expected order, and both sides must compute the same exchange result. A test that invokes the exchange directly can establish agreement while bypassing the client’s default offer. Checking the offer requires an assertion about configuration or a test that observes negotiation with the defaults. The same principle applies to a rollout: a test between upgraded peers needs a separate check for clients and servers that still use the classical mode.

The trajectory and grading evidence can guide where to add test coverage. In Skywire, the local test exercised a successful exchange with the new code on both ends. A second public test with an older peer would give the agent feedback on the missing case. For a maintainer reviewing the final patch, the held-out failure already identifies a condition to reproduce. A component label would only add evidence if the reference variants could isolate that condition.

## Related Work

Function-level benchmarks such as HumanEval and MBPP grade standalone functions against unit tests (Chen et al. 2021; Austin et al. 2021). SWE-bench grades patches for real repository issues using tests for the requested change and tests for regressions (Jimenez et al. 2024). We use the same distinction for changes that add PQC. A test for an added interface may first become runnable after the change, so missing results at the starting revision are common. For 14 of our 22 tasks, the starting code produced no result for any of the tests that distinguish it from the reference implementation. TimeMachine-bench evaluates changes needed after dependency updates and describes how limited test coverage can admit incorrect patches (Fujii et al. 2026). Domain-specific benchmarks adapt grading to their setting, such as data-science libraries, GPU kernels, and hardware description code (Lai et al. 2023; Ouyang et al. 2025; Pinckney et al. 2024). For PQC, the setting includes peers that still run the classical protocol.

Pallarés de Bonrostro et al. evaluated PQC migration on paired Python fragments and examined transfer to local changes in open-source repositories (Pallarés de Bonrostro et al. 2026). Campbell studied repository-level signature migration across two repositories and varied the support given to the model (Campbell 2026). Our tasks cover signatures, key establishment, and their use in protocols. The upstream changes supply reference behavior that we can test across these settings, from loading a key to completing a hybrid handshake.

## Limitations

We chose tasks whose upstream changes, builds, and tests we could recover. The changes were public and may have been in model training data. Seven tasks have no recorded tests that pass on both the starting code and the reference implementation. The repeated reference runs were part of test selection. We have no recorded recheck of the complete corpus through the final grading path. Two grades depend partly on the benchmark. GPT’s Activeledger failure came from a test that makes 80 signatures under a two-second timeout, and the Keycloak contract omits the type that its held-out test requires. Passing the benchmark establishes the tested behavior under the specified conditions. Broader interoperability, standards conformance, and resistance to side-channel attacks require separate evidence.

Each baseline describes one attempt per task with one agent and supplied task descriptions. Tasks from the same repository or upstream change can share code and tests. The local tests are chosen during the attempt, and their coverage varies. The logs therefore describe the checks the agents selected. They give no estimate of the effect of adding tests or tool calls.

## Conclusion

Task resolution provides a common measure across repositories. Explaining a resolution requires naming the behavior the suite tested. For a hybrid exchange, use checks for the mode selected, agreement with an independent peer, and any classical fallback the project promises to preserve.

## Acknowledgments

This work was supported by the National Science Foundation (NSF) under CNS-2540631. Opinions, findings, and conclusions expressed are those of the authors and do not necessarily reflect NSF views.

## References

- AI Security Institute, UK (2024) AI Security Institute, UK Inspect AI: Framework for Large Language Model Evaluations. [Link](https://github.com/UKGovernmentBEIS/inspect_ai)
- Austin et al. (2021) J. Austin, A. Odena, M. I. Nye, M. Bosma, H. Michalewski, D. Dohan, E. Jiang, C. J. Cai, M. Terry, Q. V. Le, and C. Sutton Program synthesis with large language models. CoRR abs/2108.07732.
- Bos et al. (2018) J. Bos, L. Ducas, E. Kiltz, T. Lepoint, V. Lyubashevsky, J. M. Schanck, P. Schwabe, G. Seiler, and D. Stehlé CRYSTALS - kyber: a cca-secure module-lattice-based kem. In 2018 IEEE European Symposium on Security and Privacy (EuroS\&P), Vol. , pp. 353–367. [Document](https://dx.doi.org/10.1109/EuroSP.2018.00032)
- Campbell (2026) R. Campbell Agentic cryptographic debt: repository-level measurement of post-quantum migration regression under autonomous ai software development. Computers 15 (9). [Link](https://www.mdpi.com/2073-431X/15/9/625)
- Chen et al. (2021) M. Chen, J. Tworek, H. Jun, Q. Yuan, H. Pondé de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, et al. Evaluating large language models trained on code. CoRR abs/2107.03374.
- Fouque et al. (2018) P. Fouque, J. Hoffstein, P. Kirchner, V. Lyubashevsky, T. Pornin, T. Prest, T. Ricosset, G. Seiler, W. Whyte, and Z. Zhang Falcon: fast-Fourier lattice-based compact signatures over NTRU. Note: Submission to the NIST Post-Quantum Cryptography Standardization Project
- Fujii et al. (2026) R. Fujii, M. Morishita, K. Yano, and J. Suzuki TimeMachine-bench: a benchmark for evaluating model capabilities in repository-level migration tasks. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), V. Demberg, K. Inui, and L. Marquez (Eds.), Rabat, Morocco, pp. 8233–8264. [Link](https://aclanthology.org/2026.eacl-long.385/)
- Jimenez et al. (2024) C. E. Jimenez, J. Yang, A. Wettig, S. Yao, K. Pei, O. Press, and K. R. Narasimhan SWE-bench: can language models resolve real-world github issues?. In The Twelfth International Conference on Learning Representations, [Link](https://openreview.net/forum?id=VTF8yNQM66)
- Kampanakis et al. (2026) P. Kampanakis, D. Stebila, and T. Hansen Post-Quantum/Traditional Hybrid Key Exchange with the Module-Lattice-Based Key-Encapsulation Mechanism for Use in SSH. Request for Comments, RFC Editor. Note: RFC 10042 [Document](https://dx.doi.org/10.17487/RFC10042)
- Lai et al. (2023) Y. Lai, C. Li, Y. Wang, T. Zhang, R. Zhong, L. Zettlemoyer, W. Yih, D. Fried, S. Wang, and T. Yu DS-1000: a natural and reliable benchmark for data science code generation. In Proceedings of the 40th International Conference on Machine Learning, ICML’23.
- National Institute of Standards and Technology (2024a) National Institute of Standards and Technology FIPS 203: module-lattice-based key-encapsulation mechanism standard. Technical report NIST. [Document](https://dx.doi.org/10.6028/NIST.FIPS.203)
- National Institute of Standards and Technology (2024b) National Institute of Standards and Technology FIPS 204: module-lattice-based digital signature standard. Technical report NIST. [Document](https://dx.doi.org/10.6028/NIST.FIPS.204)
- National Institute of Standards and Technology (2024c) National Institute of Standards and Technology FIPS 205: stateless hash-based digital signature standard. Technical report NIST. [Document](https://dx.doi.org/10.6028/NIST.FIPS.205)
- National Institute of Standards and Technology (2026) National Institute of Standards and Technology Transition to post-quantum cryptography standards. Technical report Technical Report NIST IR 8547, NIST. [Document](https://dx.doi.org/10.6028/NIST.IR.8547)
- OpenRouter (2026a) OpenRouter GLM 5.3 flash. Note: OpenRouter model page, https://openrouter.ai/z-ai/glm-5.3-flash
- OpenRouter (2026b) OpenRouter GPT-6.2 sol. Note: OpenRouter model page, https://openrouter.ai/openai/gpt-6.2-sol
- OpenSSH Project (2025) OpenSSH Project OpenSSH 10.0 release notes. Note: https://www.openssh.org/txt/release-10.0
- Ouyang et al. (2025) A. Ouyang, S. Guo, S. Arora, A. L. Zhang, W. Hu, C. Re, and A. Mirhoseini KernelBench: can LLMs write efficient GPU kernels?. In Proceedings of the 42nd International Conference on Machine Learning, A. Singh, M. Fazel, D. Hsu, S. Lacoste-Julien, F. Berkenkamp, T. Maharaj, K. Wagstaff, and J. Zhu (Eds.), Proceedings of Machine Learning Research, Vol. 267, pp. 47356–47415. [Link](https://proceedings.mlr.press/v267/ouyang25a.html)
- Pallarés de Bonrostro et al. (2026) J. Pallarés de Bonrostro, A. I. González-Tablas, and M. I. González Vasco Empirical evaluation of large language models for migration of code fragments to post-quantum cryptography. [Document](https://dx.doi.org/10.48550/arXiv.2606.07341)
- Pinckney et al. (2024) N. Pinckney, C. Batten, M. Liu, H. Ren, and B. Khailany Revisiting verilogeval: newer llms, in-context learning, and specification-to-rtl tasks. [Link](https://arxiv.org/abs/2408.11053)
- Yao et al. (2023) S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. R. Narasimhan, and Y. Cao ReAct: synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations, [Link](https://openreview.net/forum?id=WE_vluYUL-X)

![Figure](figures/f7-component-matrix.svg)

Figure 8: Outcomes by task for roles represented in at least two tasks. The tables give pass counts across all roles and list failures for the full set of tasks with variants.

![Figure](figures/f8-build-test-attempts.svg)

Figure 9: Builds and test runs in the agents’ own sandboxes before submission. (a) Builds by how they ended. (b) Test runs by how they ended. Outcome not read means that the runner printed no summary we could parse. (c) Tasks by the agent’s last test run that reported a count, split by whether the task was then resolved.

Table 4: Component failures in the 21 tasks with variants. Each cell describes the model’s whole-task submission. **I** marks components isolated by a failed test. **S** marks other components linked to a failure shared by several variants. Unassigned marks a failed test with no link to a measured variant. Resolved means all required tests passed.

| Repository | PQC algorithm | GLM 5.3 Flash | GPT-6.2 Sol |
|---|---|---|---|
| Activeledger | ML-DSA, Falcon | Resolved | **S** key generation, signing |
| Kage | ML-KEM | Build failed | **S** key encoding, key generation |
| Apache MINA SSHD | ML-KEM | Resolved | Resolved |
| Cisco MLS++ | ML-KEM | Resolved | Resolved |
| pdfsign | ML-DSA | Resolved | Resolved |
| age | ML-KEM | **S** decapsulation, encapsulation, integration, key encoding, key generation | Resolved |
| Go crypto (SSH) | ML-DSA | **I** verification **S** API, parameters | **I** verification **S** API, parameters |
| Go crypto (SSH) | ML-KEM | Resolved | Resolved |
| Keycloak | ML-DSA | Resolved | Build failed |
| ngchain-js | ML-DSA, SLH-DSA | **I** key encoding | Resolved |
| OpenSSL | ML-KEM | **S** decapsulation, encapsulation, key generation | Resolved |
| AsyncSSH | ML-KEM | Resolved | Resolved |
| rPGP | ML-DSA | **S** key encoding, signing, verification | **S** key encoding, signing, verification |
| rPGP | SLH-DSA | Resolved | No test reports |
| rPGP | ML-KEM | **I** key encoding **S** decapsulation, encapsulation, key generation Unassigned | **S** decapsulation, encapsulation, key encoding Unassigned |
| rustls | Kyber (draft) | Resolved | Resolved |
| PuTTY | ML-KEM | **S** SHAKE, decapsulation, encapsulation, integration, key generation Unassigned | Build failed |
| Skywire | ML-KEM | Unassigned | Unassigned |
| SSH.NET | ML-KEM | **I** client handshake | Resolved |
| Xray VLESS | ML-KEM | **I** client handshake, server handshake Unassigned | **I** client handshake, server handshake Unassigned |
| Xray REALITY | ML-DSA | Resolved | Resolved |

Table 5: Tasks resolved by one model. Calls are the losing attempt’s tool calls. The last column gives the losing attempt’s grade.

| Task | Resolved by | Calls | Cause in the losing attempt | Grade |
|---|---|---|---|---|
| rPGP SLH-DSA | GLM | 4 | Added only the algorithm identifiers the contract names, and said that signing and verification were not covered. Ran no build. | Held-out tests did not compile |
| Keycloak | GLM | 7 | Made `PREFIXES` a private map of hex strings. The held-out test reads a package-visible map to byte arrays; the contract checks only that a map exists. | Build failed, 0/80 |
| Activeledger | GLM | 16 | No defect found. The failing test makes 80 signatures under a two-second default timeout. | 15/16 |
| SSH.NET | GPT | 61 | Hashed the ML-KEM secret with SHA3-256 before combining it with the X25519 secret. Local checks never contacted another implementation. | 0/1 (OpenSSH) |
| ngchain-js | GPT | 45 | Changed only the crypto module. Wallet serialization still wrote and accepted only the classical key. | 27/31 |
| OpenSSL | GPT | 111 | Its internal ML-KEM interface failed one check of the held-out internal test; its own test of that interface was discarded as a test file. Exact check not identified. | 1/2 |
| age | GPT | 92 | Library tests passed; the command-line script for hybrid recipients failed. Cause not identified. | 243/245 |

![Figure](figures/f9-failures.svg)

Figure 10: Every unresolved attempt. (a) The grade and the number of required tests for the change that did not pass. (b) The agent’s own failed builds and test runs before submission. Tasks that both models failed come first.

## Appendix A Appendix: Component Failures by Task

Table 4 lists the components linked to failed checks and records where results were missing. Figure 8 shows the same outcomes for the roles represented in at least two tasks.

## Appendix B Appendix: Builds and Tests in the Agent’s Sandbox

Figure 9 counts every build and test command the agents ran before submitting, classified by the same command patterns as Table 2. Of GLM’s 222 builds, 63 (28%) failed, on 15 tasks; of GPT’s 30, 5 failed, on two. Of GLM’s 170 test runs, 39 printed no pass or fail count we could read, usually because the output was cut short; for GPT, 24 of 35 did.

Panel (c) assigns each task to the last test run that reported a count. By that rule, every visible test passed at the end of 13 GLM and 4 GPT attempts, of which 5 and 1 were unresolved. Table 2 uses the stricter rule that the last test command itself passed, which gives 4 and 1.

## Appendix C Appendix: Tasks Resolved by One Model

Table 5 gives the cause behind each task that only one model resolved, from the saved patches and session logs.

## Appendix D Appendix: Unresolved Attempts

Figure 10 lists all 21 unresolved attempts. Seven tasks defeated both models. On five of them, both submissions built and failed tests. Two were near misses: Skywire failed one of 29 tests for both models, and Go SSH ML-DSA 5 and 7 of 541. Others were far off. Both models failed about 30 of 50 Xray VLESS tests and 8 of 15 rPGP ML-DSA tests.

The failed tests most often cover key handling. Among GLM’s 11 unresolved attempts, four each have a failed test linked to key generation, key encoding, encapsulation, and decapsulation. Among GPT’s 10, three link to key encoding and two each to key generation, signing, and verification. An attempt with missing results and no failure counts under no component.
