Playbooks · Coding tasks
AlphaProof Code verified Signal in Lean
Written November 11, 2026
DeepMind's agents wrote about 6.5 million lines of Lean to prove security properties of Signal's protocol down to the compiled machine code — in four weeks, a task the team says would historically have taken expert teams years. The proof is only as strong as the specifications it rests on, and those are the part a reader has to trust.
What was proved
AlphaProof Code is a multi-agent framework for formal verification: human experts work with AI agents to write the specification of what the code must do, and a team of prover agents writes the proofs. Applied to libsignal — the reference Rust implementation of the Signal protocol, version 0.105.4, with SPQR version 1.6.0 — the agents proved key security properties of the compiled AArch64 machine code, in a small command-line harness, with the cryptographic primitives hooked out and described by contracts. The properties proved are forward secrecy, authentication, post-compromise security, and handshake secrecy, for the post-quantum PQXDH handshake and the Triple Ratchet, in both the symbolic and the computational models of protocol security. The proofs are the first connecting protocol-level security guarantees to the unmodified code of a widely used cryptographic protocol implementation, according to DeepMind's announcement and the technical paper.
The scale is the story: about 6.5 million lines of machine-checked Lean proof code. Humans wrote and approved the specifications; the prover agents wrote the proofs, powered by Gemini Carbon. Lean's kernel checks every proof against the approved specification, and a gatekeeper agent accepts a proof only if the kernel checks it and a comparator confirms it proves exactly a held-out copy of the specification. The gatekeeper rejects any proof that uses sorry or native_decide.
What has to be trusted
The proofs are machine-checked, which means a logical error in a proof is caught by Lean's kernel. What the kernel cannot check is whether the specification says the right thing. The statements and definitions a reader must read and trust are about 18,000 lines of specifications, plus about 8,000 lines of AArch64 machine-code semantics — roughly 26,000 lines in total. A flaw in the specification weakens the guarantee the theorem provides, so the team had humans review the specifications, had reviewer agents critique drafts from a skeptical angle, and had the prover agents prove that the specifications' hypotheses are jointly satisfiable and met by concrete executions.
Beyond the specifications, the results trust Lean's kernel, the security of the cryptographic primitives — stated as assumptions in the computational proof and idealized in the symbolic proof — and the contracts of some routines the executable calls. The compiler is not part of what has to be trusted: the theorems are stated about the compiled binary itself, built with the stock rustc compiler, so the proof does not depend on the compiler being correct.
The test that the proof can catch real bugs
To confirm the specifications catch mistakes rather than proving anything put in front of them, the team reintroduced two real, previously fixed bugs into an isolated version of Signal's code. In both cases the system produced a machine-checked proof that the buggy version was insecure — the symbolic security theorems were provably false for the mutated binaries. A specification that proved the buggy code secure would have been worthless; this one failed loudly, which is the point of the test.
What it is not
- Not the whole Signal app. The proof covers the protocol's core cryptography in a command-line harness around
libsignal, not the full messaging application, its user interface, or its servers. - Not a guarantee the specification is right. The specifications are the trusted base. If a specification misstates a security goal, the proof proves the wrong thing correctly.
- Not a proof about the primitives. The cryptographic primitives are assumed secure in the computational proof and idealized in the symbolic proof. A break in a primitive is outside what was proved.
- Not a statement that Signal is proven secure, full stop. It is a proof that the compiled code fulfills the security properties the experts specified, against the models and assumptions above. That is a narrower claim, and it is the correct one to carry.
Where the artifacts live
The full Lean development is public at github.com/google-deepmind/code-verification, including the specifications, the proofs, the AArch64 semantics, and the scripts to build and kernel-check all proofs and to check the headline theorems with the comparator. The repository notes that building and checking everything takes several hours and roughly 15–34 GiB of peak memory. That is the honest cost of reproducing the result, and it is the reason the published artifacts matter: anyone can inspect the specifications — the part that has to be trusted — without rerunning the whole proof.
Related playbooks
- OpenAI's Yang-Mills proof is public in Lean
- Check a Cursor machine for the tampered Claude Code extension
- Claude Code 2.1.319: unattended runs stop stalling
- Claude Code 2.1.321: Fable 5.2 is default
Sources
- Introducing AlphaProof Code: a breakthrough in verifying complex software at depth — Google DeepMind
- AlphaProof Code: Verifying Signal's Security at the Machine-Code Level — Google DeepMind
- google-deepmind/code-verification — GitHub
Back to: Coding playbooks hub · Gemini 4 Carbon is here: $2 in, $10 out · OpenAI's Yang-Mills proof is public in Lean