
DeepMind Uses AI to Mathematically Prove Signal’s Code: 6.5 Million Lines of Lean in 4 Weeks
An audit report for your internal messaging system concludes: the encryption protocol meets the standard, the design has been thoroughly analysed, no vulnerability found. But that report proves the protocol design is correct — what about the actual code running on the server, compiled into machine code? Between the design on paper and the binary in production lies a gap audits and pentests cannot close: implementation bugs, integration errors.
What Is AlphaProof Code? How AI Proves Signal’s Code
What formal verification is — and why it differs from vulnerability scanning
Formal verification mathematically proves that a program satisfies the properties stated in a specification, and that proof is machine-checked. If it succeeds, every bug violating the stated properties — within the stated scope — is ruled out.
The difference from vulnerability scanning is the direction of the conclusion. AI bug-hunting tools such as OpenAI Codex Security, GPT-6 Cyber and Shannon AI pentester answer the question “is there a specific vulnerability?” — a negative result proves nothing, because the tool may simply have missed it. Formal verification asks the opposite: “does the code satisfy the stated properties?” — a successful proof is a meaningful guarantee, provided the specification is correct.
What DeepMind announced on 10 November 2026
A blog post dated 10 November 2026 by Pushmeet Kohli and Swarat Chaudhuri introduced AlphaProof Code: humans and AI write the specification in Lean, a team of agents produces the proofs, and a proof only counts once the Lean kernel has checked it. All artifacts are open-source at google-deepmind.github.io/code-verification. The claim that this is “the first time AI has formally verified a widely deployed cryptographic protocol to this depth” is DeepMind’s claim, with no independent confirmation yet. According to DeepMind, the Signal protocol protects billions of conversations, with variants in WhatsApp, Messenger and Google Messages. This article is for sysadmins, DevOps/SRE engineers and backend developers running systems where end-to-end encryption is critical infrastructure — not evidence that “Signal cannot be broken”.
Proof Scope: libsignal v0.105.4, PQXDH and the Triple Ratchet
The target is unmodified libsignal v0.105.4 with spqr v1.6.0, compiled with the standard rustc to AArch64 machine code and wrapped in the CLI harness libsignal-cli. The key point is “unmodified”: classic projects usually rewrite code to make it easier to prove; here DeepMind proved the production code as it actually runs.
Proven are the PQXDH handshake (post-quantum) and the Triple Ratchet (continuous key rotation in a session), with four properties:
- Forward secrecy: leaking today’s keys does not expose yesterday’s messages.
- Authentication: the two parties are really talking to the right counterpart, not an impersonator.
- Post-compromise security: an attacker who compromises a session cannot take over later sessions once the system recovers and rotates keys.
- Handshake secrecy: handshake secrets are kept even from a future quantum attacker (symbolic model).
Scope limits — read carefully before drawing conclusions
Only 1-1 sessions — group messaging is outside the scope. Only the CLI harness around libsignal, not the whole Signal app: the UI, app-level key management, servers and network infrastructure are all out of scope. Low-level primitives (AES, X25519, ML-KEM) are assumed correct, stated explicitly as assumptions in the paper. The result requires trusting the Lean kernel and the AArch64 semantics — a trust base no machine can check further.
In other words: this does not prove “Signal is secure”; it proves that libsignal v0.105.4 satisfies the four stated properties within the scope above — and misunderstanding the scope is more dangerous than not knowing.
AlphaProof Code Architecture: From Lean Specification to the Lean Kernel
The pipeline has four components: (1) humans with a spec writer agent write the specification in Lean — the theorems and definitions stating precisely what “correct” means; (2) a formal semantics of AArch64 machine code, also in Lean; (3) prover agents on Gemini Carbon, automatically generating Lean proofs; (4) the Lean kernel as gatekeeper — a proof is accepted only when the kernel checks it.
Around this sits a human review loop: reviewer agents re-read each specification draft from a sceptical angle, a human signs off the specification before any proof is written, then the agents audit themselves and flag only about 1% of the codebase for human re-review.
flowchart TD
A["libsignal v0.105.4 Rust<br/>unmodified + spqr v1.6.0"] --> B["Standard rustc<br/>compiles to AArch64 machine code"]
B --> C["CLI harness libsignal-cli<br/>wraps libsignal into a binary"]
D["Humans + spec writer agent<br/>write Lean spec ~18,000 lines"] --> E["Signed-off spec<br/>commit baseline"]
F["AArch64 semantics in Lean<br/>~8,000 lines"] --> E
C --> G["Prover agents on Gemini Carbon<br/>generate ~6.5 million lines of Lean proof"]
E --> G
G --> H{"Lean kernel checks<br/>+ gatekeeper compares against spec"}
H -->|Fail| G
H -->|Pass| I["Complete proof<br/>machine-checked"]
D --> J["Human review loop<br/>on spec + ~1% of flagged codebase"]
J --> E
K["Negative test: reintroduce 2 real<br/>fixed bugs into the code"] --> H
K -->|Proves the buggy version<br/>is unsafe| I
style H fill:#f9f,stroke:#333,stroke-width:2px
style E fill:#ff9,stroke:#333,stroke-width:2px
Two points matter: the main flow runs from real code through machine code to the specification and then the proof, ending at the Lean kernel — a machine checker, not AI declaring itself correct; and the trust base is only about 26,000 lines (spec ~18,000 + AArch64 semantics ~8,000), since the kernel checked all 6.5 million lines of proof line by line.
4 weeks, 5 people — and testing how strong the spec is
The whole process took 4 weeks with a team of 5. The paper compares this with seL4 (20 person-years) and CompCert (6 years) — but those are different projects, scopes and eras, so no general “AI is 100 times faster than humans” conclusion follows.
DeepMind tested whether the specification is strong enough to catch real bugs: two real bugs previously fixed in libsignal were reintroduced into a copy of the code, and the system proved both buggy versions unsafe. This is a negative test of the specification, not of the prover: an empty or overly weak specification would let every proof pass, even on buggy code.
How to Access the Artifacts and Re-Check the Proof Yourself
AlphaProof Code is not end-user software to install, so this section has no installation commands — that is its nature, not an omission. To read and re-check the artifacts you need a basic understanding of Lean, the ability to read Rust and AArch64, and a machine able to run the Lean toolchain per the instructions included with the artifacts. No GPU or Gemini Carbon cluster is needed.
These steps were not run hands-on; they are a reading guide, not a tested how-to. The only source to use is DeepMind’s code-verification page, together with the original signalapp/libsignal repo at tag v0.105.4.
Steps to re-check: download the artifacts from the code-verification page; run the Lean kernel check per the included instructions — the kernel is expected to report a pass; read the specification (~18,000 lines) and the AArch64 semantics (~8,000 lines) — the part humans must read. Common mistakes: a Lean or toolchain version mismatched with the artifacts; confusing “running the prover” with “checking the proof”; confusing the 6 million figure with 3 million — see the note at the end. Checking the artifacts is read-only and changes none of your systems, so no backup or rollback is needed.
Technical Assessment: Strengths, Limits and Security
Strengths. It proves the real implementation at machine-code level, not just the design. The trust base compresses sharply: 6.5 million lines of proof reduce to about 26,000 lines that must be trusted. Speed: 4 weeks with a team of 5, versus many years for classic projects. The specification was validated by a negative test with 2 real bugs; the artifacts are open-source.
Limits and risks. The scope is narrow: only 1-1 sessions, only the CLI harness, with primitives assumed correct. Proof quality depends entirely on specification quality — a wrong specification makes a correct proof meaningless, and a negative test with 2 bugs only shows the specification catches those 2 bugs. There has been no independent reproduction as of 16/11/2026, the “first time” claim remains a vendor claim, and DeepMind has not disclosed the cost of running Gemini Carbon.
Security implications for operators. This result increases confidence in libsignal within exactly the proven scope — no further. It does not replace audits, pentests, key management or endpoint hardening.
Comparison: Formal Proof vs Bug Hunting vs Traditional Audit
| Criterion | AlphaProof Code (formal verification) | AI bug hunting (Codex Security, GPT-6 Cyber, Shannon) | Traditional audit / pentest |
|---|---|---|---|
| Question answered | Does the code satisfy the stated properties? | Is there a specific vulnerability? | What real weaknesses does the system have? |
| Negative result | Meaningful, within scope and when the spec is correct | Does not prove “no bugs” | Depends on scope and tester skill |
| Cost / time | High at the spec-writing stage; AI provers shorten proof creation | Lower, repeatable | Varies, depends on experts |
| Scope | Narrow, precise, clearly bounded | Broad, following known bug patterns | Broad, following checklists and experience |
| When to use | Protocols, critical infrastructure, where strong assurance is needed | Fast scanning, finding real bugs | Overall system assessment |
The three methods complement each other; none replaces the others. Note: Gemini Carbon — the model running the prover agents — is not Gemini 4 Hydrogen.
Real Use Cases: When AI Formal Verification Is Worth the Cost
Businesses and critical infrastructure. Encryption protocols, medical device firmware, power-grid software, payment systems — where an implementation bug has major consequences and stronger assurance than testing is needed.
Homelab and personal projects. Not practical yet: no mass-market tool exists, writing a specification is expensive, and you do not have a Gemini Carbon cluster to run prover agents.
AI workflows and DevOps/SRE. In the near future, a prover agent could become a CI step for a critical component — the spec ships with the code, proofs are generated automatically, and the kernel acts as a gate stronger than lint or tests.
IT admins — what to take away today. Do not change your decision to choose Signal or WhatsApp because of this article — understand the proven scope correctly and keep doing the basics.
Conclusion: Who AlphaProof Code Fits — and Who It Does Not Yet
AlphaProof Code fits organisations running critical encryption infrastructure and security teams who want to understand formal verification — not people who need a code-scanning tool today, small projects without the budget for a specification, or anyone needing assurance for group chats and the whole Signal app.
Next steps: read the paper and artifacts on DeepMind’s code-verification page, and follow independent reproduction and scope expansion. The real value of AlphaProof Code is not that “AI proves faster” but that it turns formal verification from “writing proofs by hand” into “writing the spec correctly and letting the machine check the proofs”.
Lessons Learned
- Proving real code differs from proving a design — the value lies at the AArch64 machine-code level.
- The trust base is what needs reading: 26,000 lines of spec and semantics, not 6.5 million lines of proof.
- A weak spec makes the proof meaningless — the negative test with 2 real bugs is how the spec is checked.
- A narrow scope does not make the result less valuable, but misunderstanding the scope is dangerous.
- AI shortens the proving step; it does not remove the human work of writing the spec and reviewing it.
Verification Scope
- Check date: 16/11/2026. Sources: the DeepMind blog dated 10/11/2026 and the technical paper at google-deepmind.github.io/code-verification, both read directly; secondary press used only for cross-checking.
- Figures follow the paper: about 6.5 million lines of Lean proof. Internal inconsistency in the DeepMind blog: the body says “over six million lines” but “Additional Details” at the end says “over three million lines” — this article does not use the 3 million figure.
- The figures are DeepMind’s (vendor), with no independent reproduction as of 16/11/2026; the “first time” claim is a vendor claim.
- Defaults and limits: the proof covers only 1-1 sessions and the CLI harness, with low-level primitives assumed correct. There are no performance or cost benchmarks here; the figures 4 weeks, 5 people and 6.5 million lines are DeepMind’s descriptive figures, not comparison benchmarks.
- This section was not run hands-on: no Lean proofs were executed, and AlphaProof Code was not installed (it is not installable software).
References
- DeepMind — Introducing AlphaProof Code: https://deepmind.google/blog/introducing-alphaproof-code/
- DeepMind — Technical paper and artifacts: https://google-deepmind.github.io/code-verification
- Signal — libsignal (original repo, v0.105.4): https://github.com/signalapp/libsignal
- DailyMech — figures cross-check: https://dailymech.com/articles/deepmind-alphaproof-code-signal-verification.html
Bình luận
Bình luận được duyệt trước khi hiển thị.Đang tải bình luận…
Để lại bình luận