Documentation

CslibFrontier.Crypto.Primitives.PRP.StrongSwitching

Bidirectional switching against the forgetful sampler #

A PRP.StrongAdversary D queries a permutation of a finite type D in both directions. This module bounds how well such an adversary, with private coins and at most Q queries, tells a uniformly random permutation from RandomPermutation.forgetfulAnswer, the lazy sampler that keeps the pairs (x, y) it has answered, answers .forward x or .inverse y from a recorded pair when there is one, and otherwise with a fresh uniform point of D, which may repeat a recorded one. The forgetful sampler is neither a random function nor a random permutation; it is the object that RandomPermutation.abs_sub_uniformPerm_forgetful_le compares a uniform permutation with, for deterministic adversaries. The adversary's coins are fixed with ProbOracleComp.coinLaw_bind_runWith_fixCoins, which reduces the bound to that deterministic one.

The bound is information-theoretic: nothing is claimed about running time.

Main results #

The law of strongIdealExperiment: a uniform permutation π, then the adversary interpreted at the PMF level against π in both directions.

Bidirectional switching bound for adversaries with private coins: an adversary making at most Q queries tells a uniform permutation of D, queried in both directions, from the forgetful lazy sampler with advantage at most Q.choose 2 / |D|.