Documentation

CslibFrontier.Crypto.Game.Distributional

Distribution distinguishing in a chosen computational model #

Distributional.game evaluates a represented algorithm on a sample from a distribution distinguishing problem. The representation type, evaluator and admissibility predicate are supplied by the client. The existing Game.Indistinguishable, Game.IndistinguishableWithError and Game.IndistinguishableWithin then express asymptotic, concrete or resource-indexed bounds. There is no separate security notion for distributional problems.

An extensional class of test families gives exactly the same statements when membership means that one admissible algorithm realizes the entire family. For whole-family admissibility, the realization quantifier precedes the parameter; replacing it by independent realizers at every parameter would in general change a uniform model into a nonuniform one.

The existing computational-indistinguishability definition applies directly to the two law families, including its whole-family PPT semantic tests. Circuit evaluation and gate-count predicates can likewise be passed directly to game; the adapter fixes no computational model.

noncomputable def Cslib.Crypto.Distributional.game {Input : ℕ → Type u_1} {Algorithm : Type u_2} (P : (n : ℕ) → Probability.DistinguishingProblem (Input n)) (eval : Algorithm → (n : ℕ) → Input n → PMF Bool) (hypothesis : Bool) (algorithm : Algorithm) (n : ℕ) :

Run a represented algorithm on the selected law of a problem family. The model is specified by Algorithm and eval; admissibility and resource bounds are the arguments to the shared Boolean-game predicates.

theorem Cslib.Crypto.Distributional.indistinguishable_iff_realized_tests {Input : ℕ → Type u_1} {Algorithm : Type u_2} (P : (n : ℕ) → Probability.DistinguishingProblem (Input n)) (eval : Algorithm → (n : ℕ) → Input n → PMF Bool) (Admissible : Algorithm → Prop) :
Game.Indistinguishable (game P eval false) (game P eval true) Admissible ↔ Game.Indistinguishable (game P id false) (game P id true) fun (test : (n : ℕ) → Input n → PMF Bool) => ∃ (algorithm : Algorithm), Admissible algorithm ∧ eval algorithm = test

Quantifying over representations is equivalent to quantifying over test families with one admissible realizer for the whole family. This retains any uniformity imposed by the model.

theorem Cslib.Crypto.Distributional.indistinguishableWithError_iff_realized_tests {Input : ℕ → Type u_1} {Algorithm : Type u_2} (P : (n : ℕ) → Probability.DistinguishingProblem (Input n)) (eval : Algorithm → (n : ℕ) → Input n → PMF Bool) (Admissible : Algorithm → Prop) (ε : ℕ → NNReal) :
Game.IndistinguishableWithError (game P eval false) (game P eval true) Admissible ε ↔ Game.IndistinguishableWithError (game P id false) (game P id true) (fun (test : (n : ℕ) → Input n → PMF Bool) => ∃ (algorithm : Algorithm), Admissible algorithm ∧ eval algorithm = test) ε

A common error bound is unchanged by replacing algorithm representations with their admissibly realized whole test families.

theorem Cslib.Crypto.Distributional.indistinguishableWithin_iff_realized_tests {Input : ℕ → Type u_1} {Algorithm : Type u_2} {Resource : Type u_3} (P : (n : ℕ) → Probability.DistinguishingProblem (Input n)) (eval : Algorithm → (n : ℕ) → Input n → PMF Bool) (Within : ℕ → Resource → Algorithm → Prop) (ε : ℕ → Resource → NNReal) :
Game.IndistinguishableWithin (game P eval false) (game P eval true) Within ε ↔ Game.IndistinguishableWithin (game P id false) (game P id true) (fun (n : ℕ) (r : Resource) (test : (n : ℕ) → Input n → PMF Bool) => ∃ (algorithm : Algorithm), Within n r algorithm ∧ eval algorithm = test) ε

Resource bounds on represented algorithms can equivalently be stated on the test families they realize, with a witness satisfying the same bound at the parameter under consideration.