Google DeepMind Uses AlphaProof Code to Verify Signal's Cryptographic Implementation
Google DeepMind says its AlphaProof Code framework has formally verified key security properties of Signal's compiled cryptographic code, generating 6.5 million lines of machine-checked Lean proofs in four weeks.
Xcademia Team

Google DeepMind has introduced AlphaProof Code, an agentic framework designed to use artificial intelligence and human expertise to formally verify complex software. Researchers used the system to prove key security properties of the compiled code behind Signal's cryptographic protocol.
The work focuses on libsignal, the reference implementation of the Signal protocol, which supports secure messaging in applications including Signal and Google Messages. Google DeepMind describes the achievement as the first formal verification of a widely deployed cryptographic protocol implementation at this depth, and the first such verification using any method.
The research addresses a longstanding challenge in software security: proving that an implementation provides the protections promised by its design. Security reviews and testing can identify weaknesses, but formal verification takes a different approach by expressing required properties as mathematical statements and checking whether the software satisfies them.
According to Google DeepMind, the verification took four weeks. The researchers produced approximately 6.5 million lines of Lean proof code, while the AI agents identified a small portion of the work that required additional human attention.
How AlphaProof Code Combines Human Expertise and AI Agents
AlphaProof Code uses multiple large language models and specialised agents to divide formal verification into distinct responsibilities.
Human researchers remain responsible for defining the security properties that need to be established. AI agents help translate those requirements into formal specifications, generate proofs, and examine the results.
The process has three main stages:
Specification: Researchers work with AI agents to convert established security goals and research into mathematical statements written in Lean. Human experts review and approve the specifications before proof generation begins.
Code analysis: The framework works with the actual compiled implementation rather than relying only on an abstract representation of the protocol. The research uses a formal model of AArch64 machine code.
Proof generation and checking: Autonomous agents generate mathematical proofs. Lean's trusted kernel checks the proofs against the approved specifications before they are accepted.
This separation is important because generating a proof and validating it are different tasks. The agents that produce proofs are not treated as the final authority. Their output must pass Lean's verification process.
The framework also includes review agents that examine proposed specifications and identify potential weaknesses. If the proof process reveals a problem with a specification, the proof-generating agents cannot change it freely; it must go through review and approval.

What Google DeepMind Verified in Signal's Code
The researchers applied AlphaProof Code to libsignal, the reference implementation of the Signal protocol. The technical paper identifies the evaluated implementation as libsignal version 0.105.4.
The verification covered two major cryptographic components:
PQXDH handshake: The post-quantum key agreement process used to establish a shared secret between communicating devices.
Triple Ratchet: The mechanism that derives fresh encryption keys as messages are exchanged, helping protect earlier communications and recover security after certain device compromises.
The research examined security properties including:
Forward secrecy: Protection of previously encrypted messages if a current key or session state is compromised.
Authentication: Assurance that messages and communication participants meet the protocol's authentication requirements.
Post-compromise security: The ability to restore protection after a device or session state has been compromised, under the conditions defined by the protocol.
Handshake secrecy: Protection of the shared secret established during the initial key agreement.
The researchers evaluated these properties using symbolic and computational security models. The paper reports proofs of message confidentiality and authenticity, forward secrecy, and post-compromise security for the compiled implementation. It also establishes handshake secrecy against a future quantum attacker in the symbolic model.
An important distinction is that the research did not simply verify an abstract description of Signal's cryptographic design. It connected protocol-level security statements to the compiled implementation, allowing the researchers to examine whether the actual machine code met the approved specifications.
Why Machine-Code Verification Matters
Formal verification of cryptographic protocols has traditionally concentrated on mathematical models of their designs. These models are valuable, but they do not automatically establish that production software implements the intended protections correctly.
The implementation can introduce additional risks through programming errors, compiler behaviour, memory handling, or differences between the model and the running program.
Google DeepMind's approach moves the verification target closer to the executable software. The researchers compiled the unmodified Rust implementation using the standard Rust compiler and examined the resulting AArch64 Linux machine code through a formal semantics written in Lean.
This matters because the proof is tied to the compiled implementation rather than depending solely on an assumption that the source code faithfully represents the protocol design.
The technical paper also explains that the formal model covers machine instructions and selected system interactions. It does not attempt to model every possible operating-system or hardware behaviour. Certain low-level cryptographic routines and other functions are represented through reviewed contracts and assumptions.
Consequently, the results provide strong assurance about the properties included in the specifications and the execution environment covered by the model. They should not be interpreted as proof that every component, dependency, or deployment surrounding Signal is free from security weaknesses.

