Documentation

CslibFrontier.Crypto.Primitives.PRG.NisanWigderson.Queries

The queries of the Nisan–Wigderson reconstruction #

With its random choices fixed, the guess of the Nisan–Wigderson reconstruction (Cslib.Crypto.PRG.NisanWigderson.trialGuess) reads the hard function f only through the output bits at the positions before t.pos. With the seed bits outside the t.pos-th block fixed, output bit j is f at the bits of the seed in the j-th block. Only the at most a of these bits that lie in the t.pos-th block vary with the input, so output bit j takes the values of f at at most 2 ^ a points. These are the queries of the trial (Cslib.Crypto.PRG.NisanWigderson.trialPoints): at most m 2 ^ a points (Cslib.Crypto.PRG.NisanWigderson.length_trialPoints_le), determined by the trial and the design alone, at which f determines the whole guess (Cslib.Crypto.PRG.NisanWigderson.trialGuess_congr). A learner with membership queries can therefore run the reconstruction by querying these points; this is step 4 of the reconstruction algorithm of Carmosino, Impagliazzo, Kabanets and Kolokolova, Section 2.4.

Main definitions #

Main results #

References #

def Cslib.Crypto.PRG.NisanWigderson.trialPoints {ℓ n a m : ℕ} (D : Design ℓ n a m) (t : Trial ℓ m) :
List (Fin n → Bool)

The queries of the trial t: for each position j before t.pos and each assignment to the input bits in D.overlap t.pos j, the input D.restrict j (D.extend t.pos x t.seed) of output bit j, where x carries the assignment on the overlap and false elsewhere. An assignment is listed as the set of overlap positions where it is true, a sublist of the sorted overlap.

theorem Cslib.Crypto.PRG.NisanWigderson.length_trialPoints_le {ℓ n a m : ℕ} (D : Design ℓ n a m) (t : Trial ℓ m) :
(trialPoints D t).length ≤ m * 2 ^ a

Query count. A trial makes at most m 2 ^ a queries: at most 2 ^ a for each of the at most m earlier positions.

theorem Cslib.Crypto.PRG.NisanWigderson.restrict_extend_mem_trialPoints {ℓ n a m : ℕ} (D : Design ℓ n a m) (t : Trial ℓ m) (j : Fin ↑t.pos) (x : Fin n → Bool) :
D.restrict (Fin.castLE ⋯ j) (D.extend t.pos x t.seed) ∈ trialPoints D t

The earlier output bits read only queries. For every input x and every position j before t.pos, the input of output bit j on the seed D.extend t.pos x t.seed is a query of the trial t.

theorem Cslib.Crypto.PRG.NisanWigderson.trialGuess_congr {ℓ n a m : ℕ} (D : Design ℓ n a m) {f f' : (Fin n → Bool) → Bool} {test : (Fin m → Bool) → Bool} {t : Trial ℓ m} (h : ∀ x ∈ trialPoints D t, f x = f' x) :
trialGuess D f test t = trialGuess D f' test t

The guess reads f only at the queries. Two hard functions that agree at the queries of the trial t give the same guess.