DEV Community

AlphaProof Code: How AI Agents Formally Verified Signal's Encryption in Four Weeks

Formal verification - mathematically proving that software does exactly what it claims - has long been the gold standard of software security. It is also notoriously expensive. Verifying the seL4 microkernel took twenty person-years. Verifying the CompCert C compiler took six. For most production software, that cost is simply out of reach.

On November 10, 2026, Google DeepMind published AlphaProof Code, a multi-agent AI framework that completed a comparable feat in four weeks with a team of five researchers - and none of them wrote a single line of proof code.

What Was Actually Verified

The target was libsignal, the open-source reference implementation of the Signal protocol. Signal's cryptography protects billions of conversations in Signal, WhatsApp, Messenger, and Google Messages.

The protocol has two main components: the PQXDH handshake, which establishes a shared secret between two parties (including a post-quantum key encapsulation step), and the Triple Ratchet, which derives a fresh encryption key for every single message.

Prior formal verification work on Signal stopped at the design level - proving that the protocol specification was sound. AlphaProof Code went further: it proved that the compiled machine code of libsignal satisfies those security properties. The proofs are stated over the actual AArch64 binary, not the Rust source. That distinction matters because real-world vulnerabilities often hide in the gap between a correct design and its implementation.

The security properties established include:

  • Forward secrecy: old messages remain protected even if a device's long-term keys are later stolen
  • Post-compromise security: the ratchet recovers after a temporary breach
  • Authentication: messages cannot be forged
  • Handshake secrecy: the session key established during PQXDH is not leaked

How AlphaProof Code Works

The framework divides formal verification the way a research team would, separating the work into two distinct phases.

Phase 1: Specification Writing. Humans decide what to prove. A specification-writer agent works with researchers to translate Signal's security goals into formal Lean theorems. Reviewer agents critique each draft. Human experts approve the final specifications. This is the trusted part of the system - the specifications cannot be automatically checked, so they require human judgment.

The key insight here is that the specifications are small: about 27,000 lines of trusted Lean code. The proofs, by contrast, are enormous.

Phase 2: Autonomous Proof Generation. Once specifications are approved, teams of 40 to 80 autonomous agents - powered by Gemini 4 Carbon - take over. An orchestrator divides the proof work into subtasks. Proof workers tackle individual lemmas. An architect designs and revises the high-level proof decomposition. An integrator merges verified proofs into shared library modules and removes duplicate lemmas.

Every proof is checked by Lean's kernel, which serves as the ultimate arbiter. If an agent makes a logical error, Lean rejects the proof. The agents' work is untrusted by design - only the kernel's verdict counts. A gatekeeper agent accepts a proof only when Lean confirms it proves exactly the specification the human approved.

The result: 6.3 million lines of machine-checked Lean proof code, generated in four weeks.

Testing Against Real Bugs

To validate that the specifications were strong enough to catch actual flaws, the team reintroduced two previously fixed bugs from libsignal's history: a "Weak state" bug and a "Small subgroup" bug. In both cases, AlphaProof Code produced a machine-checked proof that the buggy version was insecure.

The system found no new flaws in the portions it checked. This is a meaningful sanity check. A formal verification system that cannot detect known bugs provides weak assurance. The fact that AlphaProof Code caught both historical vulnerabilities suggests the specifications are capturing the right properties.

What the Proofs Do Not Cover

The technical paper is explicit about scope. The verification covers one-to-one chats in a specific build of libsignal, not the full Signal application. Group messaging, key generation, and the Signal app itself are out of scope.

The proofs also assume that low-level cryptographic primitives - SHA-256, AES-CBC, Kyber1024 - behave as specified; they do not verify those primitives themselves.

Signal's CTO Ehren Kret acknowledged the result while noting its limits: "As AI-driven security threats grow, having the core Signal protocol rigorously verified with automated theorem proving gives us even greater confidence that our code delivers on its privacy guarantees."

The Shift in What's Hard

Perhaps the most interesting observation from the paper is about where the difficulty now lies. Swarat Chaudhuri, one of the lead researchers, told The Register: "We really believe that the next frontier is not going to be proof but specification."

When proofs become cheap to generate, the bottleneck shifts to deciding what to prove and writing precise formal statements of those properties. Specification writing requires deep domain knowledge - understanding what "forward secrecy" means in the context of a specific protocol, and translating that into a Lean theorem that captures the right attacker model. That is still a human-intensive task, and it is where most of the four weeks went.

This has practical implications for how formal verification might scale. If AI agents can handle proof generation reliably, the limiting factor becomes the supply of people who can write good specifications - a different skill set from traditional proof engineering.

Broader Implications for Software Security

AlphaProof Code is a step toward making formal verification economically viable for production software. The seL4 microkernel verification took twenty person-years and required the code to be written with verification in mind. AlphaProof Code verified pre-existing, unmodified production code in four weeks.

The framework is not yet a general-purpose verification tool. The Signal project was carefully scoped, and the team had deep expertise in both cryptography and formal methods. But the trajectory is clear: AI agents are compressing the cost of formal verification by orders of magnitude.

DeepMind has open-sourced the verification artifacts - the specifications, proofs, and AArch64 semantics - for community review. This matters because the value of formal verification depends on the community being able to audit the trusted computing base. Open-sourcing the work invites scrutiny of the 27,000 lines of trusted specifications, which is exactly where errors would be most consequential.

For practitioners, the near-term takeaway is not "run AlphaProof Code on your codebase." It is that the cost curve for formal verification is bending, and the skills that will matter most - writing precise, auditable specifications of security properties - are worth developing now.

Primary source: AlphaProof Code blog post and technical paper by Google DeepMind (November 10, 2026). Additional reporting from The Next Web (November 12, 2026).

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.