Six Million Lines of Lean Proofs Produced in Four Weeks
One of the most notable aspects of the project is the scale of the proof-generation effort.
Google DeepMind's announcement reports more than six million lines of Lean code. The accompanying technical paper provides a more specific figure of approximately 6.5 million lines of machine-checked proof code.
The paper also explains the division of work behind this output. The proof development involved a team of five researchers working over four weeks, with AI agents operating continuously on their workstations.
The researchers organised the agents into teams with different responsibilities. An orchestrator assigned and coordinated tasks, while individual proof workers handled smaller verification goals. Team leads managed groups of workers, and specialised roles helped organise and integrate the resulting proofs.
The technical paper reports that proof campaigns typically involved 40 to 80 agents working on a single machine over periods of 24 to 72 hours.
The scale of the generated proof code does not mean that every line required the same level of human inspection. The researchers distinguish between the large body of machine-checked proofs and the smaller trusted specifications and formal machine-code semantics on which the results depend.
Google DeepMind's announcement says the agents highlighted approximately one percent of the codebase for additional human attention. Lean checked the remaining proofs, allowing researchers to concentrate their review on areas requiring human judgment.
This division of responsibilities helps explain the framework's intended advantage: AI agents handle much of the proof-generation workload, while human researchers retain control over the security requirements and critical assumptions.
Testing Whether AlphaProof Code Can Detect Real Bugs
The researchers also evaluated whether the framework could distinguish secure implementations from versions containing known defects.
They took two previously fixed bugs from libsignal and deliberately reintroduced them into an isolated version of the code. AlphaProof Code then generated machine-checked proofs showing that the modified binaries violated the relevant security properties.
This provided a way to test whether the specifications and verification process could identify known failures rather than merely produce proofs for the intended implementation.
The technical paper describes additional testing of the specifications, including the use of deliberately introduced mistakes and checks designed to identify weak or contradictory assumptions.
The results demonstrate that the system could detect the security consequences of the reintroduced bugs within the properties and models examined. They do not mean that AlphaProof Code has been shown to discover every possible software vulnerability.
What Signal's Response Says About the Research
The announcement includes feedback from Ehren Kret, Chief Technology Officer at Signal.
Kret described the ability to use AI agents to translate production code into valid Lean theorems as a significant development. He also highlighted the potential value of applying formal verification to a larger portion of the implementation, particularly as AI-driven security threats increase.
For Signal, the work provides additional assurance that the verified cryptographic implementation meets the privacy and security properties specified by the researchers.
The statement is important because the project connects formal mathematical guarantees to production-oriented code rather than limiting the analysis to a simplified protocol model.
However, the verification should be understood within its documented scope. The technical paper focuses on one-to-one messaging sessions in libsignal version 0.105.4. Group messaging is identified as future work, alongside other areas such as sealed sender and server-side protocols.
The paper also documents assumptions concerning cryptographic primitives, selected library routines, and the execution environment. These remain relevant when interpreting the results.
Open-Sourcing the Verification Work
Google DeepMind says it is making the formal verification artifacts available to the research and developer community.
The published Lean development includes the specifications and proofs used in the project. Researchers and software engineers can examine the work through the project's public repository:
Google DeepMind Formal Verification Artifacts
The company has also published a technical paper titled AlphaProof Code: Verifying Signal's Security at the Machine-Code Level. The paper provides a deeper explanation of the framework, verification models, implementation scope, proof architecture, and research findings.
Read the technical paper (PDF)
Making these artifacts available gives other researchers an opportunity to inspect the methodology and explore how similar techniques could be applied to other software systems.
Potential Applications Beyond Secure Messaging
Google DeepMind sees the work as a step towards applying formal verification to a broader range of critical software.
The company identifies medical device firmware and power grid software as examples of systems where stronger verification could be valuable. These environments depend on software whose failure can have consequences beyond individual applications or services.
The research also points to the possibility of combining formal verification with automated defensive systems such as CodeMender, Google's AI agent for code security.
CodeMender focuses on identifying and addressing software security issues, while formal verification aims to establish mathematical evidence that specified properties hold. Google DeepMind suggests that combining these approaches could help organisations address security risks more effectively as threats become faster and more automated.
However, the company acknowledges that scaling formal verification will require further research. Applying the method to other systems will involve developing suitable specifications, defining the properties that need to be proven, and accounting for the assumptions and components outside the verification scope.
What AlphaProof Code Means for Software Security
AlphaProof Code demonstrates how AI agents can support a demanding part of software assurance: generating formal proofs for complex, existing code while keeping human experts responsible for defining and approving the properties being verified.
The Signal research is a significant step because it connects cryptographic security guarantees to compiled implementation code. Its four-week timeline and approximately 6.5 million lines of machine-checked Lean proofs also illustrate how agent-based systems can reduce some of the labour involved in large verification projects.
The work does not remove the need for careful specifications, trusted assumptions, independent review, or broader security testing. Instead, it offers a framework in which AI can take on much of the proof-generation work while formal checking and human oversight remain central.
As Google DeepMind releases its verification artifacts, the next question is how far this approach can extend to other software that supports essential digital services and infrastructure.
Source: Google DeepMind
About the Author