Documentation

CslibFrontier.Crypto.Computational.Pseudoentropy.OneWay

The pseudoentropy prediction gap from one-wayness #

The executable hashed parity reduction has polynomial loss. One-wayness therefore makes its inversion term negligible, leaving an inverse-polynomial gap between feasible prediction and the entropy threshold. Each predictor supplies one inverter with a fixed precision degree. The argument is stated relative to a fixed advice family: a predictor reading advice gives an inverter reading the same advice, and the advice length costs only a polynomial change of coin budget. The uniform theorems are the empty-advice case.

Main results #

References #

Adapted from Crypto/Computational/Pseudoentropy/OneWay.lean on the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8, using typed saved seeds and nonnegative security games.

A single cubic precision suffices for all sufficiently large dimensions.

theorem Cslib.Crypto.Pseudoentropy.HashPair.eventually_prediction_entropy_le_withAdvice {f : List Bool → List Bool} (hf : Turing.MultiTapeTM.ComputableInPolyTime f Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) {advice : ℕ → List Bool} (hhard : InversionHardWithAdvice f advice) (hadvice : PolynomiallyBounded fun (n : ℕ) => (advice n).length) {Image : ℕ → Type} [∀ (n : ℕ), Finite (Image n)] (finiteFunction : (n : ℕ) → BitString n → Image n) (encodeImage : (n : ℕ) → Image n ↪ List Bool) (hencode : ∀ (n : ℕ) (x : Fin n → Bool), f (List.ofFn x) = (encodeImage n) (finiteFunction n x)) (imageLength : ℕ → ℕ) (hlength : ∀ (n : ℕ) (image : Image n), ((encodeImage n) image).length = imageLength n) (adversary : (ℕ × List Bool) × List Bool → ProbComp Bool) (hPPT : Probability.IsPPTOn encAdvisedInput Turing.MultiTapeTM.encBool adversary) :
∀ᶠ (n : ℕ) in Filter.atTop, 2 * ((predictionGame (sample f) (fun (n : ℕ) (word : List Bool) => adversary ((n, advice n), word)) n).eval true).toReal - 1 ≤ 1 - Probability.PMF.conditionalEntropy (joint (finiteFunction n)) - 1 / ↑(hashCount n)

The prediction gap relative to fixed advice. If inverting f is hard with a polynomially bounded advice family, then every uniform strict PPT word predictor reading the same advice eventually stays below the finite entropy threshold. The hashed-parity reduction turns the predictor into an inverter that passes its advice through; the advice length enters only a polynomial change of the predictor's coin budget.

theorem Cslib.Crypto.Pseudoentropy.HashPair.pair_hasGapWithAdvice {f : List Bool → List Bool} (hf : Turing.MultiTapeTM.ComputableInPolyTime f Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) {advice : ℕ → List Bool} (hhard : InversionHardWithAdvice f advice) (hadvice : PolynomiallyBounded fun (n : ℕ) => (advice n).length) {Image : ℕ → Type} [∀ (n : ℕ), Finite (Image n)] (finiteFunction : (n : ℕ) → BitString n → Image n) (encodeImage : (n : ℕ) → Image n ↪ List Bool) (hencode : ∀ (n : ℕ) (x : Fin n → Bool), f (List.ofFn x) = (encodeImage n) (finiteFunction n x)) (imageLength : ℕ → ℕ) (hlength : ∀ (n : ℕ) (image : Image n), ((encodeImage n) image).length = imageLength n) :
(pair f hf finiteFunction encodeImage hencode).HasGapWithAdvice (fun (n : ℕ) => 1 / ↑(hashCount n)) advice

A function whose inversion is hard with a polynomially bounded advice family, and which has a fixed image width at each parameter, gives a samplable pair whose gap holds against predictors with the same advice. The gap is inverse-linear in the original input length.

theorem Cslib.Crypto.OneWay.exists_pseudoentropyPair {f : List Bool → List Bool} (hf : OneWay f) :
∃ (pair : Pseudoentropy.SamplablePair), pair.HasGap fun (n : ℕ) => 1 / (2 * (↑n + 7))

Every one-way word function yields an exactly samplable pseudoentropy pair with an explicit inverse-polynomial prediction gap. Normalization handles arbitrary original output lengths.

theorem Cslib.Crypto.NonuniformOneWay.exists_pseudoentropyPair {f : List Bool → List Bool} (hf : NonuniformOneWay f) :
∃ (pair : Pseudoentropy.SamplablePair), ∀ (advice : ℕ → List Bool), (PolynomiallyBounded fun (n : ℕ) => (advice n).length) → pair.HasGapWithAdvice (fun (n : ℕ) => 1 / (2 * (↑n + 7))) advice

Every nonuniformly one-way word function yields an exactly samplable pair whose inverse-polynomial prediction gap holds against predictors with every polynomially bounded advice family.