最新 微软与美国政府警告:重大技术故障还将持续 The Verge
安全与风险 ●●●●○

DeepMind 用 AI 形式化验证 Signal 加密代码

Introducing AlphaProof Code: a breakthrough in verifying complex software at depth

摘要Summary

Google DeepMind 发布 AlphaProof Code 智能体框架,由 Gemini Carbon 驱动的 AI 智能体生成超六百万行 Lean 证明,首次对广泛部署的 Signal 加密协议实际代码完成深度形式化验证。该流程仅用四周,而传统专家团队需数年;研究团队还向隔离代码中重新注入两个已修复的真实漏洞,系统均给出机器可检验的不安全证明。

Google DeepMind introduced AlphaProof Code, a multi-LLM agentic framework that combines human expertise with AI agents to formally verify the actual code of the widely deployed Signal cryptographic protocol, generating over six million lines of Lean proofs in about four weeks versus years of expert effort. The team also reintroduced two real, previously fixed bugs into an isolated version of Signal's code, and the system produced machine-checked proofs that the buggy versions were insecure.

  • AI 智能体生成超六百万行 Lean 证明
  • 验证仅用四周,传统专家团队需数年
  • 注入两个真实漏洞,系统均证明不安全

全文对照Full text · 中 / EN

Google DeepMind 研究人员如何构建了一个新的智能体框架,对 Signal 加密协议的代码进行了形式化验证——这长期以来被视为一项重大安全挑战

How Google DeepMind researchers built a new agentic framework that formally verified the code of Signal’s cryptographic protocol — long considered to be a grand security challenge

今天,我们分享软件安全领域一个长期被视为重大挑战的里程碑:Google DeepMind 研究人员引导 AI 智能体,对 Signal 协议实际底层代码的关键安全属性进行了数学证明。Signal 协议是保护 Signal 和 Google Messages 等应用中数十亿私密对话的技术。

Today, we’re sharing a milestone in software security long considered to be a grand challenge: Google DeepMind researchers guided AI agents to mathematically prove key security properties of the actual code underlying the Signal protocol, the technology that protects billions of private conversations in apps like Signal and Google Messages.

这一突破性发现借助 AlphaProof Code 完成。这是一个用于形式化验证的新型智能体框架,其验证深度前所未有,将人类专业知识与 AI 智能体相结合。形式化验证——用数学方法证明代码正确运行且无缺陷——是最高标准的安全保障;然而,它难度大,且往往耗费大量人力。

This breakthrough discovery was made using AlphaProof Code , a novel agentic framework for formal verification at unprecedented depth that combines human expertise with AI agents. Formal verification—mathematically proving code runs correctly without flaws—is the highest standard of security assurance; however, it is difficult and often labor-intensive.

我们的工作标志着 AI 首次被用于以如此深度对广泛部署的加密协议进行形式化验证。这也是首次通过任何方法——无论是否使用 AI——对这样一个广泛部署的协议实现进行形式化验证。

Our work marks the first time AI has been used to formally verify a widely deployed cryptographic protocol at this depth. It's also the first time the implementation of a widely deployed protocol like this has been formally verified by any method, with or without AI.

AlphaProof Code 是一个多 LLM 智能体框架,它像研究团队那样拆分形式化验证工作:人类专家与 AI 合作决定要证明什么,再由一组 AI 智能体完成证明。

AlphaProof Code is a multi-LLM agentic framework that splits the work of formal verification the way a research team would: human experts work with AI to decide what to prove, and a group of AI agents does it.

首先,我们的研究人员与多种模型协作,将 Signal 的安全目标转化为形式化数学规范,并由人类专家逐一审查。随后,由 Gemini Carbon 驱动的智能体完成证明,生成了超过六百万行 Lean 代码。Lean 是一种通过数学方法证明代码正确性的计算机语言。

First, our researchers collaborated with a mix of models to translate Signal’s security goals into formal mathematical specifications, with human experts reviewing every one. From there, agents powered by Gemini Carbon did the proofs, generating over six million lines of Lean, a computer language that mathematically proves the accuracy of code.

接下来,智能体审计了证明,并标出需要人工复核的部分——仅占代码库的百分之一,大幅节省了时间。由于 Lean 会自动检查其余部分,我们的专家可以将审查集中在最需要人类判断的地方。

Next, the agents audited the proof and highlighted areas that needed a second look by a human – just one percent of the codebase, a massive time savings. Because Lean automatically checks the rest, our experts could focus their review where human judgment matters most.

密码学协议几乎支撑着所有数字通信,从网上银行到网页浏览,而一个缺陷就可能同时让数百万人暴露于风险之中。正因如此,专家们数十年来一直对其进行形式化分析。

Cryptographic protocols underpin nearly all digital communication, from online banking to web browsing, and a single flaw can expose millions of people at once. That's why experts have spent decades formally analyzing them.

但大多数协议验证都止步于设计层面。我们的智能体更进一步,证明编译后的代码满足关键安全属性——例如在设备被临时攻陷前后都能保持消息受保护——并且一直验证到设备上实际运行的代码。由于现实世界的漏洞往往隐藏在设计实现之间的缝隙中,弥合这一缝隙使这些证明变得复杂得多。

But most protocol verification stops at the design level. Our agents went further, proving that the compiled code fulfills the key security properties – such as keeping messages protected before and after a device is temporarily compromised – down to the exact code running on devices. Because real-world vulnerabilities often hide in the gap between design and implementation, bridging this gap makes these proofs vastly more complex.

即便达到这种复杂度,我们的验证过程也仅用了四周——而这项任务历来需要专家团队花费数年——证明 Signal 的核心密码学代码提供了我们专家所指定的安全保护。

