Skip to main content
Back

AWS Benchmark s2n-bignum-bench Exposes AI's Zero Score on Real Cryptographic Proofs

A new AWS-derived benchmark asks LLMs to prove real cryptographic assembly correct in HOL Light. The best current model solves 5.3 percent.

Pro

  • AWS and Stevens released s2n-bignum-bench, 2,284 HOL Light proof tasks over real cryptographic assembly.
  • Problems come from the production s2n-bignum library used in AWS libcrypto for TLS and post-quantum crypto.
  • GPT-5.3-Codex solves only 5.3 percent overall and zero of 859 functional-correctness proofs.
  • Four categories: bit-vector, program-state, functional correctness (ARM and x86), and generic auxiliary lemmas.
  • Integrity harness blocks CHEAT_TAC, new axioms, and uses type-annotation obfuscation against training-data contamination.
  • Benchmark, evaluator, and leaderboard available on GitHub with per-problem timeouts and standalone artifacts.

Neural theorem proving has been on a tear lately, with reasoning models saturating Olympiad-style benchmarks like miniF2F and PutnamBench. But solving a Putnam problem in Lean is not the same as proving that a hand-tuned assembly routine implementing Montgomery multiplication actually computes what its specification says. A team from AWS and Stevens Institute of Technology just released s2n-bignum-bench, a benchmark that forces language models to grapple with that second problem, and the initial numbers suggest the frontier is much further away than the competition math results imply.

From Olympiad problems to real cryptographic code

The benchmark is built on top of s2n-bignum, an AWS library that ships the assembly code doing the actual arithmetic behind TLS handshakes and post-quantum crypto in AWS libcrypto. For verification of assembly language covering both x86_64 and AArch64 ISAs, the s2n-bignum infrastructure is built on the HOL Light theorem prover, and the repository contains both code and proofs for low-level cryptographic functions. Each function is accompanied by a machine-checked formal proof in HOL Light that its mathematical result is correct, based on a formal model of the underlying machine.

Writing those proofs is not a weekend project. Engineers at AWS estimated a significant time investment was required, around one person-year for an end-to-end x/Ed25519 implementation and integration, and considered it worth it at scale. That human cost is exactly what makes the corpus interesting as an LLM benchmark: if a model can synthesize even a fraction of these proofs, it directly translates into engineering time saved on safety-critical code.

What the benchmark actually asks

The task is proof synthesis, not code generation. Given a HOL Light boolean term that specifies what a chunk of ARM or x86 assembly should do, the model must emit a tactic script that HOL Light accepts inside a fixed timeout. The paper packages 2,284 proof obligations distilled from the library into isolated context-query tasks, each with a stable problem identifier such as arm.bignum_montsqr_p256.lemma1.0 and a standalone setup.ml plus query.txt.

Problems are split into four categories using lightweight heuristics:

  • Bit-vector lemmas (311): identities about machine words, bitwise operations, and word arithmetic.
  • Program-state lemmas (552): facts about register files, memory aliasing, and symbolic machine states.
  • Functional correctness (859): the hard ones. 437 ARM plus 422 x86 theorems saying a specific instruction sequence transforms preconditions into postconditions.
  • Generic (562): auxiliary facts that do not fit the other buckets.

The reasoning style required is qualitatively different from Olympiad math. A functional correctness proof has to decompose the program at specific program-counter offsets, symbolically execute each segment through ISA-specific decode and execute semantics, and simplify the resulting symbolic state at every step. Symbolic execution takes a representation of the input program state using symbolic variables in place of specific values, infers a symbolic output state at the end of some code snippet, and strips away artifacts of program execution to leave a purely mathematical problem. Architectural state, endianness, and aliasing simply do not show up in competition math.

How grading works

Each submission gets exactly one verdict per problem: OK, FAIL, CHEATING, TIMEOUT, or ERROR. Because a lazy model could try to cheat by axiomatizing the goal or invoking CHEAT_TAC (HOL Light's equivalent of Lean's sorry), the harness runs several integrity checks:

  1. A syntax and type pre-check compiles the submission into the benchmark context to catch malformed tactic expressions before full evaluation.
  2. An OCaml parser validates that the answer is a single well-formed expression, blocking injection-style attacks.
  3. The harness compares the output of the axioms() function before and after the proof runs. If the list changed, the submission introduced a new axiom and is marked as cheating.
  4. To fight benchmark contamination, roughly 70 percent of queries are re-printed with fully explicit type annotations so that memorized theorem statements from GitHub crawls do not match.

Timeouts are set per problem rather than globally, because proof-check times vary from milliseconds for small lemmas to multiple hours for the largest routine-correctness theorems. The team profiled every ground-truth proof three times and derived a timeout map with a floor of 120 seconds and a cap of 10,800 seconds.

The baseline is brutal

The initial baseline uses GPT-5.3-Codex via codex-cli with a zero-shot prompt that includes a single worked example. Over all 2,284 problems, medium-effort mode solves 4.4 percent and high-effort mode solves 5.3 percent. The category breakdown is where it gets interesting:

CategoryTotalOK (medium)OK (high)Solve rate (high)
Generic562596611.7%
Bit-vector31126278.7%
Program-state55216285.1%
Functional correctness (ARM)437000.0%
Functional correctness (x86)422000.0%

Zero. Across 859 real assembly correctness theorems, the current frontier model closes exactly none of them. Only a small fraction of attempts even survive the syntax pre-check: 743 out of 2,284 in medium mode and 766 in high mode. The rest fail to compile as valid OCaml tactic expressions in the first place.

Why the zero matters

The functional-correctness category is the whole point of the benchmark, and it is where existing LLMs fall off a cliff. These proofs require reasoning that is fundamentally different from what math benchmarks reward. The s2n-bignum ecosystem provides extensive support for cryptographic verification, including symbolic simulation that strips away execution artifacts and leaves purely mathematical problems, specialized tactics for word operations, and byte list handling. A model has to know when to invoke those specialized tactics, how to unfold ISA decoders, and how to keep memory aliasing straight across dozens of instructions. Olympiad training does not teach that.

The stakes are also concrete. HOL Light reasons directly about machine code bytes using CPU instruction specifications, providing assurance at the lowest level of the software stack. Any LLM that can meaningfully contribute here is directly reducing the person-years currently spent verifying elliptic curves, RSA, ML-KEM, and ML-DSA implementations that ship in production.

Getting started

The full benchmark, evaluation harness, prompt template, and per-problem timeout map are on GitHub. Challengers are expected to produce a directory of <problem-id>/answer.txt files and run them through the three-stage evaluator: syntax check, proof execution with axiom-count comparison, and verdict collection. A leaderboard is hosted for other research groups to submit attempts. If your model can crack even a handful of the functional-correctness problems, that is a real signal about low-level code reasoning that no math benchmark can give you.