Documentation

CslibFrontier.Crypto.Computational.HardCore.NoUniversal

No universal hard-core predicate #

A polynomial-time predicate b is a universal hard-core predicate if it is a hard-core of every one-way function. If one-way functions exist, no such predicate exists Goldreich, Exercise 7.8 (Cslib.Crypto.OneWay.not_exists_universal_hardCore).

The proof follows the guideline of the exercise. For a candidate b and a one-way function f, the function f'(x) = (f(x), b(x)) (Cslib.Crypto.appendPredicate, the pair written as f x followed by the bit b x) is still one-way: an inverter for f guesses the missing bit and runs an inverter for f', losing at most a factor two (Cslib.Crypto.succProbability_inversionGame_appendPredicate_le). But b is not a hard-core of f': reading the last bit of the image predicts b x with certainty (Cslib.Crypto.not_hardCore_appendPredicate). The predictor ignores the length parameter, so it also refutes Goldreich's Definition 7.6, whose predictor receives only f'(x) (Cslib.Crypto.OneWay.exists_oneWay_lastBit_eq).

Main definitions #

Main results #

References #

The function f'(x) = (f(x), b(x)) of the guideline to [Goldreich, Exercise 7.8]: the image of f followed by the bit b x. Since the appended part is a single bit, this concatenation encodes the pair.

noncomputable def Cslib.Crypto.guessBitInverter (adversary : Inverter) :

An inverter for f from an inverter for appendPredicate f b: guess the appended bit uniformly and run the given inverter on the extended image.

Inversion reduction. Guessing the appended bit loses at most a factor two: the guess is right with probability one half, and then the extended image is distributed exactly as in the game for appendPredicate f b, whose preimages are preimages for f.

Appending a polynomial-time bit preserves one-wayness. If f is one-way and b is computable in polynomial time, then f'(x) = (f(x), b(x)) is one-way.

Reading the last bit, with default false, is computable in polynomial time.

The predictor that outputs the last bit of the image and ignores the length parameter.

The last-bit predictor always predicts b from appendPredicate f b.

b is not a hard-core of f'(x) = (f(x), b(x)): the last bit of the image is b x. The witness predictor ignores the length parameter, so b is also not a hard-core of f' in the sense of Goldreich, Definition 7.6, whose predictor receives only f'(x).

Goldreich, Exercise 7.8: no universal hard-core predicate, in the source's terms. If a one-way function exists, then for every polynomial-time predicate b some one-way function g (OneWay, Definition 7.1) has b x as the last bit of g x. The last bit is computed from g x alone by a deterministic polynomial-time algorithm (Cslib.Crypto.computableInPolyTime_getLastD), which therefore guesses b x from g x with probability one. So b is not a hard-core of g in the sense of Definition 7.6, where the predictor receives only g x and must have success below 1/2 + 1/p(n). The library's HardCore also gives the predictor n; Cslib.Crypto.OneWay.not_exists_universal_hardCore states the conclusion for it.

theorem Cslib.Crypto.OneWay.not_exists_universal_hardCore {f : List Bool → List Bool} (hf : OneWay f) :
¬∃ (b : List Bool → Bool), ∀ (g : List Bool → List Bool), OneWay g → HardCore g b

No universal predicate for the library's HardCore. If a one-way function exists, then no predicate b is a hard-core (HardCore) of every one-way function (OneWay). For polynomial-time b the witness is f'(x) = (f(x), b(x)) (Cslib.Crypto.OneWay.appendPredicate, Cslib.Crypto.not_hardCore_appendPredicate); HardCore includes polynomial-time computability of b. HardCore gives its predictors the length n as well, so it is stronger than Definition 7.6 and this conclusion is formally weaker than the source's. The constructive theorem Cslib.Crypto.OneWay.exists_oneWay_lastBit_eq matches Goldreich's exercise.