Even at this complexity, our verification process took just four weeks – a task that historically takes expert teams years – proving that Signal's core cryptographic code delivers the security protections our experts specified.

为确认 AlphaProof Code 能区分正确代码与有缺陷代码,我们在 Signal 代码的隔离版本中重新引入了两个真实存在、此前已修复的缺陷。在这两种情况下,系统都生成了机器校验的证明,表明有缺陷的版本并不安全。

To confirm that AlphaProof Code can tell correct code from buggy code, we reintroduced two real, previously fixed bugs into an isolated version of Signal's code. In both cases, the system produced a machine-checked proof that the buggy version was insecure.

在 AlphaProof Code 中,AI 智能体帮助用户编写规范,然后自主证明实现满足该规范。每个证明都由 Lean 校验,以核实智能体的工作。

In AlphaProof Code, AI agents help users write a specification, then autonomously prove that the implementation meets it. Every proof is checked by Lean to verify the agents' work.

“虽然此前的形式化验证聚焦于代码中较小的部分,但 Google DeepMind 的方法实现了显著扩展,”Signal 首席技术官 Ehren Kret 表示。“使用 AI 智能体将实际运行的代码转化为有效的 Lean 定理是一项重大突破。随着 AI 驱动的安全威胁不断增长,严格验证 Signal 协议实现让我们对代码的隐私保障更有信心。”

While prior formal verification focused on smaller portions of the code, Google DeepMind's approach enables significant expansion,” said Ehren Kret, Chief Technology Officer of Signal. “Using AI agents to translate live code into valid Lean theorems is a major breakthrough. As AI-driven security threats grow, rigorously verifying the Signal protocol implementation gives us even greater confidence in our code's privacy guarantees.

尽管此前的形式化验证工作必然聚焦于较小的范围,但这一新方法实现了显著的扩展。传统上,验证生产代码严格符合其密码学设计需要大量人工投入,因此利用 AI 智能体将实际运行的代码自动转换为有效的 Lean 定理是一项重大突破。随着 AI 驱动的安全威胁日益增长,借助自动定理证明对 Signal 核心协议进行严格验证,让我们更有信心确信我们的代码能够兑现其隐私承诺。

While prior formal verification work has necessarily focused on smaller scopes, this new approach enables a significant expansion. Traditionally, verifying that production code strictly matches its cryptographic design required extensive manual effort, making the use of AI agents to automatically translate live code into valid Lean theorems a great breakthrough. As AI-driven security threats grow, having the core Signal protocol rigorously verified with automated theorem proving gives us even greater confidence that our code delivers on its privacy guarantees.

攻克这一长期挑战表明,AI 能够为各类企业、政府和关键基础设施带来顶尖级别的安全保障,帮助抵御由智能体驱动的网络威胁。

Achieving this long-standing challenge demonstrates how AI can bring elite security assurance to businesses, governments, and critical infrastructure, helping defend against agent-driven cyber threats.

验证 Signal 的核心密码学为保护其他关键系统奠定了基础,从医疗设备固件到电网软件均涵盖其中。

Verifying Signal's core cryptography lays the groundwork to secure other vital systems, from medical device firmware to power grid software.

推广这些技术需要持续的研究。与 CodeMender 等自动化防御智能体相结合,形式化验证可以帮助应对现代网络威胁的速度和规模,从而打造出带有数学证明、可证实其防护措施确实有效的软件。

Scaling these techniques requires continued research. Paired with automated defense agents like CodeMender , formal verification can help counter the speed and scale of modern cyber threats to create software with mathematical proof that its protections work.

我们将形式化验证产物开源,供社区使用。请阅读下方的技术论文。

We are open-sourcing our formal verification artifacts for community use. Read the technical paper below.

本研究由 Swarat Chaudhuri、Andrew Ferraiuolo、Anton Kovsharov、Tej Chajed、Sam Schlesinger、Karn Seth、Jonathan Katz、Charles Sutton 和 Pushmeet Kohli 完成。

This research was developed by Swarat Chaudhuri, Andrew Ferraiuolo, Anton Kovsharov, Tej Chajed, Sam Schlesinger, Karn Seth, Jonathan Katz, Charles Sutton, and Pushmeet Kohli.

我们感谢 Eric Wieser 协助开源我们的代码,感谢 Owen Jones 提供项目管理支持,并感谢 Martín Abadi、Christopher Henson、Katerina Hristova、Henryk Michalewski、Jonathan Protzenko 和 George Tsoukalas 的有益讨论。我们感谢 Signal 的 Rolfe Schmidt、Michael Rosenberg 和 Ehren Kret 对我们方法的反馈。我们还要感谢 Tulsee Doshi、Four Flynn、Kate Olszewska、Alicia Huang、Andy Liu、Benoit Schillings、Raluca Ada Popa、Melvin Johnson、Koray Kavukcuoglu、Demis Hassabis 和 Sundar Pichai 对本项目的支持。

We thank Eric Wieser for help with open-sourcing our code, Owen Jones for program management support, and Martín Abadi, Christopher Henson, Katerina Hristova, Henryk Michalewski, Jonathan Protzenko and George Tsoukalas for helpful discussions. We thank Signal's Rolfe Schmidt, Michael Rosenberg, and Ehren Kret for their feedback on our methodology. We also thank Tulsee Doshi, Four Flynn, Kate Olszewska, Alicia Huang, Andy Liu, Benoit Schillings, Raluca Ada Popa, Melvin Johnson, Koray Kavukcuoglu, Demis Hassabis, and Sundar Pichai for their support of the project.