Google DeepMind Says AI Agents Formally Verified Signal Encryption Code in Lean

Google DeepMind says its AlphaProof Code system has helped create machine-checked proofs about security-relevant software underpinning Signal’s encryption. The work, described in a new paper, uses AI agents to assist with writing specifications and Lean proofs, while Lean’s proof checker verifies whether the resulting proof scripts are valid. The result is potentially significant because it targets a harder and more valuable problem than code generation: producing checkable evidence that critical software meets explicitly stated security properties. [1]

The claim also has an important boundary. A formal proof is only as strong as the property being proved, the model used to represent the program, and the assumptions admitted into the proof. Google’s paper says the formal specifications were subject to human review. That is not a minor qualification: deciding what an encryption component must guarantee is the core engineering and security task that AI assistance does not eliminate. [1]

From code generation to proof-producing agents

AlphaProof Code is presented as a framework for agents that work on formal verification tasks in Lean, a proof assistant and programming language used to express mathematical definitions, state theorems and mechanically check proofs. Rather than asking an AI system merely to produce source code that appears plausible, the framework has agents help construct artifacts that must survive Lean’s verifier.

That distinction matters in security-sensitive software. Conventional testing can show that selected inputs produce expected outputs; fuzzing can find crashes and malformed-input failures; code review can catch design mistakes. None of those methods establishes that every possible execution satisfying a model’s assumptions obeys a stated invariant. A valid formal proof can provide that stronger guarantee for the theorem that has actually been encoded.

AI can be useful at several stages of this process. Agents can search a codebase, propose definitions, identify reusable lemmas, translate informal requirements into candidate formal statements, try proof strategies and repair failed proof attempts. Lean then acts as a hard gate: a proof script that does not type-check is not accepted simply because an AI model expressed confidence in it.

This is a more constrained role than autonomous software development. The model may generate a great deal of exploratory work, but the final accepted proof is checked by a small trusted verification core. That architecture is one reason formal-methods researchers see proof assistants as a more credible application for AI than unrestricted generation of security code.

computer programming office
Photo: Software: Microsoft Corporation
PantheraLeo1359531 😺 (talk), Public domain, via Wikimedia Commons

What the Signal result does — and does not — establish

Google describes the work as formal verification of security-relevant code behind Signal’s encryption. That is a consequential target: Signal is widely associated with end-to-end encrypted messaging, where flaws in key handling, ratchet-state transitions, serialization or cryptographic API use can undermine otherwise sound protocol designs. [1]

But the scope must be read precisely. “Code underpinning Signal’s encryption” is not equivalent to a proof that the entire Signal application, its deployed infrastructure or every user’s messages are secure. A full security claim would need to cover much more than an implementation fragment. It could encompass protocol design, cryptographic primitive assumptions, platform-specific bindings, memory safety, build and update systems, device compromise, metadata exposure, user-interface behavior and operational controls.

The practical questions are therefore specific:

  • Which source files, functions or modules were modeled and proved?
  • What properties were stated: functional correctness, preservation of state invariants, absence of particular error states, conformance to an algorithm, or a cryptographic security condition?
  • Which implementation version, dependencies and build configuration does the proof apply to?
  • How does the formal model relate to the production code that is compiled and shipped?
  • What assumptions about cryptographic libraries, compilers, runtimes and external callers are outside the proof boundary?

The paper is the primary record for those answers. A rigorous reading should distinguish a proof of a component-level invariant from a proof of end-to-end application security. The former can still be highly valuable, especially if it protects code at the center of encryption-state handling; it simply should not be inflated into a blanket guarantee.

Signal’s role also deserves careful description. Google says the formal specifications were reviewed by humans, but human review of a specification is not the same thing as a public statement that Signal engineers audited, approved or adopted every proof artifact in the project. Readers should look to the paper’s authorship, acknowledgments and explicit review process for evidence of Signal’s participation, as well as for confirmation of whether the verified work has been incorporated into a shipping code-review or release workflow. [1]

software engineer laptop
Photo: Cory Huston, Public domain, via Wikimedia Commons

Why specifications are the hard part

Formal verification changes the question from “did the software work in the tests?” to “does this implementation satisfy this precise statement?” That is powerful, but it makes the statement itself a critical security artifact.

A specification can be too weak. For example, a proof might establish that a state transition never produces an invalid internal representation, while saying nothing about whether the transition uses the correct key, authenticates the correct peer or rejects a maliciously replayed message. A specification can also omit an adversarial assumption, model a library incorrectly or fail to capture behavior at a language boundary. Lean can prove the theorem exactly; it cannot determine whether engineers asked the right theorem.

