Documentation

Complexity.Crypto.Computational.GoldreichLevin.HardCore

The Goldreich–Levin hard-core predicate #

Split a seed into two equal halves and an optional spare bit. Apply the one-way function to the first half and retain the rest. The inner product of the two halves is a hard-core predicate. Keeping the spare bit extends the construction to every seed length.

OneWayPermutation.pseudorandomGenerator completes the one-bit PRG construction, including deterministic polynomial time and security against uniform PPT adversaries.

Main definitions #

Main results #

References #

Adapted from Crypto/Computational/GoldreichLevin/HardCore.lean on the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8, using the shared game API and tidy TM calculus.

Apply a function to the first half of a word and retain the remaining bits.

Instances For

    The inner product of the first two equal halves, ignoring an optional final bit.

    Instances For
      theorem Cslib.Crypto.GoldreichLevin.paddedFunction_chunks (f : List Bool → List Bool) {n : ℕ} (x r : BitString n) (extra : List Bool) (hextra : extra.length ≤ 1) :

      On two equal chunks and at most one spare bit, only the first chunk is transformed.

      theorem Cslib.Crypto.GoldreichLevin.paddedPredicate_chunks {n : ℕ} (x r : BitString n) (extra : List Bool) (hextra : extra.length ≤ 1) :

      The spare bit is retained by the function but does not enter the parity.

      theorem Cslib.Crypto.GoldreichLevin.paddedFunction_length {f : List Bool → List Bool} (hlen : ∀ (word : List Bool), (f word).length = word.length) (seed : List Bool) :

      A length-preserving function leaves the complete padded seed length unchanged.

      Permuting the first half preserves uniform seeds of every length.

      Translate a predictor for a padded seed to a parity predictor, sampling its spare bits.

      Instances For

        Parameter rescaling, sampling, and captured adversary calls have a uniform PPT certificate.

        theorem Cslib.Crypto.GoldreichLevin.eval_paddedPrediction (f : List Bool → List Bool) (adversary : Distinguisher) (n spare : ℕ) (hspare : spare ≤ 1) :
        (predictionGame (paddedFunction f) paddedPredicate adversary (2 * n + spare)).eval = (parityPredictionGame f (paddedPredictor adversary spare) n).eval

        The padded prediction experiment is the parity experiment, for either possible spare length.

        Goldreich–Levin supplies an efficient hard-core predicate for the padded function. Two fixed PPT reductions handle even and odd seed lengths; no length-dependent adversary is chosen.

        The one-bit generator: permute the first half, retain the rest, and append the parity.

        Instances For

          One-way permutations imply uniform polynomial-time pseudorandom generators with one-bit stretch. Goldreich–Levin supplies the hard-core predicate; uniformity supplies the ideal hybrid.