HybridWith.lean
Hybrid games and reductions of ACD19 Thm 5, with an AD-dependent ideal ciphertext
Trusted in part. The CLI security theorems (Theorems/ under Computational/, Oom/ under Computational/) use only IndexedOtccaSpec and slotToHybridHopIndex from this file: read them. The rest is used by no theorem of Computational/. The Thm 5 hybrids and reductions among it are part of the statement of theorem5: read them to trust it. Every proof is checked by Lean. See Computational/.
Hybrid encrypting oracle (encIdxWith, otOpsWith), (ℕ × AD)-indexed OT-CCA interface (IndexedOtccaSpec, IndexedOtccaState, otImpl), multi-slot OT-CCA reduction (multiSlotOtccaReduction), and hop-index encoding (slotToHybridHopIndex) with AD-dependent ideal ciphertexts ideal (i, a) (DEV-FS17).
@[expose] public sectionopen OracleComp OracleSpec ENNRealnamespace CryptoGames.FSAEAD.Thm5variable {CK MK AD M C : Type}notation "St"
local notation "St" => HSt CK MK AD M C2 declarations not shown (lines 49–82): theorems, which Lean checks, or definitions that no headline statement uses
CryptoGames., CryptoGames.
abbrev IndexedOtccaSpec
(ℕ × AD)-indexed OT-CCA oracle interface (uniform coins plus encrypt/decrypt).
abbrev IndexedOtccaSpec (AD M C : Type) := unifSpec + AEADScheme.otccaSpec (ℕ × AD) M C17 declarations not shown (lines 97–322): 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.
def slotToHybridHopIndex
Map slot j < 2 * q + (maxSkip + 1) to its encoded hybrid hop index m, which the single-slot reductions decode into chain position m / 2 and lookahead bit isLookaheadHop m = (m % 2 == 1):
-
for
j < 2 * q,slotToHybridHopIndexq j = j (interleaving2 * kand2 * k + 1fork < q); -
for
j = 2 * q + d,slotToHybridHopIndexq j = 2 * (q + d) + 1 (the remaining lookahead hopsk ≥ q).
def slotToHybridHopIndex (q j : ℕ) : ℕ :=
if j < 2 * q then j else 2 * (j - q) + 1end CryptoGames.FSAEAD.Thm5