Primitives.lean
Deterministic AEAD and its one-time CCA game
Trusted in part. The theorems of Computational/ use only AEADScheme, otccaSpec, OTCCAState from this file: read them. Everything else here is checked by Lean. See Computational/.
Defines deterministic AEAD (AEADScheme, ACD19 §2.2 Def. 1) and its one-time chosen-ciphertext hidden-bit game (OTCCAAdversary, otccaEncrypt, otccaDecrypt, otccaGame, otccaAdvantage, Def. 2 and Fig. 1).
@[expose] public sectionopen OracleComp OracleSpec ENNRealnamespace CryptoGames1 declaration not shown (lines 33–38): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames., CryptoGames.
namespace AEADSchemevariable {Key AssocData Message Ciphertext : Type}abbrev otccaSpec
Fig. 1 OT-CCA oracle interface: one-time encrypt and unbounded decrypt.
abbrev otccaSpec (AssocData Message Ciphertext : Type) :=
((AssocData × Message) →ₒ Option Ciphertext) + ((AssocData × Ciphertext) →ₒ Option Message)structure OTCCAState
Fig. 1 OT-CCA game state: key, hidden bit, and optional challenge (a*, e*).
structure OTCCAState (Key AssocData Ciphertext : Type) where
key : Key
b : Bool
chal : Option (AssocData × Ciphertext) := none5 declarations not shown (lines 54–106): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames.
end AEADSchemeend CryptoGames