Documentation

CslibFrontier.Crypto.Computational.Pseudoentropy.ThreeSource.Amplification

Amplifying the entropy-grid candidates #

Each padded candidate is iterated until its output is one bit longer than all the candidates' independent seeds together. The uniformly randomized stretching reduction preserves the secure choice, with polynomial loss. This prepares XOR combination without computing that choice.

Main definitions #

Main results #

References #

We follow Thomas Holenstein, Pseudorandom Generators from One-Way Functions: A Simple Construction for Any Hardness, TCC 2006, Section 5, final proof of Theorem 1, [Hol06].

Adapted from the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8.

def Cslib.Crypto.Pseudoentropy.EntropyGrid.amplifiedGenerate (n sourceBits observationBound densityBound commonBits index : ℕ) (evaluate : List Bool → List Bool × Bool) (seed : List Bool) :

Amplify one candidate enough to pay for all candidates' independent seeds.

The entire amplified family is uniformly efficient, including on malformed seed inputs.

theorem Cslib.Crypto.Pseudoentropy.EntropyGrid.length_amplifiedGenerate {pair : SamplablePair} (saved : pair.SeedRealization) (n observationBound densityBound commonBits index : ℕ) (hfits : ∀ observation ∈ (PMF.map Prod.fst (pair.joint n)).support, ((pair.encode n) observation).length ≤ observationBound) (hcommon : seedLength n (saved.length n) observationBound densityBound index ≤ commonBits) {seed : List Bool} (hseed : seed.length = commonBits) :
(amplifiedGenerate n (saved.length n) observationBound densityBound commonBits index (saved.evaluate n) seed).length = size (saved.length n) densityBound * commonBits + 1

Every enumerated candidate outputs one more bit than the total seed cost of the grid.

theorem Cslib.Crypto.Pseudoentropy.EntropyGrid.exists_secure_amplified_choice_withAdvice {pair : SamplablePair} {gap : ℕ → ℝ} {advice : ℕ → List Bool} (hpair : pair.HasGapWithAdvice gap advice) (saved : pair.SeedRealization) {observationBound densityBound common : ℕ → ℕ} (bounds : PaddingBounds saved observationBound densityBound common) (hgap : ∀ᶠ (n : ℕ) in Filter.atTop, 4 / ↑(Probability.dyadicSize (densityBound n)) ≤ gap n) :
∃ (choose : ℕ → ℕ), (∀ᶠ (n : ℕ) in Filter.atTop, choose n < size (saved.length n) (densityBound n)) ∧ IndistinguishableWithAdvice (fun (n : ℕ) => (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encUnary) (advice n, choose n)) (fun (n : ℕ) => PMF.map (amplifiedGenerate n (saved.length n) (observationBound n) (densityBound n) (common n) (choose n) (saved.evaluate n)) (BitString.uniformList (common n))) fun (n : ℕ) => BitString.uniformList (size (saved.length n) (densityBound n) * common n + 1)

Amplification preserves one secure choice relative to fixed advice: the amplified candidate is indistinguishable from uniform for tests that read both the advice and the candidate index.