AI Engineering

AlphaProof Code verified Signal's libsignal in four weeks

DeepMind used AI agents to machine-check security properties of Signal's libsignal in Lean. Here is the pattern a working engineer can copy, and what the proofs do not cover.

Dark navy illustration of teal script-like lines flowing into a cream envelope, with an amber checkpoint and a small lantern marking a human review.
Dark navy illustration of teal script-like lines flowing into a cream envelope, with an amber checkpoint and a small lantern marking a human review.

What DeepMind built, and why it matters

On November 10, Google DeepMind published Formal Verification of Signal's Protocol with Gemini. The post introduces AlphaProof Code, an agentic framework with Pushmeet Kohli and Swarat Chaudhuri named as authors. The division of labour is the important part. Humans decide what to prove, and AI agents write the proofs.

The target is libsignal, Signal's reference implementation. According to the artifacts page, the checks run against the AArch64 machine code. The verified components are the post-quantum PQXDH handshake and the Triple Ratchet. The properties cover forward secrecy, authentication, post-compromise security and handshake secrecy.

The story reached the top of Hacker News, where the discussion thread sat at 663 points and 187 comments when we read it. The reaction splits in two. Some readers see a milestone for verified software. Others say the result only moves the bug risk from the code into the specification. Both camps are pointing at something real, and the second one is the more useful for an engineer deciding what to do next.

The numbers, and where they disagree

The technical paper says the agents generated about 6.5 million lines of machine-checked Lean proof code. That proof corpus rests on about 26,000 lines of trusted specifications and AArch64 semantics. The DeepMind blog says "over six million lines of Lean", so the figures differ a little depending on the source. Treat the order of magnitude as reliable and the exact count as something to check in the paper.

The time figure is the one that gets attention. DeepMind says the verification took four weeks, against the years that expert teams have historically needed for comparable work. The Register adds some context: the effort took four weeks for a team of five people and "quite a few tokens". It gives no token figure, so there is no cost number you can use. Its article also contains no comments from Signal's CTO, which means the story has no view from the project being verified.

The pipeline: humans set the target, the kernel decides

The workflow has four stages. Humans choose what to prove and write or approve the specifications. Agents write the Lean proofs against those specifications. A second set of agents audits the generated proof corpus and flags only about 1% of the codebase for a human to look at. The Lean kernel mechanically checks everything, and a proof is accepted only when the kernel accepts it.

The last point is the one that matters for trust. The model is never the judge of its own output. A model can produce a wrong proof, and that is fine, because the kernel rejects it. What a reviewer has to trust is the small trusted base: the specifications, the semantics of the machine code, and the kernel itself. The proof corpus is large, but it does not need to be trusted line by line.

The DeepMind post also includes a negative test that deserves more attention than it has received. The team reintroduced two previously fixed bugs into an isolated copy of Signal's code. The system then produced a machine-checked proof that each buggy version was insecure. A verification pipeline that has never been shown to reject a bad version proves much less than one that has. This is the test to copy first.

What the proof does not say

DeepMind is explicit about its limits, and you should be too. The results assume perfect cryptography. Group messaging is not covered. Quantum attackers are not covered in the computational model. The full Signal apps were not verified. Qodo's commentary and The Register both make the same point.

The objection on Hacker News is the sharpest version of the problem. One commenter wrote, "You'd just move from bugs in code to bugs in the spec." A formal proof shows that code matches its specification. It says nothing about whether the specification captures what you actually need. RuntimeWire's write-up frames the story around this shift: the bottleneck has moved from writing proofs to writing and reviewing specifications.

So the proof says nothing about bugs outside the spec, nothing about side channels, and nothing about parts of the application that were not modelled. A green kernel check is a statement about a precise claim. Your job is to make sure the claim is the one you meant.

What to copy without a Gemini-scale budget

You do not need DeepMind's compute to borrow the pattern. Four practices carry over.

First, keep the specification as the reviewed artifact. Write it down in a form a reviewer can read, put it under version control, and review changes to it with the same care as code changes. In this setup, the spec diff is the thing a human should read most carefully. The proof is generated and checked; the spec is decided.

Second, add an adversarial auditor. DeepMind used a second set of agents to triage the corpus down to about 1% for human review. You can do a smaller version of this. Have one agent write the proof or the implementation, and a separate agent whose only job is to look for gaps: missing preconditions, specs that are vacuously true, and assumptions that were never stated. Keep the auditor's prompt adversarial, not agreeable.

Third, make the kernel or the test harness the trust anchor, not the model. If your check is a compiler, a type checker, a property-based test, or a proof assistant, its verdict should decide whether a change lands. A model's confidence should never be the gate.

Fourth, state your assumptions in writing, in the repository, next to the proof or test. The Signal work states its assumptions openly, which is why its limits are readable. Do the same for your own code. An assumptions file that lists "perfect cryptography", "single-threaded access", or "trusted input from the parser" is worth more than a clever proof that hides them.

What you can actually use today

The verification artifacts are open. According to the code-verification repository, DeepMind is releasing the Lean development, with the specifications and proofs, along with the source code. You can read how the specs are structured and how the proofs are organised, and that is worth an afternoon if you work on protocol code. The framework that generated the proofs is not packaged as a general-purpose tool, so you cannot install AlphaProof Code and point it at your service.

A practical starting point looks like this. Pick one small function with a security property you already care about, such as a key-derivation step or a message-counter check. Write the property as a specification and have a human approve it. Let an agent produce a proof or a checked implementation, and let the proof assistant decide whether it passes. Then have a second agent try to break the spec. Keep the spec reviewed and the assumptions written down. Once that loop works on one function, the same loop can cover a larger module.

The headline is that verified software got cheaper in human time. The bottleneck has moved to deciding what "correct" means. That is a harder question than writing proofs, and it is the one your team should be answering first.

Related reading

Comments (0)

No comments yet. Start the conversation.

Never shown, never emailed — stored only as a hash.