GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — code-verification/third_party/libsignal/README.md at main · TheSDEs/code-verification

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
96 lines (80 loc) · 7.07 KB
/

README.md

Copy path

File metadata and controls

96 lines (80 loc) · 7.07 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Signal Messenger libsignal

The crates in this directory compile and wrap code of Signal's libsignal, so that the generated AArch64 machine code can be verified in Lean. This file records what comes from libsignal, from where, and under which license.

Project signalapp/libsignal
Version tag v0.105.4, commit b2a5c30f3245c1bcad04b27b1e752a38321c793d
Copyright Copyright 2020-2026 Signal Messenger, LLC.
License AGPL-3.0-only; full text in LICENSE, copied from the upstream LICENSE at that commit

Important

No upstream checkout and no compiler output is committed in this repository. Every libsignal-*/vendor/ (a symlink to a libsignal checkout), every target/ and .GeneratedLean/ (the AArch64 machine code compiled from these crates and the upstream sources) are gitignored build products, regenerated locally by lake build. The libsignal material that is committed is listed item by item below.

Crates

Directory What it is Copied upstream code
libsignal-session/ wrappers and the libsignal-cli CLI around the 1:1 session API (src/, cli/), plus untrusted tooling (tools/, tests/) none in the wrappers; see item 2 for tools/
bug-injection/ known, upstream-fixed libsignal bugs as patches, with the registry, witness inputs and replayer of the bug-injection framework (Symbolic/BugInjection/README.md); not part of any image the patches: see item 3
test-vectors/ Lean data module (lean_lib LibsignalTestVectors) holding test vectors of libsignal's own tests, imported by Lean tests under Computational/Tests/ the vectors: see item 4

Each file states its license in its header comment: portions copied from libsignal keep Signal Messenger's copyright and SPDX-License-Identifier: AGPL-3.0-only, and the Google-authored code is Copyright 2026 Google LLC under Apache-2.0. Files without a header comment (the Cargo.toml, translation.toml, events.toml and cli-elf/ .toml/.lock/.ld configuration files and the README.md files) are Google-authored. A few files in libsignal-session/cli-elf/ contain code from other projects and say so in their header: rdl_shim.S and stock/rdl_shim.S (Rust standard library 1.98.1, Copyright (c) The Rust Project Contributors, MIT OR Apache-2.0), string-include/features.h and string-include/string.h (musl 1.2.5, Copyright © 2005-2020 Rich Felker, et al., MIT), and the generated signal_session_io.S, which is compiled from the Google-authored cli/io crate and contains inlined Rust core/alloc code (MIT OR Apache-2.0). The Cargo.lock files are generated by Cargo; they name upstream crate versions and checksums and contain no upstream code.

The headers of the verified crate (libsignal-session incl. cli/) must keep their line counts: the source line of every panic site is compiled into the verified machine code.

Build-time dependency and generated machine code

libsignal-session depends on libsignal v0.105.4 (b2a5c30) through path dependencies on vendor/libsignal, a gitignored symlink to a libsignal checkout that rust-obj2lean resolves or fetches at build time ([upstream] in the crate's translation.toml: $LIBSIGNAL_SRC, ~/sw/libsignal, or a shallow clone of tag v0.105.4).

The AArch64 machine code that lake build generates from libsignal-session/translation.toml into the gitignored .GeneratedLean/GeneratedLean/ (every Libsignal* file: LibsignalSessionObj, LibsignalSessionPlacedObj, LibsignalSessionCode, LibsignalSession*, LibsignalTripleRatchet*) is compiled from AGPL-3.0-only source and is a derived work of libsignal; the separately translated I/O crate libsignal-session/cli/io/translation.toml (SignalSessionIoObj, SignalSessionIoPlacedObj, SignalSessionIoCode) is compiled from original Google-authored Apache-2.0 code (libsignal-session/cli/io/src/lib.rs, plus inlined Rust core/alloc and std re-exports of core/alloc items under MIT OR Apache-2.0, with no std::fs/std::io) and copies no upstream libsignal source. Each generated *Obj / *PlacedObj module carries the license_header of its translation.toml.

libsignal-derived material committed in this repository

  1. libsignal-session/src/lib.rs and libsignal-session/cli/src/: wrappers and CLI entry points that call libsignal's public API (message_encrypt, message_decrypt_signal, process_prekey_bundle, SignalMessage::try_from, the in-memory stores); the companion CLI process-I/O crate libsignal-session/cli/io/src/lib.rs uses bounded C-ABI musl syscalls (open, read, write, close, __errno_location; no std::fs/std::io; only std re-exports of core items and alloc::vec::Vec) with no libsignal dependency. None of them copies upstream source.

  2. libsignal-session/tools/prost-diff/src/main.rs (untrusted differential-fuzz tool): SignalMessage (lines 30-44) is prost-build's output for upstream rust/protocol/src/proto/wire.proto (Copyright 2020 Signal Messenger, LLC.).

  3. bug-injection/patches/ (inputs of the bug-injection framework, Symbolic/BugInjection/README.md; never compiled into a verified image): each directory holds the diff of an upstream libsignal fix commit, byte-identical to https://github.com/signalapp/libsignal/commit/<sha>.diff (upstream-<sha>.diff), and that diff's reversal ported to v0.105.4 (v0.105.4.diff, with a preamble saying so). Both contain libsignal source lines (Copyright 2020-2026 Signal Messenger, LLC., AGPL-3.0-only, full text in LICENSE). The fix commits are 5293caa6cad81566b80f3c3731857bedaa78737b and cd361186fba60c83186262d91b03af608fb8c7c3 (listed in bug-injection/bugs.toml). The replayer, registry, witness inputs and README beside them are Google-authored.

  4. test-vectors/LibsignalTestVectors/ChainKeyDerivation.lean (Lean module LibsignalTestVectors.ChainKeyDerivation, library LibsignalTestVectors in lakefile.lean): the four 32-byte vectors seed, message_key, mac_key and next_chain_key of libsignal's own test test_chain_key_derivation (rust/protocol/src/ratchet/keys.rs:231-277, Copyright 2020 Signal Messenger, LLC., AGPL-3.0-only, full text in LICENSE), as hex literals; the file holds nothing else. The Lean tests Computational/Tests/AEAD/HKDFTest.lean and Computational/Tests/Binary/SessionRunTest.lean import it and contain no copy of the vectors.

Elsewhere, Lean files and Markdown cite libsignal by file and line and describe its behaviour in prose or pseudocode; they do not copy its source.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.