Documentation

CslibFrontier.Crypto.Game.StatisticalIndistinguishability

Statistical indistinguishability of ensembles #

StatisticallyIndistinguishable X Y formalizes [BS23], Definition 3.6 (p. 85), in the asymptotic reading of Section 3.11.1 (p. 87): two ensembles X Y : ∀ n, PMF (α n) have statistical distance bounded by a single negligible function ε : ℕ → ℝ≥0 at every n.

This development differs from the book's presentation as follows:

  1. Asymptotic ensembles on arbitrary types. The types α n are arbitrary Types, not required to be finite or bit strings of polynomial length. Distance is measured by Cslib.Probability.CloseTo so it applies without Fintype, and agrees with Negligible fun n => nndist (X n) (Y n) on finite types (statisticallyIndistinguishable_iff_negligible_nndist).
  2. Characterization by unbounded tests. statisticallyIndistinguishable_iff_indistinguishable equates statistical indistinguishability with Game.Indistinguishable with admissibility fun _ => True, proved via Game.closeTo_advantage_map_decide_lt without finiteness.
  3. Scope. Theorem 3.10 in max = Δ form, Remark 3.1, and Exercises 3.10–3.14 are omitted. Game-specific statistical notions such as CommitmentScheme.StatisticalHiding are not instances and are not changed.

Main definitions #

Main results #

References #

def Cslib.Crypto.StatisticallyIndistinguishable {α : ℕ → Type} (X Y : (n : ℕ) → PMF (α n)) :

Statistical indistinguishability ([BS23], Definition 3.6, p. 85, read asymptotically as in Section 3.11.1, p. 87): the statistical distance between X n and Y n is bounded by a negligible function of the security parameter n.

An ensemble is statistically indistinguishable from itself.

Statistical indistinguishability is symmetric.

Statistical indistinguishability is transitive: the two negligible bounds add.

theorem Cslib.Crypto.StatisticallyIndistinguishable.map {α β : ℕ → Type} {X Y : (n : ℕ) → PMF (α n)} (h : StatisticallyIndistinguishable X Y) (f : (n : ℕ) → α n → β n) :
StatisticallyIndistinguishable (fun (n : ℕ) => PMF.map (f n) (X n)) fun (n : ℕ) => PMF.map (f n) (Y n)

Applying a function to both ensembles preserves statistical indistinguishability ([BS23], Theorem 3.13, p. 85, for ensembles). The function need not be efficient.

theorem Cslib.Crypto.StatisticallyIndistinguishable.bind {α β : ℕ → Type} {X Y : (n : ℕ) → PMF (α n)} (h : StatisticallyIndistinguishable X Y) (f : (n : ℕ) → α n → PMF (β n)) :
StatisticallyIndistinguishable (fun (n : ℕ) => (X n).bind (f n)) fun (n : ℕ) => (Y n).bind (f n)

Randomized postprocessing of both ensembles preserves statistical indistinguishability.

theorem Cslib.Crypto.StatisticallyIndistinguishable.indistinguishable {α : ℕ → Type} {X Y : (n : ℕ) → PMF (α n)} (h : StatisticallyIndistinguishable X Y) :
Game.Indistinguishable (fun (test : (n : ℕ) → α n → Game) (n : ℕ) => (X n).bind (test n)) (fun (test : (n : ℕ) → α n → Game) (n : ℕ) => (Y n).bind (test n)) fun (x : (n : ℕ) → α n → Game) => True

Every family of randomized tests, efficient or not, has negligible advantage between statistically indistinguishable ensembles ([BS23], Theorem 3.11, p. 84, in the asymptotic reading of Section 3.11.1, p. 87).

theorem Cslib.Crypto.StatisticallyIndistinguishable.of_dist_le {α : ℕ → Type} {X Y : (n : ℕ) → PMF (α n)} [(n : ℕ) → Fintype (α n)] {ε : ℕ → NNReal} (hε : Negligible ε) (h : ∀ (n : ℕ), dist (X n) (Y n) ≤ ↑(ε n)) :

On finite types, a negligible bound on the statistical distance dist (X n) (Y n) gives statistical indistinguishability. With upstream PMF.StatisticallyClose (X n) (Y n) (ε n), which unfolds to this bound, this is the entry point from the finite metric.

theorem Cslib.Crypto.statisticallyIndistinguishable_iff_indistinguishable {α : ℕ → Type} {X Y : (n : ℕ) → PMF (α n)} :
StatisticallyIndistinguishable X Y ↔ Game.Indistinguishable (fun (test : (n : ℕ) → α n → Game) (n : ℕ) => (X n).bind (test n)) (fun (test : (n : ℕ) → α n → Game) (n : ℕ) => (Y n).bind (test n)) fun (x : (n : ℕ) → α n → Game) => True

Statistical indistinguishability is indistinguishability by every family of randomized tests, with no efficiency condition: the distance is negligible exactly when every test family has negligible advantage.

theorem Cslib.Crypto.statisticallyIndistinguishable_iff_negligible_nndist {α : ℕ → Type} [(n : ℕ) → Fintype (α n)] {X Y : (n : ℕ) → PMF (α n)} :

On finite types, statistical indistinguishability says that the statistical distance dist (X n) (Y n) of [BS23], Definition 3.5, is negligible: Definition 3.6 as printed.