# Google DeepMind AlphaProof Code Verifies Signal in Lean

*Updated on November 10, 2026*

Google DeepMind has introduced `AlphaProof Code`, a multi-agent formal verification system that generated roughly `6.5 million lines` of machine-checked `Lean` proofs to verify the unmodified Rust implementation of the Signal Protocol (`libsignal v0.105.4`) all the way down to `AArch64` Linux machine code. Led by Swarat Chaudhuri and completed in just four weeks following an April 2026 verification grand challenge, the work establishes mathematical security guarantees for cryptographic code protecting billions of conversations across Signal, WhatsApp, Meta Messenger, and Google Messages.

Historically, formal verification of real-world cryptographic software required either rewriting production libraries in specialized academic proof languages or spending person-decades verifying high-level protocol abstractions while assuming the compiler and low-level byte parsers had zero bugs. Neither compromise satisfied production reality: compilers miscompile edge cases, and memory or deserialization bugs frequently hide in unmodified Rust or C glue code rather than textbook protocol diagrams.

`AlphaProof Code` removes the rewrite bottleneck entirely. Starting from stock `libsignal v0.105.4` compiled with an unmodified `rustc` toolchain targeting `AArch64` Linux, multi-agent reasoning loops synthesized intermediate invariants, memory-layout lemmas, and instruction-level equivalence proofs, resting on a compact trusted computing base of roughly `26,000 lines` of human-audited formal specifications and `AArch64` ISA semantics.

Security architects should note the exact scope of what has and has not been proved so far. DeepMind's `6.5M-line` Lean artifact covers one-to-one encrypted messaging sessions, proving forward secrecy, authentication, post-compromise security, and handshake secrecy across Signal's post-quantum `PQXDH` handshake and `Triple Ratchet` (`Double Ratchet` combined with the `Sparse Post-Quantum Ratchet`, or `SPQR`) under both symbolic (`Dolev-Yao`) and computational cryptographic models. Group messaging protocols (`Sender Keys` / `MLS` paths) and non-`AArch64` compilation targets remain slated for future verification passes, and DeepMind plans to open-source `AlphaProof Code` for external maintainers.

<a aria-hidden="true" id="executive-fast-facts"></a>  Fast Facts

