AlphaProof Code: DeepMind's agents wrote 6.5M lines of Lean to verify Signal's libsignal at machine-code level
A five-person team, four weeks, and a trust architecture worth copying — plus what the proofs do and don't cover.

Google DeepMind announced AlphaProof Code on 10 November: a multi-agent framework whose agents wrote roughly 6.5 million lines of machine-checked Lean proofs in a four-week campaign by a five-person team. The proofs establish forward secrecy, authentication, post-compromise security, and handshake secrecy for libsignal v0.105.4, the Signal protocol's reference implementation, at the AArch64 machine-code level. DeepMind calls them the first proofs connecting protocol-level security guarantees to the unmodified compiled code of a widely used cryptographic implementation, and it has open-sourced the entire Lean development — claims and caveats included.
What shipped
AlphaProof Code splits formal verification into four roles, the way a research team would: a human-guided specification-writer agent, a pool of reviewer agents, a team of prover agents, and a gatekeeper agent. Humans decide what to prove and approve every specification; prover agents then work autonomously, because correctness no longer depends on them. As the paper puts it, "the majority of human effort in software verification now lies in engineering the specification." Proofs are accepted only if Lean's kernel checks them, and the gatekeeper admits a proof only when a Lean comparator confirms it proves exactly a held-out copy of the approved specification.
The verification target matters as much as the framework. The team took unmodified libsignal v0.105.4 and the spqr v1.6.0 crate, compiled them with the stock rustc compiler to AArch64 Linux machine code, and loaded the resulting executable into Lean together with a formal semantics of the AArch64 instruction set (paper, repo). The proofs therefore bind to the compiled binary — roughly 140,000 machine instructions — not to source code, so the guarantees do not depend on trusting the compiler. They cover Signal's PQXDH post-quantum handshake and Triple Ratchet in both the symbolic (Dolev–Yao) and computational models, the protocol that protects Signal, WhatsApp, Meta's Messenger, and Google Messages.

The headline numbers: about 6.5 million lines of machine-checked Lean proof, resting on about 26,000 lines a reader must trust (18,000 of specifications plus 8,000 of AArch64 semantics). The five researchers worked for four weeks, none of them writing any proof code, and the agents flagged about one percent of the codebase for human review. DeepMind's context for that cost: verifying the seL4 microkernel took twenty person-years, and CompCert six. Pushmeet Kohli's post is blunter — "Similar efforts could take teams decades of combined effort. We did it in a month's time" — though that is a claim, not a measured comparison, and Google declined to disclose the compute cost.
Two results support the claim that the proofs mean something. The team reintroduced two previously patched libsignal bugs — a weak-state bug and a missing small-subgroup check in the PQXDH responder — and produced machine-checked proofs that the buggy binaries violate the security theorems. Writing the specifications also surfaced 15 gaps or bugs in a published computational analysis of the Double Ratchet. No new vulnerabilities were found in libsignal itself (MLQ, CellCog/WIRED).
The tooling is open: the code-verification repository is Apache-2.0 (libsignal crates keep their AGPL-3.0), with pinned toolchains, a SHA-256-pinned binary, and a comparator that verifies each headline theorem against its trusted challenge statement, audits axioms, and replays proofs in a fresh Lean kernel from lean4export output, sandboxed via Linux's Landlock. The agents themselves ran on Gemini 4 Carbon, with specifications drafted and cross-reviewed by agents on both Gemini 4 Carbon and Claude Opus 5.5.
Why it matters
The cost equation for formal verification just flipped from person-years to weeks. seL4 required twenty person-years of expert labor on code written with verification in mind; AlphaProof Code verified pre-existing production code, as compiled, in a month. That moves machine-level verification from a research exercise into the range of what a working team can commission for a critical artifact — and DeepMind names medical-device firmware and power-grid software as next targets.
For engineers, the transferable lesson is the trust architecture, not the model. AlphaProof Code's hard separation of a small, human-approved, trusted specification from millions of lines of untrusted agent-written proofs is what makes the scale safe: any logical error in a proof is rejected by Lean's kernel, so the reliability of the result does not depend on the reliability of the proving agents. The comparator pattern — a held-out copy of the spec, an axiom audit, a fresh-kernel replay — is a concrete, copyable way to prevent an agent from proving the wrong theorem or smuggling in assumptions. Start with that, not with "make an agent write proofs."
Finally, verifying the compiled binary shrinks the trusted base further: the guarantees bind to the machine code, so they do not depend on trusting rustc's optimizations or catching their bugs in review (CellCog).
Caveats
Everything above is DeepMind-reported. The paper is hours old, the proofs are machine-checked but the specifications are not independently reviewed, and any error would most likely live in those ~26,000 trust lines — that is exactly what an external audit should target. Scope limits are stated plainly in the paper and worth restating:
- What is covered: one-to-one sessions — the PQXDH handshake and Triple Ratchet — in libsignal v0.105.4 as built by Google into a CLI harness with hooked cryptographic primitives. SecurityWeek notes the result covers Google's build, "not Signal's own applications".
- What is not: key generation is not verified, side channels and secrets in memory are out of scope, group messaging is left for later, and the full Signal app was not verified.
- Quantum guarantees are partial. Handshake secrecy against a future quantum attacker holds only in the symbolic model; the computational bounds give no quantum guarantee, and the ratchet theorems show the Triple Ratchet is no weaker than the Double Ratchet without proving the post-quantum healing SPQR adds (MLQ).
- Trusted base: Lean's kernel, the cryptographic primitives (assumed in the computational proof, idealized in the symbolic proof), and contracts for some called routines (paper).
- Not a guarantee of "unbreakable encryption." As the daily.dev discussion puts it, the proofs do not assert computational secrecy of actual encrypted bytes (daily.dev).
Signal's own reaction was positive: CTO Ehren Kret said rigorous verification of the implementation "gives us even greater confidence in our code's privacy guarantees" (SecurityWeek). The honest reading of the announcement is not "Signal is proven secure" but "a widely deployed production crypto library has, for the first time, a machine-checked argument connecting its compiled binary to its protocol-level security properties — and the method that produced it is public."
Sources
- Introducing AlphaProof Code — Google DeepMind blog
- AlphaProof Code: Verifying Signal's Security at the Machine-Code Level — project page / paper
- google-deepmind/code-verification — GitHub repository
- Google DeepMind's AlphaProof Code — MLQ.ai
- Google widens Gemini 4 Carbon access after AI agents verify Signal code — SecurityWeek
- AlphaProof Code on Signal, by the numbers — CellCog
- DeepMind's 6.5M lines of Lean proofs make verification cheap — daily.dev