Defs.lean
Forward-secure AEAD: syntax and security game (ACD19 Def. 14, Fig. 5, Def. 15)
Trusted in part. The theorems of Computational/ use only Adversary, AdversaryComp, FSAEADScheme, ReceiveResult, spec from this file: read them. Everything else here is checked by Lean. See Computational/.
Syntax (FSAEADScheme) and hidden-bit security game (game, advantage, MakesAtMostQueries) for forward-secure AEAD after ACD19 §4.2.1 (Defs. 14–15, Fig. 5). Pure state transitions transmit, challenge, corruptSender, corruptReceiver, deliver, and inject operate on State, Record, and isCompromised.
Deviations in this file: DEV-FS1, DEV-FS2, DEV-FS3, DEV-FS4, DEV-FS5, DEV-FS6, DEV-FS11, DEV-FS21. Companion FS-AEAD deviations appear in Construction.lean (DEV-FS7, DEV-FS10), Security.lean (DEV-FS12, DEV-FS15), SecurityWith.lean (DEV-FS17), PubDefs.lean (DEV-FS19, DEV-FS20), Theorem5.lean (DEV-FS16), and Theorem5On.lean (DEV-FS18); see Computational/.
@[expose] public sectionopen OracleComp OracleSpec ENNRealnamespace CryptoGames1 declaration not shown (lines 39–59): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames.
namespace FSAEADinductive ReceiveResult
Result of a receive oracle: rejected, or accepted i m (m = none when masked for a challenge).
inductive ReceiveResult (Message : Type) where
| rejected
| accepted (i : ℕ) (m : Option Message)
deriving DecidableEqabbrev spec
ACD19 Fig. 5 oracle interface (transmit, challenge, corruptSender, corruptReceiver, deliver, inject).
DEV-FS3 (formalization): req and end. Failed req preconditions and calls after ended return none without modifying state; FS-Rcv errors leave v_B unchanged.
abbrev spec (SenderState ReceiverState AssocData Message Ciphertext : Type) :=
((AssocData × Message) →ₒ Option Ciphertext)
+ ((AssocData × Message × Message) →ₒ Option Ciphertext)
+ (Unit →ₒ Option SenderState)
+ (Unit →ₒ Option (SenderState × ReceiverState))
+ ((AssocData × Ciphertext) →ₒ Option (ReceiveResult Message))
+ ((AssocData × Ciphertext) →ₒ Option (ReceiveResult Message))abbrev AdversaryComp
Computation with uniform coins and the Fig. 5 FS-AEAD oracles.
abbrev AdversaryComp (SenderState ReceiverState AssocData Message Ciphertext : Type) :=
OracleComp (unifSpec + spec SenderState ReceiverState AssocData Message Ciphertext)abbrev Adversary
FS-AEAD adversary outputting a Boolean guess for b.
abbrev Adversary (SenderState ReceiverState AssocData Message Ciphertext : Type) :=
AdversaryComp SenderState ReceiverState AssocData Message Ciphertext Boolvariable {Key SenderState ReceiverState AssocData Message Ciphertext : Type}notation "Comp"
local notation "Comp" => AdversaryComp SenderState ReceiverState AssocData Message Ciphertext16 declarations not shown (lines 96–253): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames.
section Gamevariable [DecidableEq AssocData] [DecidableEq Message] [DecidableEq Ciphertext]
(fs : FSAEADScheme Key SenderState ReceiverState AssocData Message Ciphertext)notation "GameM"
local notation "GameM" =>
StateT (State SenderState ReceiverState AssocData Message Ciphertext) ProbComp10 declarations not shown (lines 265–307): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames., CryptoGames.
def MakesAtMostQueries
A makes at most q queries to the Fig. 5 FS-AEAD oracles.
def MakesAtMostQueries (A : Adversary SenderState ReceiverState AssocData Message Ciphertext)
(q : ℕ) : Prop :=
A.IsQueryBoundP (· matches .inr _) qend Gameend FSAEADend CryptoGames