Hybrid.lean
Hybrid games for ACD19 Thm 5: shared state and non-encrypting oracles
Trusted in part. The theorems of Computational/ use only isLookaheadHop from this file: read it. Everything else here is checked by Lean. See Computational/.
Shared hybrid state (Slot, HState, HSt, Params, Kind, SpecialOps), state combinators (onH, getH, modifyH, sampleH), lazy chain generation (chainFrom, genStep, genN, genUpTo, reveal), decryption (kind, decIdx), corruption oracles (senderKey, corruptSenderH, corruptReceiverH), and hybrid parameters (hOut, hInit, DG, hp, isLookaheadHop) for the proof of ACD19 Thm 5 (including lookahead mode, DEV-FS14).
@[expose] public sectionopen OracleComp OracleSpec ENNRealnamespace CryptoGames.FSAEAD.Thm5variable {CK MK AD M C : Type}9 declarations not shown (lines 36–110): 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., CryptoGames., CryptoGames.
notation "St"
local notation "St" => HSt CK MK AD M Cnotation "HS"
local notation "HS" => HState CK MK AD M C14 declarations not shown (lines 122–230): 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.
section Gamesvariable [SampleableType MK] [SampleableType CK] [SampleableType C]
[DecidableEq AD] [DecidableEq M] [DecidableEq C]
(ae : AEADScheme MK (ℕ × AD) M C) (G : ℕ → PRGScheme CK (CK × MK)) (maxSkip : ℕ)4 declarations not shown (lines 242–255): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames., CryptoGames., CryptoGames.
def isLookaheadHop
Hybrid step j of the sum: hop j / 2 of the main chain (j even) or of the lookahead chain (j odd).
def isLookaheadHop (j : ℕ) : Bool := j % 2 == 1end Gamesend CryptoGames.FSAEAD.Thm5