The AI Gazette

GoogleEvals

How DeepMind's agents proved Signal's compiled code secure, and why the spec was the hard part

AlphaProof Code splits formal verification into a human-approved Lean specification and a team of prover agents whose work only counts if Lean's kernel accepts it, and it produced about 6.5 million lines of proof for libsignal.

Google DeepMind used AlphaProof Code to prove security properties of libsignal v0.105.4, the Signal protocol's reference implementation, at the level of AArch64 machine code built from the unmodified Rust with the stock rustc compiler. The proofs cover the post-quantum PQXDH handshake and the Triple Ratchet, establishing forward secrecy, authentication, post-compromise security and handshake secrecy. About 6.5 million lines of machine-checked Lean rest on about 26,000 lines of trusted specifications and AArch64 semantics, and the work took a team of five four weeks.

The design keeps agents away from the definition of done. A specification-writer agent drafts Lean theorems with the user, skeptical reviewer agents critique each draft, and the approved spec's git commit becomes the baseline. A gatekeeper copies that spec into a held-out directory no agent can write to, and accepts a proof only if the comparator tool confirms the statement and every definition it depends on are identical, that only Lean's standard axioms are used, and that the kernel accepts it. Provers cannot edit the spec; they can propose small amendments to a critic agent that never sees the proof attempts.

The proof teams are organized around context limits. An orchestrator schedules work but never edits Lean files, team leads absorb the back-and-forth with workers and send short summaries upward, an architect revises the proof decomposition, and only an integrator commits, with each file edited by at most one worker at a time. A typical campaign ran 40 to 80 agents on a single machine for 24 to 72 hours, and agents try to falsify a goal before spending effort proving it.

Much of the effort went into making sure the spec was strong enough to mean something. Agents prove that theorem hypotheses are jointly satisfiable to rule out vacuous results, inject bugs such as skipping the ciphertext MAC check and prove the security theorem then fails, and the team reintroduced two previously fixed libsignal bugs and proved the resulting binaries violate the symbolic theorem. The paper's main lesson: "once proofs become cheap, the hard question is what to prove."

The limits are spelled out. Cryptographic primitives and 37 other routines are covered by trusted contracts rather than proved, the machine model has no threads, signals or dynamic linking, and the computational proof gives no guarantee against a quantum attacker. The Lean development, specifications and proofs are public.

From other editions

Say hi.