Google DeepMind has taken a major step forward in artificial intelligence and cybersecurity by using AI to mathematically verify the security of software encryption systems. Leveraging advanced AI technologies such as Gemini 4 Carbon and AlphaProof Code, researchers successfully verified the security properties of libsignal, the core reference implementation of the Signal Protocol.
The Signal Protocol is the cryptographic backbone behind end-to-end encryption (E2EE) in some of the world’s most popular messaging applications. It plays a vital role in protecting messages on Signal and WhatsApp, and is also integral to RCS end-to-end encryption in services like Google Messages.
AlphaProof Code: Mathematically Proving Software Security with AI
Traditionally, software developers rely on code reviews, automated testing, and security audits to verify software security. However, these methods cannot mathematically prove that a program will behave securely under every possible condition.
To solve this, Google DeepMind introduced AlphaProof Code, a multi-agent AI framework designed to prove software correctness and security using Formal Verification.
The framework operates through three main stages:
- Specification: Defining the exact security requirements and mathematical rules for the software being tested.
- Code Analysis: Analyzing the actual software code and its behavior.
- Formal Proof: Generating mathematical proofs via AI agents and verifying them through the Lean Proof Assistant.
A critical advantage of this approach is that it does not blindly trust AI-generated outputs. Every mathematical proof created by the AI is strictly checked by Lean’s trusted kernel. Even if an AI agent produces an incorrect proof, the system automatically rejects it.
According to Google DeepMind, this framework allowed them to complete a complex verification task in just four weeks—a process that would previously have required years of specialized human effort.
Verifying the Encryption Behind Signal, WhatsApp, and Google Messages
The highlight of this research is the verification of the Signal Protocol, which secures communications for billions of users worldwide across Signal, WhatsApp, Meta Messenger, and Google Messages.
Focusing on libsignal (the software library that executes the protocol's core functions), Google DeepMind used AlphaProof Code and Gemini 4 Carbon to mathematically verify several foundational security properties:
- Forward Secrecy: Ensures that even if a user's encryption key is compromised in the future, past messages remain unreadable.
- Post-Compromise Security: Guarantees that if a user's device or session is temporarily compromised, the system can recover to a secure state.
- Message Confidentiality: Confirms that message contents cannot be read by unauthorized parties.
- Authentication: Verifies the identity of communicating parties and the integrity of the messages.
The verification specifically targeted two core cryptographic mechanisms: the PQXDH Handshake (which establishes a shared secret to initiate a secure session) and the Triple Ratchet (which continuously updates encryption keys during message exchanges to maintain security).
6.5 Million Lines of Mathematical Proof Code
The scale of this achievement is reflected in the research metrics reported by Google DeepMind:
| Metric | Result |
|---|---|
| Mathematical Proof Lines (Lean) | 6.5M+ |
| Research Duration | 4 Weeks |
| Research Team Size | 5 Members |
| Machine Instructions Verified | ~140,000 |
In addition to verifying secure code, researchers reintroduced two previously patched real-world security bugs into libsignal to test the system's detection capabilities. AlphaProof Code successfully generated mathematical proofs demonstrating that the flawed code was insecure—proving its value not only in certifying secure code, but also in identifying vulnerabilities.
What This Means for the Future of Cybersecurity
The goal of this research is not to claim that apps like WhatsApp or Signal are 100% immune to all threats, as the study did not cover every component of the full applications. Instead, it demonstrates that AI can deeply audit critical encryption components to verify correctness and catch security flaws.
Looking ahead, AI-driven formal verification has massive potential in high-stakes industries such as banking systems, medical software, and aviation. Moving beyond simply writing code or automating routine tasks, AI is now paving the way for mathematically proven, ultra-secure digital infrastructure.


