This folder holds the specifications and proofs about libsignal v0.105.4's compiled AArch64 session
code that both the symbolic proof (Symbolic/) and the
computational proof (Computational/docs/README.md) use. Each
module was moved here once, unchanged apart from its imports, and exists only here: nothing is
copied. Namespaces did not change, so every definition and theorem keeps its fully qualified name
(e.g. CryptoGames.LibsignalSession.SignalMessage.tryFrom).
"Moved from" gives the top-level directories before the Computational/ move; what stayed
in them is now under Computational/Specifications/, Computational/Proofs/ and Computational/Tests/.
| Directory | Contents | Moved from |
|---|---|---|
Specifications/ |
the Libsignal*.lean hook models, layouts and session programs (LibsignalTripleRatchet.lean, LibsignalSession.lean, LibsignalHmac.lean, ...) and LibsignalSignalMessage.lean |
Specifications/Libsignal*.lean |
Specifications/CryptoGames/ |
the definitions both sides use: Primitives.lean, PRNG/Defs.lean, FSAEAD/{Defs,Construction,Security}.lean, the AEAD/*Defs.lean files and AEAD/LibsignalAead.lean, and the session model Ratchet/LibsignalSession.lean with Ratchet/{RootKdfDefs,ChainDefs,CreateChainDefs}.lean |
CryptoGames/ |
Proofs/ |
the per-function contracts of the binary and their proofs: TripleRatchet/ (the five session entry points, Statements.lean), ConsumeMessageKey/, AesCbc/, Hmac/, Common/, CodeLayout.lean, VarintBridge.lean, ProtoCodecRoundTrip.lean |
Proofs/libsignal/ |
Proofs/CryptoGames/ |
Ratchet/RootStepProof.lean |
CryptoGames/Ratchet/ |
Specifications/RustHeap/, Proofs/RoDataReloc.lean |
the Rust heap vocabulary (Alloc.lean: the global allocator contracts; Vec.lean: the Vec<T> layout) and the relocated .rodata pointer slots |
CryptoProofLib/ |
Specifications/LibsignalSpqrV1/, SpecAudit/SpqrV1.lean, Proofs/SpqrV1/Vectors/ |
the SPQR V1 model and binary statements, their spec audit, and differential vectors from real spqr |
new, not moved |
Heap/ |
the untrusted state-indexed Rust global-allocator interface (RustCliAlloc) and its stock musl mallocng instance (Heap/README.md) |
new, not moved |
Module names follow the paths: Specifications.LibsignalX → LibsignalBinary.Specifications.LibsignalX,
CryptoGames.X → LibsignalBinary.Specifications.CryptoGames.X (CryptoGames.Ratchet.RootStepProof →
LibsignalBinary.Proofs.CryptoGames.Ratchet.RootStepProof), Proofs.libsignal.X → LibsignalBinary.Proofs.X,
CryptoProofLib.RustHeap.X → LibsignalBinary.Specifications.RustHeap.X and CryptoProofLib.RoDataReloc →
LibsignalBinary.Proofs.RoDataReloc (their namespaces, CryptoVerification.RustHeap and
CryptoProofLib.RoDataReloc, did not change).
Comments in the moved files still cite the old code paths (only references to the moved symbolic
docs were updated); use this table to map them.
Specifications/LibsignalSignalMessage.lean
(module LibsignalBinary.Specifications.LibsignalSignalMessage) holds libsignal's SignalMessage
wire format (SignalMessage, SignalMessage.tryFrom, its errors, PublicKey.deserialize) and
prost's protobuf codec protoSignalCodec, with the minimal definitions they need. Both the
computational statement and the symbolic refinement statement parse received bytes with
SignalMessage.tryFrom protoSignalCodec, so these definitions are trusted by both.
This file imports only Mathlib's List.Vector, so the symbolic statement depends on no
CryptoGames module and not on VCVio. The session model
Specifications/CryptoGames/Ratchet/LibsignalSession.lean
and Specifications/LibsignalProtoCodec.lean (both in
this folder) import it, so their importers see the same declarations. LibsignalProtoCodec.lean
holds only kernel-checked decide guards on the codec.
Specifications/: each file's module docstring starts with a trust banner (Trusted: definitions used by the statement, Trusted in part, or Checked by Lean) that says which of its definitions the computational statement uses; seeComputational/docs/TRUSTED_BASE.md§3. The symbolic statement trusts onlyLibsignalSignalMessage.leanfrom this folder.Proofs/: nothing here is trusted. Neither statement uses a module underProofs/; Lean checks every proof.LibsignalBinary/Heap/: untrusted proof library; denied by module (group 5) to the symbolic statement's machine-free check.
LibsignalBinary(default target): root is the umbrellaLibsignalBinary.lean, which imports the maximal modules; everything else is reached transitively. Plainlake buildbuilds it.LibsignalSpqrV1Spec(default target): rootsSpecifications/LibsignalSpqrV1/Guards.lean,SpecAudit/SpqrV1.leanand theProofs/SpqrV1/Vectors/*Check.leanmodules, so CI builds the whole SPQR V1 model, its spec audit and its differential checks; the umbrella does not import them.LibsignalBinaryCryptoGames(no roots, not a default target): only gives the modules underLibsignalBinary/{Specifications,Proofs}/CryptoGames/andLibsignalSignalMessagethe same strict options as theComputationalCryptoGameslibrary (autoImplicit false,relaxedAutoImplicit false,warningAsError true).
Checked in CI by Symbolic/scripts/check_symbolic_deps.py
(Python and git only, no build):
- A
LibsignalBinary.*module imports onlyLibsignalBinary.*,GeneratedLean.*and external packages. In particular it never importsSymbolic.*or computational-only modules. - A
Symbolic.*module imports onlySymbolic.*,LibsignalBinary.*,GeneratedLean.*and external packages. - Nothing outside
Symbolic/importsSymbolic.*. - Computational code imports
LibsignalBinary.*directly.
A change here affects both proofs: build both (plain lake build does).