- **Verification System &amp; Timeline**: `AlphaProof Code` (multi-agent AI formal prover led by Swarat Chaudhuri), completing end-to-end verification in `4 weeks` as documented in the [Google DeepMind Code Verification technical report](https://google-deepmind.github.io/code-verification/).
- **Target Production Binary**: Unmodified Rust reference library `libsignal v0.105.4` (one-to-one messaging sessions) compiled with stock `rustc` directly to `AArch64` Linux machine code.
- **Proof Scale vs. Trusted Spec**: `~6.5 million lines` of machine-checked `Lean` proof code anchored to `~26,000 lines` of human-guided trusted specifications and `AArch64` machine-code semantics (`250:1` proof-to-spec leverage).
- **Cryptographic Protocols Covered**: Post-quantum `PQXDH` initial key agreement and `Triple Ratchet` (`Double Ratchet` + `Sparse Post-Quantum Ratchet` / `SPQR`).
- **Security Models Verified**: Proved under both the symbolic `Dolev-Yao` adversary model and the standard computational cryptographic model for forward secrecy, post-compromise security, handshake secrecy, and authentication.

## How Machine-Code Verification Eliminates the Compiler Trust Gap

Why verify `AArch64` machine instructions instead of stopping at Rust MIR or source AST level? Even memory-safe Rust relies on `unsafe` blocks, FFI boundaries, constant-time bitwise operations, and LLVM backend optimizations that can inadvertently introduce side-channel branches or subtle state-machine deviations during compilation.

| Verification Dimension | Traditional Academic Protocol Proofs | High-Level Verified Rewrites (`F*` / `HACL*`) | AlphaProof Code on `libsignal v0.105.4` |
|---|---|---|---|
| **Target Artifact** | Paper abstraction / toy model | Rewritten subset in proof DSL | **Unmodified Rust + stock `rustc` `AArch64` binary** |
| **Compiler in Trusted Base?** | N/A (No binary check) | Often trusts C/Rust backend | **No (`rustc`/LLVM output verified directly)** |
| **Engineering Timeline** | Months per protocol | Multi-year specialist effort | **4 weeks via multi-agent Lean synthesis** |
| **Trusted Specification Size** | Informal prose assumptions | Tens of thousands of lines | **~26,000 lines of Lean specs + ISA semantics** |
| **Generated Proof Volume** | 10K–100K manual proof lines | 100K–500K semi-automated lines | **~6.5M lines of machine-checked Lean** |

Because Lean's small kernel deterministically checks every single inference step in those `6.5 million lines`, hallucinations inside the `AlphaProof Code` agent swarm cannot corrupt the soundness of the result. Any invalid lemma fails type-checking immediately. Human security auditors no longer have to read `6.5 million` lines of tactics; they only have to audit the `~26,000` lines of top-level cryptographic definitions and `AArch64` instruction semantics to verify that the theorem statement matches real-world threat assumptions.

## Auditing Trusted Specifications in AI-Generated Proof Pipelines

For cryptography and high-assurance systems teams preparing for `AlphaProof Code`'s planned open-source release, the engineering discipline shifts from *writing proof tactics* to *hardening specification boundaries*. A valid Lean proof of a flawed specification still ships a vulnerable binary.

```
-- Illustrative Lean 4 top-level theorem shape for machine-code refinement:
-- Auditing focuses strictly on these 26K lines of spec, never the 6.5M tactic lines.
theorem libsignal_triple_ratchet_step_refines_spec
(s_mach : AArch64.MachineState)
(s_spec : SignalSpec.SessionState)
(h_mem  : LayoutValid libsignal_v0_105_4_elf s_mach s_spec) :
∃ s_mach' s_spec',
 AArch64.RunsToReturn s_mach ratchet_step_addr s_mach' ∧
 SignalSpec.TripleRatchetStep s_spec s_spec' ∧
 LayoutValid libsignal_v0_105_4_elf s_mach' s_spec' := by
-- 6.5M lines of AlphaProof Code synthesized proof obligations checked by Lean kernel
exact AlphaProofGenerated.ratchet_refinement s_mach s_spec h_mem
```

Three practical engineering takeaways stand out for security infrastructure leaders:

- **Separate Spec Review From Proof Generation**: Staff formal verification reviews with domain cryptographers dedicated exclusively to auditing the trusted specification (`~26K` lines in Signal's case) for under-constrained preconditions or missing side-channel assumptions.
- **Pin Exact Compiler Versions in Reproducible Builds**: Because machine-code proofs bind to the exact `AArch64` instruction stream emitted by a specific `rustc` version and optimization flag set, pair binary verification with deterministic Nix or Bazel build pipelines.
- **Prioritize Unmodified Rust Core Libraries Next**: Target compact, high-blast-radius Rust components such as TLS record parsers (`rustls`), JWT/OIDC token validators, TEE attestation verifiers, and microVM virtio device queues before attempting monolithic application binaries.

  Next Steps

1. **Inspect DeepMind's Public Verification Artifacts**: Review the trusted specification structure and `PQXDH` / `Triple Ratchet` security definitions published on `google-deepmind.github.io/code-verification/` to benchmark how your own cryptographic specs are structured.
2. **Adopt Deterministic `AArch64` / `x86_64` Build Pipelines**: Lock `rustc` versions, `Cargo.lock` hashes, and linker flags in CI now so security-critical binaries remain byte-for-byte reproducible when automated binary provers enter CI workflows.
3. **Identify High-Leverage Spec Targets Ahead of Open-Source Release**: Catalogue internal parser, sandbox, and key-management crates under `50,000` lines of Rust where machine-checked Lean specifications would eliminate recurring external audit bottlenecks.