Documentation

CslibFrontier.Crypto.Primitives.PRG.Parallel

Parallel composition of finite pseudorandom generators #

Given a PRG G : Generator Seed Output and n : ℕ, the n-wise parallel composition G.parallel n evaluates G independently on n seeds: G'(s_1, ..., s_n) := (G(s_1), ..., G(s_n)) ([BS23], §3.4.1).

In the finite-type PRG game (Attack Game 3.1), adversaries are unrestricted PMF kernels, so no efficiency claim is made here. For every [NeZero n] and every adversary A attacking G.parallel n, G.parallelReduction n A samples a uniform hybrid index ω : Fin n and achieves the exact relation PRGadv[A, G'] = n · PRGadv[B, G] of [BS23], Theorem 3.2 (p. 55): (G.parallel n).advantage A = n * G.advantage (G.parallelReduction n A).

For the uniform strict-PPT asymptotic statement on bit-list ensembles (which delegates to the library's certified sequenceTest reduction and incurs loss dyadicSize (count n)), see CslibFrontier.Crypto.Computational.PseudorandomGenerator.Parallel.

Main definitions #

Main results #

References #

def Cslib.Crypto.PRG.Generator.parallel {Seed : Type u_1} {Output : Type u_2} (G : Generator Seed Output) (n : ℕ) :
Generator (Fin n → Seed) (Fin n → Output)

Apply G independently to each coordinate of an n-tuple of seeds: G'(s_1, ..., s_n) := (G(s_1), ..., G(s_n)) ([BS23], §3.4.1).

theorem Cslib.Crypto.PRG.Generator.outputDist_parallel {Seed : Type u_1} {Output : Type u_2} [Fintype Seed] [Nonempty Seed] [Finite Output] (G : Generator Seed Output) (n : ℕ) :

The output distribution of G.parallel n is the n-fold independent product of G.outputDist.

noncomputable def Cslib.Crypto.PRG.Generator.parallelReduction {Seed : Type u_1} {Output : Type u_2} [Fintype Seed] [Nonempty Seed] [Fintype Output] [Nonempty Output] (G : Generator Seed Output) (n : ℕ) [NeZero n] (A : Adversary (Fin n → Output)) :
Adversary Output

Hybrid reduction adversary B against G ([BS23], Theorem 3.2, pp. 57–58): samples ω : Fin n uniformly, fills coordinates < ω uniformly from Output, inserts its challenge r at coordinate ω, draws coordinates > ω from G.outputDist, and runs A.

theorem Cslib.Crypto.PRG.Generator.advantage_parallel_eq {Seed : Type u_1} {Output : Type u_2} [Fintype Seed] [Nonempty Seed] [Fintype Output] [Nonempty Output] (G : Generator Seed Output) (n : ℕ) [NeZero n] (A : Adversary (Fin n → Output)) :

Boneh–Shoup Theorem 3.2 (finite typed relation, p. 55): For [NeZero n] and every unrestricted PMF-kernel adversary A against G.parallel n, G.parallelReduction n A satisfies PRGadv[A, G'] = n · PRGadv[B, G].