Skip to content

Shared lazy bidirectional random-permutation sampler for ideal-permutation proofs #834

Closed

Description

@SamuelSchlesinger

Two crypto results are blocked on the same missing piece of shared infrastructure: a lazily sampled random permutation with forward and inverse queries, together with its coupling to a uniformly random permutation.

The #733 friction log already records this.

Done when:

Follow Boneh–Shoup's treatment (the ideal-permutation model, Section 4.7, and the PRF switching lemma, Section 4.4.3). Look for existing OracleComp caching and lazy-sampling machinery before adding new machinery, and check what VCVio does here; adopt it only if it is clearly better.

Status: available. Claim it here before starting.

🤖 Generated with Claude Code

Activity

  1. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Worker Claim (worker-jetski-5950b838, session 5950b838-6b97-49cb-8bc9-a5de75fd93c5)

    • Status: active
    • Branch / Worktree: feat/lazy-bidirectional-perm-834 (.worktrees/wt-834-lazy-perm)
    • Scope:
      1. Shared bidirectional permutation oracle & lazy sampler (Complexity/Languages/Probabilistic/RandomPermutation.lean), reusing OracleComp.run_interpret_simulation_of_invariant and OracleComp.IdenticalUntilBad to prove:
        • Eager/lazy equivalence between sampling π ← PMF.uniformOfFintype (Equiv.Perm α) and the lazy bidirectional permutation sampler RandomPermutation.answer;
        • The bidirectional and forward-only PRP/PRF switching bounds (Q.choose 2 / |α|, Boneh–Shoup Section 4.4.3 & Section 4.7) against forgetful lazy sampling / RandomOracle.answer.
      2. Client applications in LubyRackoff.lean (feat(crypto): Feistel networks and the Luby–Rackoff theorem (Boneh–Shoup Section 4.4) #748, 3-round PRP bound against idealPermGame and quantitative 1 - O(|G|⁻¹) CCA bound against idealStrongGame) and/or EvenMansour.lean (feat(crypto): Even–Mansour cipher in the ideal-permutation model (Boneh–Shoup Section 4.7) #761, Game.advantage ≤ 2 * Q_e * Q_π / |G|).
  2. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Status update (worker-jetski-5950b838 / 5950b838-6b97-49cb-8bc9-a5de75fd93c5)

    • State: awaiting review
    • PR: feat(Languages/Probabilistic): add shared lazy bidirectional random-permutation sampler (#834) #853 (feat/lazy-bidirectional-perm-834 at e089e2eff4f8f1d7ae0f985468725e1374d9c61c)
    • Summary: Implemented Complexity.Languages.Probabilistic.RandomPermutation (PermQuery, PermOracleSpec, evalPerm, answer, answer_complete, uniform_interpret_eq_lazy, toOuterMeasure_bad_choose_two_le, uniformPerm_bind_apply_le_forgetful, abs_sub_uniformPerm_forgetful_le, abs_sub_uniformPerm_uniformFunc_le), upgraded LubyRackoff.lean (simplified toOuterMeasure_hasVCollision_le, added 3-round PRP bounds against idealPermGame, and proved the quantitative nonnegligible CCA advantage lower bound 1 - |G|⁻¹ - 4 * |G|⁻¹ ^ 2 ≤ Game.advantage ... against idealStrongGame in le_advantage_feistel3CCAAttack_idealStrongGame_of_ne), and upgraded EvenMansour.lean (re-exported PermQuery/PermOracleSpec/evalPerm and proved evenMansourIdealGame_eq_lazy). Full validation and independent review (APPROVE by reviewer-jetski-lazy-perm-834) are recorded on feat(Languages/Probabilistic): add shared lazy bidirectional random-permutation sampler (#834) #853.
  3. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Status update (worker-jetski-5950b838, session 5950b838-6b97-49cb-8bc9-a5de75fd93c5)

    • State: awaiting review
    • PR: feat(Languages/Probabilistic): add shared lazy bidirectional random-permutation sampler (#834) #853 (feat/lazy-bidirectional-perm-834 at ab877c3743dbcbe58a38ccfb955fa56bf0b579a3)
    • Summary: Addressed coordinator review feedback in ab877c3743dbcbe58a38ccfb955fa56bf0b579a3 (fixed [BonehShoup2023] citation, privatized internal coupling helpers, inlined RandomPermutation names in EvenMansour.lean, and added concrete Fin 3 test instances and #print axioms guards in ComplexityTests/Crypto/LubyRackoff.lean). Ready for coordinator re-review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions