Formal Verification of Signal’s Protocol with Gemini

Open original

Google DeepMind used a multi-agent AI system called AlphaProof Code to mathematically prove security properties of the actual compiled code behind Signal's encryption protocol, a task that usually takes expert teams years. The whole verification took four weeks, with humans reviewing only about one percent of the generated proofs.

  • Formal proofs were generated for the real Signal implementation, not just its design, covering over six million lines of Lean code.
  • The system was tested by reintroducing two previously fixed bugs, and in both cases it produced a machine-checked proof that the buggy version was insecure.
  • Human experts only needed to review about one percent of the codebase, since Lean automatically checks the rest.

DeepMind says it used a new agentic system, AlphaProof Code, to formally verify the actual code behind Signal's cryptographic protocol, the machinery that protects messages in Signal and Google Messages. Formal verification means mathematically proving that code behaves as specified, which is the strongest security assurance available but usually takes expert teams years. Here, the process took four weeks. Humans first translated Signal's security goals into formal specifications, with experts reviewing each one. Then a group of agents powered by Gemini Carbon wrote more than six million lines of Lean, a proof language, to establish the properties. The agents also flagged roughly one percent of the codebase for human review, and Lean checked the rest automatically. The reported security properties include keeping messages protected before and after a device is temporarily compromised. The part worth paying attention to is the gap between design and implementation. Most prior protocol verification stops at the design level, proving the blueprint is sound but not that the compiled code running on phones matches it. Real vulnerabilities often live in that gap, and closing it is what makes this proof harder. The team also tested whether the system could tell good code from bad by reintroducing two real, previously fixed bugs into an isolated copy of Signal's code. In both cases the system produced a machine-checked proof that the buggy version was insecure, which is the sanity check you'd want before trusting the tool. DeepMind says this is the first time AI has been used to formally verify a widely deployed cryptographic protocol at this depth, and the first time an implementation of such a protocol has been formally verified by any method. The article is more forward-looking than the results section. It suggests the same approach could eventually cover medical device firmware and power grid software, and pairs formal verification with DeepMind's CodeMender defense agents as a response to AI-driven cyber threats. Those are claims about future work, not demonstrated results. The concrete takeaways are the Signal result, the four-week timeline, the bug-injection test, and the open-sourcing of the verification artifacts along with a technical paper, which is the part to read if you want to check the claims yourself.

Ask about this article