That is why the paper’s emphasis on human review matters. Domain experts must decide which security invariants belong in the specification, examine whether the model reflects the production implementation and review the assumptions inherited from cryptographic primitives and surrounding software. AI can accelerate the formalization work, but it cannot convert an ambiguous product requirement into a complete security definition without human judgment.

Formal-methods practitioners have long made this distinction: proof is stronger than testing within its stated scope, not a replacement for threat modeling, independent review and operational security. The strongest deployment model combines the techniques. Testing and fuzzing explore unexpected behavior; audits scrutinize design and implementation choices; formal proofs establish high-assurance properties where the model is accurate; and release processes ensure the proved artifact remains connected to the code users receive.

Lean’s role and the trusted computing base

Lean is central to the credibility of the approach because accepted proofs are checked mechanically. Agents may use probabilistic language-model inference to propose a proof, but acceptance does not rest on that inference. The generated term or proof script must be validated under Lean’s logical rules.

That does not mean the entire pipeline is automatically beyond doubt. Every formal-verification project has a trusted computing base: the proof checker, the semantics used to represent source code, any compiler or translation relationship relied on, and assumptions imported as axioms or external theorems. Security engineering also requires reproducible builds, version control and controls ensuring that a later code change does not silently invalidate a proof.

For real-world adoption, proof maintenance may be as important as initial proof construction. Encryption software evolves through performance changes, API revisions, bug fixes and support for new platforms. If agents can help update definitions and repair proofs after narrowly scoped changes, they could lower one of formal verification’s historic costs. If every routine patch triggers weeks of expert proof repair, the technique will remain limited to unusually stable and high-value components.

Industry implications: assurance becomes a software artifact

The immediate market effect is unlikely to be an overnight replacement for security review. The more plausible outcome is a gradual expansion of formal methods from specialized teams into selected parts of mainstream security engineering: cryptographic state machines, parsers, authorization engines, payment logic, kernel components, firmware and safety-critical controls.

Google DeepMind’s contribution is aimed at the labor bottleneck. Writing proofs demands both knowledge of the target system and fluency in a formal language. If agents can take on repetitive lemma discovery, proof search and codebase navigation while experts retain responsibility for specifications and acceptance, organizations may be able to apply formal methods to more production code.

That would create demand for a different security workflow rather than eliminate human experts. Teams would need engineers who can formulate invariants, evaluate the gap between a model and deployed code, manage trusted dependencies and interpret proof coverage honestly. Vendors that present an AI-generated Lean proof as a universal “verified secure” label will risk repeating a familiar security mistake: turning a narrow technical result into a broad marketing claim.

The strongest near-term use cases will likely be code with sharply defined behavior and high failure costs. Signal-related encryption code fits that pattern. The value of a proof is greatest where a small error can have disproportionate consequences and where the properties can be stated in a form a proof assistant can check.

What to watch next

The next evidence to seek is not another benchmark score. It is a reproducible, reviewable connection between formal artifacts and production engineering: publicly stated theorem scopes, source revisions, assumptions, automation details, review records and proof updates tied to future code changes.

It will also matter whether AlphaProof Code’s results can be replicated on other mature codebases with different architectures and languages. A system that succeeds only on carefully prepared tasks would be useful research infrastructure. A system that reliably helps teams maintain proofs as production software changes would be a meaningful shift in how security-critical systems are built.

Google’s Signal result is best understood as progress toward that second outcome, not proof that AI has solved software security. It shows a route by which AI can contribute evidence rather than just output — provided the people using it remain exacting about what, precisely, that evidence proves. [1]

Editor’s Take

I see this as one of the more commercially meaningful directions for AI in software engineering. A proof assistant is an unusually good place to put a generative model to work: the model can explore, propose and iterate quickly, while the checker refuses invalid final answers. That is a far better risk profile than asking an agent to write sensitive code and trusting a conventional test suite to catch everything.

The claim worth watching is not that Signal has become “formally secure.” It is whether the exact properties, code boundary and review chain become clear, and whether the proofs stay current as the software changes. If DeepMind can make that maintenance loop practical for cryptographic libraries and other high-assurance components, it could move formal verification from a specialist expense to a normal part of serious secure-software development.

References

  1. Google DeepMind — https://deepmind.google/documents/36/Formal_Verification_of_Signal_4.pdf

Leave a Reply

Your email address will not be published. Required fields are marked *