Hard-core predicates and one-bit expansion #
A hard-core predicate is efficiently computable from a seed but unpredictable from its image. Security quantifies over uniform PPT predictors and measures absolute bias from one half, so it also rules out reliable anticorrelation. This property alone does not require the image function to be one-way or injective.
The reduction appends a fixed trial bit to the image, runs a distinguisher, and predicts the trial
on acceptance or its complement on rejection. The distinguishing gap is the average of the signed
biases of the two fixed predictors. Both are single uniform programs, with no choice depending on
the security parameter. Pr[p] is the probability, in the reals, that the program p returns
true (the scoped notation of Cslib.Probability).
Appending a hard-core predicate to an efficient length-preserving permutation gives a one-bit PRG in the existing finite-family security API. This is conditional on the hard-core predicate; the Goldreich–Levin construction is a separate step in the OWP-to-PRG reduction.
Main definitions #
Cslib.Crypto.HardCore: efficient evaluation and uniform computational unpredictability.Cslib.Crypto.hardCorePredictor: the functional distinguishing-to-prediction reduction.
Main results #
Cslib.Crypto.isPPT_hardCorePredictor: the distinguishing-to-prediction reduction is strict PPT.Cslib.Crypto.hardCore_advantage_le: a concrete average-prediction-bias bound.Cslib.Crypto.HardCore.indistinguishable: replace a hidden predicate by an independent bit.Cslib.Crypto.OneWayPermutation.pseudorandomGenerator_of_hardCore: conditional one-bit PRG.
References #
- S. Arora, B. Barak, Computational Complexity: A Modern Approach, Chapter 9.
- L. Trevisan, CS276 Lecture 13: Pseudorandom Generators, scribed by Siu-On Chan, Theorem 2 and its prediction reduction.
- O. Goldreich, Foundations of Cryptography (Fragments of a Book – Version 2.03),
1998 draft, Theorem 3.4.1, p. 91, which
OneWayPermutation.pseudorandomGenerator_of_hardCorestates withHardCoreas the hard-core predicate.
Adapted from Crypto/Computational/HardCore.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the shared nonnegative game API and tidy machines.
The prediction game at length n: Cslib.Crypto.predictionExperiment for predicate on a
uniform n-bit seed, with the predictor told n and the image f seed.
A plain polynomial-time predicate whose value is computationally hidden by the image function.
This notion is novel to this library. It strengthens [Gol98], Definition 2.5.1,
p. 54, whose predictor receives only f x: here the predictor also receives the seed length n in
unary, as the inverter of OneWay does, and runs in time polynomial in n + |f x|. When n
cannot be computed from f x in polynomial time, that gives the predictor more information and
more time than the source does. Security bounds the absolute bias |Pr[correct] - 1/2|; since the
admitted predictors are closed under negating their output, this is equivalent to the source's
one-sided bound Pr[correct] < 1/2 + 1/p(n).
Relation to standard assumptions. The extra input can only help the predictor, so this notion
implies Definition 2.5.1. The two agree when n in unary can be computed from f x in time
polynomial in |f x|, for example for length-preserving f, which HardCore.pseudorandomGenerator
and OneWayPermutation.pseudorandomGenerator_of_hardCore assume.
Why it is plausible. GoldreichLevin.padded_hardCore derives it from OneWay, for the
inner-product predicate of the padded function.
- polyTime : Turing.MultiTapeTM.ComputableInPolyTime predicate Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBool
Computing the predicate from the seed uses a fixed polynomial-time machine.
- secure : Game.Indistinguishable (fun (adversary : Distinguisher) (n : ℕ) => (predictionGame f predicate adversary n).eval) (fun (x : Distinguisher) (x_1 : ℕ) => Probability.PMF.uniformOfFintype Bool) (Probability.IsPPT Turing.MultiTapeTM.encBool)
A predictor's correctness is indistinguishable from a fair coin.
The shared security property gives negligible absolute prediction bias.
Establish a hard-core predicate from efficient evaluation and negligible prediction bias.
The prediction experiment is a uniform PPT program when its ingredients are efficient.
Use acceptance of an appended trial bit to predict the hidden predicate.
The reduction charges for constructing the extended input and executing the distinguisher.
The distinguishing gap is the average signed bias of two fixed uniform predictors.
Distinguishing the predicate from a fair bit costs at most the average prediction bias.
A hard-core predicate can be replaced by an independent fair bit in every uniform PPT test.
If the image function preserves uniform seeds, the ideal hybrid is uniform at length n+1.
An efficient length-preserving function that preserves uniform seeds gives a one-bit PRG when extended by a hard-core predicate. The later predicate construction uses one-wayness.
Step of the construction of a generator from a one-way permutation: a one-way permutation with a hard-core predicate gives a uniform polynomial-time one-bit PRG.
In statement this is [Gol98], Theorem 3.4.1, p. 91, and
[Gol07c], Proposition 8.9, printed p. 330: if f is a length-preserving one-to-one
one-way function and b a hard-core predicate for f, then G(s) = f(s) b(s) is a pseudorandom
generator, here PseudorandomGenerator (Definition 3.3.2, p. 85). The hypothesis HardCore is
novel to this library: its predictors also receive the seed length in unary. For a
length-preserving f it agrees with the source's Definition 2.5.1, p. 54, as HardCore explains,
but the library does not prove that, so this is a step and not the cited theorem. As in the
source's proof, one-wayness itself is not used: only that f is computable in polynomial time,
preserves lengths and permutes the words of each length.