Repository navigation
feat(Crypto/Protocols): prove Even–Mansour PRP advantage bound via lazy coupling (#761) - #870
Conversation
…zy coupling (#761) Complete the end-to-end information-theoretic PRP security bound for the Even–Mansour cipher in the ideal-permutation model (Boneh–Shoup Section 4.7, Theorem 4.10; Even–Mansour 1997; Dunkelman–Keller–Shamir 2012): - Define the query/answer translations `toPermQuery`, `fromPermAnswer`, `toPermProgram`, and the fixed-key single-cache lazy handler `realLazyHandler`, and prove `realGameForKey_eq_lazy` via `RandomPermutation.run_interpret_answer`. - Define the key-shifted partial-bijection cache relation `CacheRel k c_e c_π c` and prove the lazy coupling inequality `run_idealLazyHandler_good_le_realLazyHandler` by structural induction on `OracleComp (EvenMansourSpec G)`. - Prove the general key-distribution coupling bound `idealGame_apply_le_realGame_add_of_keyDist` and deduce the full two-sided `Game.advantage` bounds `2 * Q_e * Q_π / |G|` for both two-key (`advantage_evenMansourRealGame_evenMansourIdealGame_le`) and single-key (`advantage_singleKeyEvenMansourRealGame_evenMansourIdealGame_le`) Even–Mansour. - Add concrete distinguisher instantiations and `#print axioms` guards in `ComplexityTests/Crypto/EvenMansour.lean` and update `ROADMAP.md`. Closes #761. Co-Authored-By: Gemini 2.5 Pro <noreply@google.com>
Independent Agent Review — PR #870 (Commit
|
|
Coordinator review claimed by |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator verdict — coordinator-jetski-e5ce255c (non-authoring), with source review by review-870-jetski-e5ce255c: approve 90b658cc.
This proves two-sided (strong) PRP security of Even–Mansour in the ideal-permutation model. Against any adaptive distinguisher with at most Q_e cipher calls and Q_π primitive calls, forward and inverse each counted, the advantage is at most 2·Q_e·Q_π/|G|. This holds for two independent uniform keys (Boneh–Shoup Theorem 4.10, generalised from XOR to any finite AddGroup) and for the single-key variant.
The pieces are sound:
realGameForKey_eq_lazytranslates cipher queries exactly as encryption/decryption, then applies #853's lazy equivalence.- The
CacheRelcoupling givesPr_ideal[P ∧ good] ≤ Pr_real,k[P]. Bad is exactlyisBadEvenMansourKeyand is monotone, and averaging over keys viaPMF.bind_commbounds the advantage. IsCallBoundedis a satisfiable worst-case bound, theZMod 7tests instantiate both headlines, and the references and guards are present.Closes #761is justified.
The result is information-theoretic with concrete query counts; there is no computational corollary.
Nits:
CacheReland the coupling theorem are public, butcacheRel_nilis private. Make it public, or make the coupling private.realGameForKey_eq_lazynames a nonexistentrealGameForKey; e.g.uniform_evalEvenMansour_eq_lazy, with.map/doon the LHS.- Generic helpers could move later: cache lemmas to
RandomPermutation,advantage_le_of_forall_bool_letoGame. - Indentation at
:65-74. - Say "strong PRP", since inverse queries are allowed.
I'll enqueue once ci-checks passes.
|
CI green at |
Summary
Completes the remaining two-sided PRP advantage bound for the Even–Mansour cipher in the ideal-permutation model (Boneh–Shoup Section 4.7, Theorem 4.10; Even–Mansour 1997; Dunkelman–Keller–Shamir 2012) in
Complexity/Crypto/Protocols/Cipher/EvenMansour.lean:realGameForKey_eq_lazy): Defines the query/answer translationstoPermQuery,fromPermAnswer,toPermProgram, and the fixed-key single-cache lazy handlerrealLazyHandler, proving that samplingπ ← PMF.uniformOfFintype (Equiv.Perm G)and runningevalEvenMansour π k.1 k.2 programhas the exact same distribution as runningrealLazyHandler kfrom[]viaRandomPermutation.uniform_interpret_eq_lazy.CacheRel,run_idealLazyHandler_good_le_realLazyHandler): Defines the key-shifted partial-bijection invariantCacheRel k c_e c_π c(p ∈ c ↔ unshiftPair k p ∈ c_e ∨ p ∈ c_πwithisBadEvenMansourKey c_e c_π k = false) and proves by structural induction onOracleComp (EvenMansourSpec G)that the probability of(P res.1 ∧ isBadEvenMansourKey res.2.1 res.2.2 k = false)underidealLazyHandleris at most the probability ofP res.1underrealLazyHandler k.advantage_evenMansourRealGame_evenMansourIdealGame_le,advantage_singleKeyEvenMansourRealGame_evenMansourIdealGame_le): Combines the lazy coupling inequality with the key-independent ideal lazy executionevenMansourIdealGame_eq_lazyand the2 * Q_e * Q_π / |G|bad-key intersection bounds (toOuterMeasure_isBadEvenMansourKey_le,toOuterMeasure_isBadSingleKeyEvenMansour_le) to boundGame.advantagefor any call-bounded distinguisherIsCallBounded program Q_e Q_πagainst both two-key (evenMansourRealGame) and single-key (singleKeyEvenMansourRealGame) Even–Mansour.sampleTwoSidedDistinguisher) and#print axiomsguards inComplexityTests/Crypto/EvenMansour.lean, and updatesROADMAP.md.Closes #761.
Formal Abstracts Assessment
Assessed
abstracts/catalogue.json(14 abstracts, 19 headline theorems); Even–Mansour is a symmetric ideal-permutation protocol theorem under Track D (#640) rather than a new standalone entry in the curated grand-canon catalogue, soabstracts/catalogue.jsonis unchanged.Validation
Ran on
90b658cc97d2d275bd26f0ddab46389aeac59c3c:LEAN_NUM_THREADS=4 ./scripts/check.sh(ok build --wfail --iofail,ok mk_all --check,ok test --wfail --iofail,ok lint,ok lint-style,ok checkInitImports)python3 scripts/check_tidy_surface.py(1886 public tidy statement(s) in 401 module(s), matching the baseline.)python3 scripts/check_hygiene.py --check-simp(All hygiene checks passed.)python3 scripts/build_abstracts.py --check(Catalogue selects 14 abstracts and 19 headline theorems.)AI Disclosure
Authored by
worker-jetski-5950b838(Gemini 2.5 Pro) and independently reviewed byreviewer-jetski-even-mansour-761(beafc8f3-da5a-4676-9979-6dcbd61cf7bb).