π€ AI Summary
This work addresses the challenges of scale and complexity in formally verifying production-grade cryptographic libraries, where existing approaches fall short of end-to-end automation. We present CryptoProver, a system that achieves, for the first time, fully automated verification of real-world cryptographic implementations such as curve25519-dalek and RustCryptoβs chacha20. CryptoProver integrates large language models with the Verus verifier to automatically synthesize internal specifications and verifiable proofs from high-level API contracts, without requiring source code modifications. By leveraging a pre-defined trusted library, mechanical gating, and isolation mechanisms, the system ensures specification strength and cross-module consistency. In experiments, CryptoProver completed verification within 11.4 hours at an API cost of \$466.99, successfully covering core cryptographic components relied upon by widely deployed systems including Signal (with 218 million downloads) and Shadowsocks.
π Abstract
Cryptographic code is critical infrastructure that must be correct, yet formally verifying production libraries remains difficult. Existing language-model proof systems solve isolated obligations with specifications and premises already given, leaving production-library verification unresolved.
We present CryptoProver, an AI-based system that synthesizes internal specifications and Verus-checked proofs from high-level API contracts. Without changing executable code, CryptoProver constructs a new independent proof of curve25519-dalek and verifies RustCrypto's previously unverified chacha20 implementation against an RFC 8439 specification. These cryptographic lineages underpin deployed systems including Signal and Shadowsocks; Signal has an estimated 218M global downloads. The independent, human-led curve25519-dalek verification was developed publicly over eight months by five main contributors. Given the API contracts and a fixed trusted library of field specifications, arithmetic facts, axioms, and vstd, CryptoProver synthesizes the internal specifications and proofs in 11.4 hours with USD 466.99 in recorded API cost. CryptoProver follows a trust-first design principle: mechanical gates reject specification weakening, invented axioms, and cross-module breakage, while isolation blocks reference proof retrieval, including from git history.