Skip to content

Add adaptive table-monitoring games over StrongURP #491

In progress

Description

@MarcIlunga

Background

How can adaptive security proofs over a bidirectional ideal permutation StrongURP X (such as sponge collision resistance, sponge indifferentiability, and other permutation-based constructions) monitor an arbitrary downward-closed predicate on the recorded partial-permutation query table and translate per-step bad-event bounds directly into adaptive winning-probability and CC statistical distance bounds without duplicating Bidirectional / UntilBad / StrongURP accounting?

Commons.Definitions.Ideal defines StrongURP X on Bidirectional X q, Commons.Schemes.Sponge.Table defines directed partial-permutation tables (PermutationEdge, insertEdge, queryEdge, AgreesWith), and Probability.Permutation.Walk (#466) proves conditional reply-event upper bounds for fresh forward and inverse permutation queries. Extracting the sponge-independent table-monitoring game and one-step/linear-cost reduction engine into Commons.Definitions.PermutationTableGame mirrors Commons.Definitions.CollisionGame (Commons.URF) and Commons.Definitions.LazyPermutation (Commons.URP).

Proposed change

Add Commons.Definitions.PermutationTableGame (src/Commons/Definitions/PermutationTableGame.lean, namespace Commons.StrongURP):

  1. Bidirectional transcript-to-table bridge:
    • Define portIsInverse, queryPoint, permReply, permEval, queryHistoryTable, transcriptEdge, transcriptTable, and recordedInputs.
    • Prove consistency and cardinality lemmas (recordedInputs_card_le, length_transcriptTable_le, queryHistoryTable_subset_of_prefix, queryHistoryTable_eq_transcriptTable_of_replies, permEval_forall_iff_agreesWith, agreesWith_iff_recordedInputs, replies_permReply_iff).
  2. Generic monotone table-monitoring game on StrongURP:
    • Define tableMonitorGame q Good hGood_mono : TypedGame (Bidirectional X q) setting the MBO as soon as ¬ Good (queryHistoryTable q π xs).
    • Prove tableMonitorGame_visible : (tableMonitorGame q Good hGood_mono).visible = StrongURP X (q := q).
    • Prove strongURP_mass_eq, tableMonitorGame_unsetMBOs_eq, and tableMonitorGame_set_mass_eq.
    • Prove tableMonitorGame_set_mass_le_of_badEvent: replayed queries cost zero and fresh forward/inverse queries pay at most (|X| / (|X| - q)) · stepBound h.length whenever the fresh reply triggers ¬ Good with uniform state mass at most stepBound table.length.
  3. Linear step-cost summation and CC distance / substitution bridge:
    • Prove transcriptCost_linear_sum, dist_visible_le_of_winProbability_le (Δ, |≡), and substitutesWithin_of_dist_le (≃[...]).
    • Prove tableMonitorGame_winProbability_le_of_linear, tableMonitorGame_win_le_of_linear, and tableMonitorGame_dist_le_of_linear summing linear per-step bounds a · (n + 1) + b · n into (|X| / (|X| - q)) · (a · C(q + 1, 2) + b · C(q, 2)).

Acceptance criteria

  • Tests.PermutationTableGame verifies:
    • tableMonitorGame_visible recovers StrongURP on a concrete finite domain (Fin 8, q = 3).
    • Direct instantiation of tableMonitorGame_set_mass_le_of_badEvent and tableMonitorGame_win_le_of_linear on a concrete downward-closed table predicate.
    • tableMonitorGame_dist_le_of_linear, substitutesWithin_of_dist_le, cc_normalize, and cc_calc statistical compatibility under CC custom notation (Δ, |≡, •, ≃[...]).
    • #print axioms on all exported theorems confirming dependence only on propext, Classical.choice, and Quot.sound.
  • lake build --wfail, scripts/check-sources.sh, scripts/check-axioms.sh, and lake env lean -Dweak.linter.mathlibStandardSet=true pass with zero warnings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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