SchemeModel.lean
Fixed Two-Party Configuration and SPQR-Off Session Outcomes
Trusted in part. Computational/ uses serializedPartyAddresses, partyDeviceId, partyIdentityKeyBytes, partyIdentityKey, and partyAddressName; spqrOffSessionParams, initKeysE, Reach, sendModelSpqrOff, and recvModelSpqrOff are checked by Lean. See Computational/ and Computational/ (DEV-M3, DEV-M4, DEV-M5, DEV-M10, DEV-E8).
@[expose] public sectionset_option autoImplicit falsenamespace CryptoVerification.E2Eopen CryptoGames CryptoGames.LibsignalSession CryptoGames.Ratchet CryptoGames.Ratchet.LibsignalInstopen CryptoVerification.LibsignalTripleRatchetRepr CryptoVerification.LibsignalProtoCodecThe parties (constants of the image)
def partyAddressName
The protocol address name of each party: a fixed hyphenated UUID.
DEV-M3 (libsignal): the parties' addresses are constants. ACD19 Def. 6 has two parties A and B and no addresses. libsignal MACs both parties' addresses, and the wrapper fixes them: these two UUID names and device 1 (partyDeviceId). Why: the image is one fixed configuration. Effect: w.l.o.g., argued: the session model's bound holds for every address blob.
2 declarations not shown (lines 47–69): theorems, which Lean checks, or definitions that no headline statement uses
CryptoVerification., CryptoVerification.
def partyDeviceId
Every party uses device 1.
def partyDeviceId : BitVec 8 := 1#8def serializedPartyAddresses
serialize_addresses(sender, recipient) of the two parties' addresses (names partyAddressName, device 1) under the UUID parser uuidParse: none if a name does not parse (then libsignal MACs without addresses, in the binary and in the session model alike). The scheme uses it at the trusted model uuidTryParse of Uuid::try_parse (spqrOffSessionParams), under which both names parse.
def serializedPartyAddresses (uuidParse : UuidParser) (sender recipient : Party) : Option (List (BitVec 8)) := do
let s ← serviceIdParse uuidParse (utf8 (partyAddressName sender))
let r ← serviceIdParse uuidParse (utf8 (partyAddressName recipient))
return addrBytes s partyDeviceId ++ addrBytes r partyDeviceId5 declarations not shown (lines 86–165): theorems, which Lean checks, or definitions that no headline statement uses
CryptoVerification., CryptoVerification., CryptoVerification., CryptoVerification., CryptoVerification., CryptoVerification., CryptoVerification., CryptoVerification., CryptoVerification.
end CryptoVerification.E2E