s2n-bignum-bench: A practical benchmark for evaluating low-level code reasoning of LLMs
Organizations: Stevens Institute of Technology Hoboken, NJ 07030 · Amazon Web Services Seattle, WA 98101
Abstract
Neurosymbolic approaches leveraging Large Language Models (LLMs) with formal methods have recently achieved strong results on mathematics-oriented theorem-proving benchmarks. However, success on competition-style mathematics does not by itself demonstrate the ability to construct proofs about real-world implementations. We address this gap with a benchmark derived from an industrial cryptographic library whose assembly routines are already verified in HOL Light. s2n-bignum is a library used at AWS for providing fast assembly routines for cryptography, and its correctness is established by formal verification. The task of formally verifying this library has been a significant achievement for the Automated Reasoning Group. It involved two tasks: (1) precisely specifying the correct behavior of a program as a mathematical proposition, and (2) proving that the proposition is correct. In the case of s2n-bignum, both tasks were carried out by human experts. In s2n-bignum-bench, we provide the formal specification and ask the LLM to generate a proof script that is accepted by HOL Light within a fixed proof-check timeout. To our knowledge, s2n-bignum-bench is the first public benchmark focused on machine-checkable proof synthesis for industrial low-level cryptographic assembly routines in HOL Light. This benchmark provides a challenging and practically relevant testbed for evaluating LLM-based theorem proving beyond competition mathematics. The code to set up and use the benchmark is available here: s2n-bignum-bench.
Figures & tables
| Benchmark | Formal system | Primary focus | Problems (#) | Task setting |
|---|---|---|---|---|
| miniF2F Zheng et al. [2022] | Multiple | Olympiad mathematics (formal) | 488 | Formal theorem proving |
| PutnamBench Tsoukalas et al. [2024] | Multiple | Competition mathematics (formal) | 672 | Formal theorem proving |
| NTP4VC Xu et al. [2026] | Multiple | Verification conditions from real code | 600 | Real-world VC proving |
| VeriBench-FTP Barkallah et al. [2025] | Lean4 | Code-verification artifacts | 857 | Proofs from verification artifacts |
| miniCTX/miniCTX-v2 Hu et al. [2024] | Lean4 | Context-dependent proving | 762 | Context / Project generalization |
| VeriSoftBench Xin et al. [2026] | Lean4 | Repository-scale software verification | 500 | Repository-scale verification proving |