Malotru
Back to notes

The Proof Reaches the Binary

November 11, 2026

DeepMind's AlphaProof Code, announced 10 November, has people and models write Lean specifications, then Gemini 4 Carbon agents prove them of compiled, unmodified AArch64 libsignal. The paper reports about 6.5 million lines of machine-checked Lean on about 26,000 trusted lines, in about four weeks, for PQXDH and the Triple Ratchet. The blog body says over six million lines; the page's short description says over three million. Two reintroduced bugs fail the symbolic theorems. The kernel checks the proofs. The specification, the AArch64 semantics, and the hooked contracts remain what a reader must trust.

The Proof Reaches the Binary

On 10 November 2026 Google DeepMind introduced AlphaProof Code, a human-guided framework for formal verification, and reported that it had been used on libsignal, the reference implementation of the Signal protocol. Humans, working with models, write the Lean specifications of the security goals. A team of prover agents then tries to show that those goals hold of compiled machine code. A proof counts only if Lean's kernel accepts it, and only if a comparator confirms that it proves a held-out copy of the specification a person approved [Source 1][Source 2].

The target is not a diagram of the protocol. The team wrapped the unmodified libsignal crates, version 0.105.4 with the SPQR crate at 1.6.0, in a small command-line harness and compiled that harness with stock rustc 1.98.1 to one AArch64 Linux executable, linked with stock LLVM. The theorems are about whole runs of that binary. Each run does one operation for one party: start a session, or encrypt or decrypt one message. Key generation is not proved. The parties' keys are part of the setup. Group messaging is left as future work. The proofs follow init, send, and receive from the executable's entry point to the final exit [Source 2][Source 3].

What they claim is the composition of the post-quantum PQXDH handshake and the Triple Ratchet, as libsignal deploys them, not as two papers analyzed them separately. In the symbolic model, ten theorems cover forward secrecy and post-compromise security of message keys, handshake authentication and resistance to key-compromise impersonation, and handshake secrecy even if a later attacker breaks Diffie-Hellman. In the computational model, one theorem gives a concrete bound on an attacker's advantage for confidentiality and authenticity of messages, again with forward secrecy and post-compromise security. The paper calls these the first proofs of protocol-level security properties for the unmodified code of a widely deployed cryptographic implementation [Source 2].

The line count is where the public write-ups diverge, and the paper is the one tied to the artifact. It says the agents generated about 6.5 million lines of machine-checked Lean, resting on about 26,000 lines a reader must trust: about 18,000 lines of specifications and definitions in the repository, plus about 8,000 lines of AArch64 semantics, together with the symbol names in a Lean image of the binary whose bytes the kernel checks against the executable. The DeepMind post's body says the agents generated over six million lines. The same page's short description says over three million. Six and a half million is the figure in the paper [Source 1][Source 2].

A team of five did the work in about four weeks, symbolic and computational proofs in parallel. The authors write that none of them wrote proof code. The proofs came from agent teams powered by Gemini 4 Carbon. Specifications were a different loop. Humans and agents using both Carbon and Claude Opus 5.5 drafted them, reviewers checked faithfulness to the literature and to libsignal, and people approved and pinned a specification before proving began. The launch post adds that an audit pass marked about one percent of the codebase for a second human look, because the kernel checks the rest [Source 1][Source 2].

The gap a design proof leaves open

Formal work on Signal already exists, symbolic and computational, on the handshake and on the ratchet. The paper's claim is that those efforts target abstract protocol models, verification-friendly reimplementations, code modified to make the proof easier, or narrower properties such as crash-freedom. libsignal does more than the protocol sketch. It keeps a large mutable session, stores keys for messages that arrive out of order, splits post-quantum encapsulation messages across ordinary messages, serializes with protobuf, and archives earlier sessions so a delayed message can still be decrypted. A bug can live in that machinery and never appear in a design-level model. Stating the theorems about the compiled binary is what pulls that machinery into the claim. It also drops the Rust compiler and the Rust semantics out of the trusted base, at the cost of reasoning about optimized AArch64 [Source 2].

Two previously fixed bugs were put back into an isolated build, to test whether the specification would notice. In one, a prekey message that decrypted only under an archived session still caused the code to store the new session's state, including a copy of the signed prekey's secret. In the other, a small-subgroup encoding of an X25519 base key, a distinct encoding with the same Diffie-Hellman outputs, was accepted by the buggy binary and rejected by the model's check for a canonical key. For both, Lean produced a machine-checked argument that the buggy binary violates the symbolic security theorem. The disproofs use only Lean's standard axioms. The kernel parses a SHA-256-pinned ELF and steps the machine code of the witness traces [Source 2].

That is the sense in which an implementation-level proof closes a gap a design proof leaves open. A design proof can be true of the protocol on paper and silent about the binary people run. These theorems are about the executable. They show something else at the same time: they show that the binary meets a specification, and the specification is only as strong as the review that approved it.

What the kernel does not check

The millions of lines of proof are untrusted on purpose. A logical error is rejected by the kernel, so the result does not depend on the prover agents being right. The specification is trusted. It is the theorem statements and every definition they depend on, including the model of the environment. Nothing automatically checks that a specification means the property a reader thinks it means. A theorem with weak assumptions, a weak conclusion, or a loose witness can hold of buggy code. The paper says human review is not expected to catch every such mistake at this size. Reviewer agents and proved sanity checks sit beside the review. Amendments that change trusted assumptions go through a person, or through a policy that person set. A gatekeeper accepts a proof only when the comparator says the statement and every definition it depends on match the held-out copy, the proof uses only Lean's standard axioms, and the kernel accepts it. The repository names those axioms: propositional extensionality, quotient soundness, and classical choice [Source 2][Source 3].

The AArch64 semantics is trusted as a set of definitions: the decoder, the instruction semantics, the memory model, the loader, and the system-call model. The program logic is not. Its separation-logic rules are proved sound in Lean against the top-level statement of what a run may do. The trusted definitions were tested in lockstep against the Unicorn emulator and against Arm's Sail model. Testing is not a proof that the semantics matches the processor [Source 2].

Low-level cryptographic routines, two output functions, and a few library routines are not executed in the proof. A call is intercepted and replaced by a trusted contract. The paper's summary says everything else in the binary is verified. The symbolic theorem assumes perfect cryptography. It excuses collisions between different terms that happen to have the same bytes, it does not bound the probability of those collisions, and it says nothing about the computational secrecy of the bytes. The computational theorem is a bound under stated assumptions about the primitives. Neither development verifies the code inside the hooks. Leaks in the symbolic model cover long-term keys, prekeys, and the keys of the current session, not side channels. The symbolic forward-secrecy theorems do not rule out a replay-based loss of forward secrecy that an earlier design analysis had already described. The computational theorem is classical. It lets the attacker choose the sparse post-quantum ratchet's keys, so it does not prove the post-quantum healing that mechanism is designed to provide [Source 2].

A reader who trusts the kernel, the pinned specification, the semantics, and the hooked contracts has a proof about one-to-one sessions of this command-line binary. A reader who wanted a proof of the Signal application, of group messaging, or of the primitive implementations, does not have one. The specifications and proofs are public, with scripts that rebuild the pinned executable and rerun the comparator [Source 1][Source 2][Source 3].

Sources