OneWayness GameHop: Game 1 reduction #
This module reduces Game 1's bad event (chal_x_queried_gh = true) to the
abstract guess_experiment framework, ultimately bounding it by (q+1)/|input|.
Game 1 variants #
body_game_1,final_game_1— direct query / response handlers.body_recording_game_1,final_recording_game_1— recording variants that append each query toqueries_input.
Correspondence (relational) #
game_1_correspondence couples the match-tracking run to the recording
run with one pRHL invariant (see InvG1 below); the former Game 1'
explicit-match variants and their bridge lemmas are gone.
game_1_correspondence— Game 1's per-σ', t inequality (LHS ≤ RHS in schema form), proven by chaining: bridges →schema_inner_equationfor Game 1' → reverse bridges.ow_game_1_tracked_bad_le_guess_input_bound— full bound:Pr[Game 1 bad] ≤ (q+1)/|input|.
Flag-elision (lazy ↔ tracked) #
ow_game_1_wp_eq_ow_game_1_tracked_wp_of_flag_ignoring — at flag-ignoring
posts, Game 1's lazy oracle and tracked oracle are wp-equivalent. Bridges
the OW theorem's "lazy" Game 1 to our "tracked" Game 1.
Body of guess_experiment_game_1: adv query + lazy_query_tracked
(which internally flips chal_x_queried_gh when inp = chal_x). Doesn't
use the bound target x.
Equations
- body_game_1 ow_adv _x = do ow_adv let inp ← GaudisCrypt.ProgramDenotation.get oracle_input let y ← lazy_query_tracked inp GaudisCrypt.ProgramDenotation.set oracle_output y
Instances For
Final of guess_experiment_game_1: oracle on response. Doesn't use
the bound target.
Equations
- final_game_1 _x = do let resp ← GaudisCrypt.ProgramDenotation.get ow_response let y ← lazy_query_tracked resp GaudisCrypt.ProgramDenotation.set oracle_output y
Instances For
lazy_query_tracked is queries_input-disjoint.
Body recording for Game 1 bad: same shape as guess_experiment_game_1.body
but appends inp (adv's query) to qs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Final recording for Game 1 bad: the last query attempt records resp.
Equations
- One or more equations did not get rendered due to their size.
Instances For
body_recording_game_1 bumps queries_input.length by at most 1 per iteration.
final_recording_game_1 bumps queries_input.length by at most 1.
The relational correspondence #
The match-tracking run (left: body_game_1, whose lazy_query_tracked
flips chal_x_queried_gh when the query equals chal_x = t) is coupled
to the recording run (right: body_recording_game_1, which appends each
query to queries_input) by the invariant InvG1 below: the recording
state is the tracking state with the three bookkeeping lenses
overwritten; the left flag mirrors membership of the target in the
recorded list; the left challenge is pinned to the target. The right
flag value m is existential — the right run's lazy_query_tracked
junk-flips it against tv = chal_x.get σ', and the ending overwrites it
anyway.
This one invariant replaces the entire former Game 1' apparatus (the
explicit-match variants, eight bridge lemmas, the queries-input
invisibility block, and two maxHeartbeats game-level conversions — see
git history).
The ending: reading the tracking flag (left) returns the same boolean as the deferred membership test (right).
Loop-body judgment: one tracking step vs one recording step.
Game 1 correspondence, relationally: the tracking flag fires iff
the target lands in the recorded query list. One synchronized
invariant (InvG1) through the loop, the final query, and the ending.
Reduction: bad-in-Game-1 ≤ Guess(input, q+1).
Routes via guess_experiment_game_1 → interim → collector → bound.
Flag-elision bridge: untracked Game 1 ↔ tracked Game 1 #
For postconditions that don't read chal_x_queried_gh, the tracked and
untracked variants of Game 1 agree at the wp level.
Flag elision at the game level: ow_game_1 and ow_game_1_tracked
have equal wp's for flag-ignoring postconditions.
Proof via the EquivModuloLens calculus: bind congruence chains compose
oracle_loop_n_equiv (loop-level), lazy_query_equiv_lazy_query_tracked
(final query), and set_equiv_pure (initial set chal_x_queried_gh false).