[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-113160":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":29,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},113160,"code-verification","google-deepmind\u002Fcode-verification","google-deepmind","Verifying Signal's security at the machine-code level","https:\u002F\u002Fgoogle-deepmind.github.io\u002Fcode-verification\u002F",null,"Lean",297,44,5,1,0,3,39,62,14,76.66,"Other",false,"main",true,[27,28],"formal-verification","lean","2026-11-20 00:08:57","2026-11-23 13:17:47","**Reviewers' site: [google-deepmind.github.io\u002Fcode-verification](https:\u002F\u002Fgoogle-deepmind.github.io\u002Fcode-verification\u002F)**: browse the specifications, proofs and checks.\n\n## License\n\nCopyright 2026 Google LLC\n\nAll code is licensed under the Apache License, Version 2.0 (the \"Apache 2.0\"); you may not use this file except in compliance with the Apache 2.0 license. You may obtain a copy of the License at https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and\nlimitations under the License.\n\n# Formal Verification of Signal's Security in Lean\n\nWe present two AI-generated proofs of security for compiled AArch64 machine code of\n`libsignal` (the official Rust implementation of the Signal protocol) in a CLI harness\n(with hooked cryptographic primitives). These provide independent arguments for\nsecurity, one under the symbolic model and one under the computational model.\n\nFor more information, please see the associated paper.\nThe file [`docs\u002FPAPER_MAP.md`](docs\u002FPAPER_MAP.md) provides links from sections in the paper,\nsuch as descriptions of theorems, to the Lean code that formalizes it. A detailed overview of the\ncomputational development is in [`Computational\u002Fdocs\u002FREADME.md`](Computational\u002Fdocs\u002FREADME.md);\nthe symbolic theorems are in [`Symbolic\u002FTheorems\u002F`](Symbolic\u002FTheorems\u002F).\n\n```text\n├── Computational\u002F     # Computational (game-based) security specs, proofs, and headline theorems\n├── Symbolic\u002F          # Symbolic (Dolev–Yao) model, binary refinement, proofs, and theorems\n├── LibsignalBinary\u002F   # Shared AArch64 binary specs, hook models, and function proofs\n├── arm64-semantics\u002F   # Formal AArch64 ISA\u002Fprocess semantics, separation logic, and rust-obj2lean\n├── third_party\u002F       # Official libsignal crates (v0.105.4 + spqr v1.6.0) and libsignal-cli CLI\n├── scripts\u002F           # Stock ld.lld CLI ELF builder (cli-elf-stock), trusted-closure, and axiom audit scripts\n└── docs\u002F              # Paper-to-code map (docs\u002FPAPER_MAP.md) and symbolic paper differences\n```\n\n## Building and Verifying\n\n### Prerequisites\n\n- **Lean 4** via [`elan`](https:\u002F\u002Fgithub.com\u002Fleanprover\u002Felan) (`lean-toolchain` pins `leanprover\u002Flean4:v4.34.0`).\n- **Rust `1.98.1`** (pinned in [`rust-toolchain.toml`](rust-toolchain.toml); `.GeneratedLean\u002F` depends on the exact `rustc` output, so do not override the pin) with cross-compilation targets, `rust-src`, and LLVM tools:\n  ```bash\n  rustup toolchain install 1.98.1 \\\n    --target aarch64-unknown-linux-gnu,aarch64-unknown-linux-musl \\\n    --component rust-src,llvm-tools-preview\n  ```\n- **`protoc`** (Protocol Buffers compiler, used by `libsignal`'s `prost-build` scripts), **LLVM `ld.lld` `22.1.8`**, and **[Zig `0.16.0`](https:\u002F\u002Fziglang.org\u002F)** on `PATH`.\n\n### Build and Kernel-Check All Proofs\n\n```bash\n# 1. Fetch prebuilt Mathlib:\nlake exe cache get\n\n# 2. Raise the soft stack limit (needed by `leantar` on large modules), materialize cached\n#    `.olean` files into `.lake\u002F`, and bound parallel Lean workers (use about 1 thread per\n#    4 GiB of free RAM, plus some headroom), then compile libsignal, extract it to Lean, and\n#    check all default Lean proofs (several hours, ~15–34 GiB peak RAM):\nulimit -S -s 524288\nexport LAKE_RESTORE_ARTIFACTS=true\nexport LEAN_NUM_THREADS=8   # ~1 per 4 GiB of free RAM; Lake has no -j flag\nlake build\n\n# 3. Build the SHA-256-pinned `libsignal-cli` AArch64 ELF from source with stock `ld.lld`, verify\n#    its pin, and check the binary-level headline theorems in `CliElfLib`\n#    (`Computational\u002FTheorems\u002FMain.lean` and `Symbolic\u002FTheorems\u002F{Security,Refinement}.lean`):\n.\u002Fscripts\u002Fcli-elf-stock --stdbin --build\n.\u002Fscripts\u002Fcli-elf-stock --stdbin --verify-pin --lean-mod LibsignalBinary\u002FSpecifications\u002FSignalSession\u002FCliElf.lean\nlake build CliElfLib\nlake script run checkCliElfOwner\n```\n\n### Verify Headline Theorems with Comparator\n\n[`leanprover\u002Fcomparator`](https:\u002F\u002Fgithub.com\u002Fleanprover\u002Fcomparator) verifies that each headline\ntheorem matches its trusted challenge statement (including all transitive definitions), uses only\nstandard Lean axioms (`propext`, `Quot.sound`, `Classical.choice`), and replays in a fresh Lean\nkernel from `lean4export` output rather than `.olean` files.\n\nRunning this check (`comparator\u002Finstall-tools.sh` and `comparator\u002Frun.sh`) is only supported on\nLinux, as `leanprover\u002Fcomparator` sandboxes its builds and exports with\n[`landrun`](https:\u002F\u002Fgithub.com\u002FZouuup\u002Flandrun) (which uses Linux's Landlock LSM).\n\n```bash\n# 1. Build the pinned comparator, lean4export, and landrun tools and export their paths:\ncomparator\u002Finstall-tools.sh \u002Ftmp\u002Fcomparator-tools\nset -a; source \u002Ftmp\u002Fcomparator-tools\u002Fenv; set +a\n\n# 2. Build the challenge and solution libraries (`comparator\u002F`), then check both\n#    `comparator\u002Fcomputational.json` and `comparator\u002Fsymbolic.json` (or pass one config):\nlake build ComparatorChallenge ComparatorSolution\ncomparator\u002Frun.sh\n```\n\n## License and disclaimer\n\nCopyright 2026 Google LLC\n\nUnless a file states otherwise, the software in this repository is licensed under the license\ndescribed in [`LICENSE`](LICENSE). Third-party material, including code copied from\nSignal's `libsignal` (AGPL-3.0-only), keeps its own license. The libsignal crates live in\n[`third_party\u002Flibsignal\u002F`](third_party\u002Flibsignal\u002F), with the upstream\n[`LICENSE`](third_party\u002Flibsignal\u002FLICENSE) and a [`README.md`](third_party\u002Flibsignal\u002FREADME.md)\nthat lists what is copied from libsignal; each file states its license in its header comment. To\ncontribute, see [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\nUnless required by applicable law or agreed to in writing, all software distributed here is\ndistributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the licenses for the specific language governing permissions and limitations under\nthose licenses.\n\nThis is not an official Google product.\n\nEligibility for the [Google Open Source Software Vulnerability Rewards\nProgram](https:\u002F\u002Fbughunters.google.com\u002Fopen-source-security) is determined by the [Google Open Source Software Vulnerability Reward Program Rules](https:\u002F\u002Fbughunters.google.com\u002Fabout\u002Frules\u002Fopen-source\u002Fgoogle-open-source-software-vulnerability-reward-program-rules).\n","该项目使用Lean定理证明器，在机器码层面形式化验证Signal加密协议（libsignal）在AArch64架构上的安全性。核心功能包括：基于计算模型（game-based）和符号模型（Dolev-Yao）的双路径安全证明；对编译后AArch64二进制代码的精确定义与语义建模；支持密码原语挂钩的CLI验证环境。技术特点涵盖AArch64指令集形式语义、Rust到Lean的二进制转换工具链，以及分离逻辑驱动的函数级正确性证明。适用于高保障安全系统（如端到端加密通信协议）的形式化认证与合规性审计场景。",2,"2026-11-24 04:45:00","CREATED_QUERY"]