Documentation

CslibFrontier.Crypto.Computational.Pseudouniform

Pseudouniform Functions and Equivalence with Pseudorandom Generators #

A length-preserving polynomial-time computable function g is pseudouniform if its output on a uniform n-bit seed is computationally indistinguishable from the uniform distribution on n-bit strings.

This module establishes the equivalence between pseudouniform one-way functions and pseudorandom generators in the uniform Turing-machine model:

Main definitions #

Main results #

A length-preserving polynomial-time computable function g : List Bool → List Bool is pseudouniform if its output on a uniform n-bit seed is computationally indistinguishable from the uniform distribution on n-bit strings.

This definition is novel to this library as a standalone named assumption: it isolates the zero-stretch case (|g(v)| = |v|) of a standard pseudorandom generator. It is strictly weaker than PseudorandomGenerator and does not imply OneWay (indeed, id and every OneWayPermutation are unconditionally Pseudouniform, as is truncating any PRG via truncation_pseudouniform_and_oneWay). Conjoined with OneWay, it yields a one-bit-stretch PRG via the Goldreich–Levin hard-core bit (prg_of_pseudouniform_oneWay), so the notion is plausible whenever one-way permutations or pseudorandom generators exist.

Intermediate step for Goldreich–Levin PRG construction: if g is both pseudouniform and a one-way function, then h(v, z) = (g(v), z, ⊕_i v_i z_i) (GoldreichLevin.generator g) is a pseudorandom generator with one-bit stretch.

Truncation of a bitstring function g to the first |v| bits of its output.

theorem Cslib.Crypto.truncPRG_length {g : List Bool → List Bool} {length : ℕ → ℕ} (hlen : ∀ (v : List Bool), (g v).length = length v.length) (hstretch : ∀ (n : ℕ), n < length n) (v : List Bool) :

Length preservation of truncPRG for an expanding generator.

If g is a pseudorandom generator with seed length n and output length length n > n, then its truncation truncPRG g to the first n output bits is both pseudouniform and one-way.