Signal's libsignal encryption code formally proven correct
A Google DeepMind team used AlphaProof Code to formally verify the compiled libsignal library behind Signal, end to end. What the proof does and does not cover matters just as much.

A team at Google DeepMind has produced a complete formal proof of the code that implements the encryption mechanism of the Signal messaging app. The researchers call the method AlphaProof Code and argue that the same approach could be applied to other software that needs end-to-end verification. The paper and the repository containing the proof are publicly available.
The team examined the Arm-compiled build of libsignal, the library used inside Signal, together with a minimal scaffold added around it. The verification was done not against source code but deliberately against an AArch64 binary, a choice that makes the method reusable for verifying other software.
The proof targets the compiled binary, not the source
Most of the work was carried out in Lean, a language designed for formal proofs. Lean is typically used to prove the mathematics underlying algorithms, which in this case means the specifications of Signal's encryption. The team went further and ran millions of lines of Lean proof against the real application, checking that the final executable binary matches the original specification.
Every developer knows code testing, but proving code mathematically is a different task, and one that has been hard to reach throughout computing history. By the analogy used in the source, it resembles confirming that an entire factory campus, whatever happens, produces exactly the parts it was designed to produce from the same inputs with no deviation. DeepMind's researchers recall that comparable efforts took years even for relatively small pieces of software: proving the seL4 microkernel reportedly took twenty years, and proving the CompCert C compiler six.
The workflow: Gemini 4 Carbon agents and human oversight
The process moved back and forth between humans and Gemini 4 Carbon agents. First the team defined the scope of the work and wrote text-based skills to prepare the agents, including roles such as specification writers, proof workers and orchestrators. The agents then produced initial Lean definitions for AArch64 instructions, how registers and memory behave, system calls, and the behavior of Linux processes. At this point nothing had yet been proven about Signal or any other application.
Next, the team and the agents prepared fully reviewed specifications for libsignal's cryptography implementation, from which roughly 1.2 million lines of Lean output were generated; this part checks the mathematical reasoning behind the protocol. Most of the agents' effort went into writing 5.3 million lines of Lean code verifying that each binary instruction agrees with the previously defined AArch64, processor and process behavior. At this stage the agent flagged one percent of the codebase for human review. In the end, the team confirmed that the cryptographic engine in the binary matches all the generated proofs down to the last bit processed.
The hard part is knowing what to prove
The researchers stress that once proofs become cheap, the hard question is what to prove. They say most of the effort went into specifications rather than proofs, which matters especially in fields like cryptography. They add that writing specifications against real code is also a stress test for the literature.
The remark is a reminder of how important it is to check that the specification was right to begin with: a proof is only as meaningful as the behavior it defines.
What the proof guarantees for Signal users, and what it does not
The source notes that verified programs such as seL4 and CompCert can no longer, in practical terms, fail because of a code flaw, at least for the inputs they control. Formally proving all the world's software would not be a sensible use of resources, but making it possible for mission-critical code such as the Signal communication protocol is seen as a significant new capability.
The limits of the proof are clear, however. Google's team proved only that libsignal works as advertised. If an attacker hid extra code in the Signal app or another app that copies your messages, a proof of this kind would most likely not catch it. Likewise, a third-party app implementing the Signal protocol for encryption does not automatically offer full privacy. In other words, the proof secures the correctness of the encryption engine, not the security of the whole application.
Add as a preferred source on Google
Comments
No comments yet. Be the first to comment.


