Docsity

Noncryptographic Pseudorandom Generators from Average-Case Hardness, Study notes of Number Theory

Toggle sidebar
bg1
CS225: Pseudorandomness Prof. Salil Vadhan
Lecture 18: PRGs from Average-Case Hardness
April 12, 2007 Scribe: David Woodruff, David Troiano, and Denis Chebikin
1 Noncryptographic Pseudorandom Generators Generators
Last time, Dan Gutfreund surveyed cryptographic pseudorandom generators, which numerous ap-
plications within and outside cryptography, including to derandomizing BPP. However, for de-
randomization, we can use generators with weaker properties. Specifically, we only need G:
{0,1}`(n)→ {0,1}nsuch that:
1. Gfools nonuniform distinguishers running in time n(as opposed to all probabilistic polynomial-
time distinguishers).
2. Gis computable in time poly(n, 2`). In particular, the PRG may take more time than the
distinguishers it is trying to fool.
Such a generator implies that every BPP algorithm can be derandomized in time poly(n, 2`(n)).
The benefit of studying such generators is that we can hope to construct them under weaker
assumptions than used cryptographic generators. In particular, a generator with the properties
above no longer implies P6=NP, much less the existence of one-way functions. Testing whether
a string is an output of the generator is still an NP search problem, but even if we guess the seed
properly, testing may take more time than the distinguishers are allowed. However, as you will
show on Problem Set 6, such generators still imply nonuniform circuit lower bounds for exponential
time, something that is still beyond the state of the art in complexity theory. Our goal in the next
couple of lectures is to construct generators as above from assumptions that are as weak as possible.
2 Next-bit Unpredictability
In analyzing the pseudorandom generators that we construct, it will be useful to work with a
reformulation of the pseudorandomness property, which says that, given a prefix of the output, it
should be hard to predict the next bit.
For notational convenience, we deviate from our usual conventions use Xto refer to an r.v. on
{0,1}nwhich is part of an ensemble, and we use Xifor some i∈[n] = {1,...,n}to denote the ith
bit of X. We have:
Definition 1 Let X=X(n)be a random variable distributed on {0,1}n. For functions t:N→N
and ε:N→[0,1], we say that Xis (t, ε)next-bit unpredictable if for every nonuniform
probabilistic algorithm Prunning in time t(n)and every i∈[n], we have:
Pr [P(X1X2···Xi−1) = Xi]≤1
2+(n),
1
pf3
pf4
pf5

Partial preview of the text

Download Noncryptographic Pseudorandom Generators from Average-Case Hardness and more Study notes Number Theory in PDF only on Docsity!

CS225: Pseudorandomness Prof. Salil Vadhan

Lecture 18: PRGs from Average-Case Hardness

April 12, 2007 Scribe: David Woodruff, David Troiano, and Denis Chebikin

1 Noncryptographic Pseudorandom Generators Generators

Last time, Dan Gutfreund surveyed cryptographic pseudorandom generators, which numerous ap- plications within and outside cryptography, including to derandomizing BPP. However, for de- randomization, we can use generators with weaker properties. Specifically, we only need G : { 0 , 1 }`(n)^ → { 0 , 1 }n^ such that:

  1. G fools nonuniform distinguishers running in time n (as opposed to all probabilistic polynomial- time distinguishers).
  2. G is computable in time poly(n, 2 `). In particular, the PRG may take more time than the distinguishers it is trying to fool.

Such a generator implies that every BPP algorithm can be derandomized in time poly(n, 2 `(n)).

The benefit of studying such generators is that we can hope to construct them under weaker assumptions than used cryptographic generators. In particular, a generator with the properties above no longer implies P 6 = NP, much less the existence of one-way functions. Testing whether a string is an output of the generator is still an NP search problem, but even if we guess the seed properly, testing may take more time than the distinguishers are allowed. However, as you will show on Problem Set 6, such generators still imply nonuniform circuit lower bounds for exponential time, something that is still beyond the state of the art in complexity theory. Our goal in the next couple of lectures is to construct generators as above from assumptions that are as weak as possible.

2 Next-bit Unpredictability

In analyzing the pseudorandom generators that we construct, it will be useful to work with a reformulation of the pseudorandomness property, which says that, given a prefix of the output, it should be hard to predict the next bit.

For notational convenience, we deviate from our usual conventions use X to refer to an r.v. on { 0 , 1 }n^ which is part of an ensemble, and we use Xi for some i ∈ [n] = { 1 ,... , n} to denote the ith bit of X. We have:

Definition 1 Let X = X(n)^ be a random variable distributed on { 0 , 1 }n. For functions t : N → N and ε : N → [0, 1], we say that X is (t, ε) next-bit unpredictable if for every nonuniform probabilistic algorithm P running in time t(n) and every i ∈ [n], we have:

Pr [P (X 1 X 2 · · · Xi− 1 ) = Xi] ≤

  • (n),

where the probability is taken over X and the coin tosses of P.

Note that the uniform distribution X ≡ Un is (t, 0) next-bit unpredictable for every t. Intuitively, if X is pseudorandom, it must be next-bit unpredictable, as this is just one specific test one can perform on X. In fact the converse also holds, and this is the direction we will use.

Theorem 2 Let X be a random variable distributed on { 0 , 1 }n. If X is a (t, ε) pseudorandom, then X is (t − O(1), ε) next-bit unpredictable. Conversely, if X is (t, ε) next-bit unpredictable, then it is (t, n · ε) pseudorandom.

Proof: Here U denotes an r.v. uniformly distributed on { 0 , 1 }n^ and Ui denotes the i’th bit of U.

X pseudorandom ⇒ X next-bit unpredictable. The proof is by reduction. Suppose for contradic- tion that X is not (t − O(n), ε) next-bit unpredictable, so we have a predictor P : { 0 , 1 }i−^1 → { 0 , 1 } that succeeds with probability at least 1/2 + ε. We construct an algorithm T : { 0 , 1 }n^ → { 0 , 1 } that distinguishes X from Un as follows:

X next-bit unpredictable ⇒ X pseudorandom. Also by reduction. Suppose X is not pseudo- random, so we have a nonuniform algorithm T running in time t s.t.

Pr[T (X) = 1] − Pr[T (U ) = 1] > ,

where we have dropped the absolute values without loss of generality as in lecture 16.

We now use a hybrid argument. Define Hi = X 1 ◦ X 2 ◦ · · · ◦ Xi ◦ Ui+1 ◦ Ui+2 ◦ · · · ◦ Un. Then Hn = X and H 0 = U. We have:

∑^ n

i=

(Pr[T (Hi) = 1] − Pr[T (Hi− 1 ) = 1]) > ε,

since the sum telescopes. Thus, there must exist an i such that

Pr[T (Hi) = 1] − Pr[T (Hi− 1 ) = 1] > /n.

This says that T is more likely to output 1 when we put Xi in the i’th bit than when we put a random bit Ui. We can view Ui as being Xi with probability 1/2 and being Xi with probability 1/2. The only advantage T has must be coming from the latter case, because in the former case, the two distributions are identical. Formally,

Pr[T (X 1 · · · Xi− 1 XiUi+1 · · · Un) = 1]+1−Pr[T (X 1 · · · Xi− 1 XiUi+1 · · · Un) = 1] = 2·(Pr[T (Hi) = 1] − Pr[T (Hi− 1 )

This motivates the following next-bit predictor:

P (x 1 x 2 · · · xi− 1 ):

when we say that a function is easy, we mean that there is an algorithm that does well on all input lengths . The above definition is thus stronger than the usual definition of ‘easiness’. If we only have a function f that is not easy, this means that it is hard for infinitely values of, and thus we will only be able to use it to construct generators Gn that are pseudorandom for infinitely many values of n (which in turn will lead to a deterministic simulation of BPP that works correctly for infinitely many input lengths n).

Note that when α = 0 and we consider deterministic algorithms A, then the above definition says that f is hard in the worst case. A definition of worst-case hardness for probabilistic algorithms will be given next time.

Today we consider α = 12 − (), where () = 1/t(). That is, no efficient algorithm can compute f much better than random guessing. A typical setting of parameters we use is t() somewhere in range from ω(1)^ (slightly superpolynomial) to t() = 2δ^ for a constant δ > 0. (Note that every function is computable by a nonuniform algorithm running in time roughly 2, so we cannot take t() to be any larger.) We will also require f is computable in (uniform) time 2O()^ so that our pseudorandom generator will be computable in time exponential in its seed length. The existence of such an average-case hard function does seem to be quite a strong assumption, but next time we will see how to relax it to a worst-case hardness assumption.

Now we show how to obtain a pseudorandom generator from average-case hardness.

Proposition 4 If f : { 0 , 1 }`^ → { 0 , 1 } is (t, 1 / 2 − ε) average-case hard, then G(x) = x ◦ f (x) is a (t, ε) pseudorandom generator.

Proof: This follows from the equivalence of pseudorandomness and next-bit unpredictability. Considering uniformly random seed X, we certainly can’t predict the first bits with any advantage whatsoever, so the only hope is to predict f (x) from x, but f is ( 12 −)-hard. A black-box application of Theorem 2 would lose a factor of + 1 in the advantage ε, but we do not need to pay it here because the first bits are perfectly uniform. (Following the proof of Theorem 2, we would have Pr[T (Hi) = 1] − Pr[T (Hi− 1 ) = 1] = 0 for i = 1,... ,.)

Note that this generator includes its seed in its output. This is impossible for cryptographic pseudorandom generators, but is feasible (as shown above) when the generator can have more resources than the distinguishers it is trying to fool.

Of course, this generator is quite weak, stretching by only one bit. We would like to get many bits out. Here are two attempts:

  • Define G(x 1 · · · xk) = x 1 · · · xkf (x 1 ) · · · f (xk). This is a (t, kε) pseudorandom generator be- cause we have k independent samples of a pseudorandom distribution so nonuniform computa- tional indistinguishability is preserved. Note that already here we are relying on nonuniform indistinguishability, because the distribution (U, f (U)) is not samplable (in time that is feasible for the distinguishers).
  • Use composition. For example, try to get two bits out using the same seed length by defining G′(x) = G(G(x) 1 · · · G(x))G(x). This works for cryptographic pseudorandom generators, but not for the generators we are considering here. Why not?

4 The Nisan–Wigderson Generator

Our goal now is to show the following: Given f ∈ E = DTIME(2O()) 1 that is ( 12 − (^) t(^1) )-hard

for nonuniform time t(), construct an (n, 1 /n) pseudorandom generator G : { 0 , 1 }O()^ → { 0 , 1 }n with n = t()δ^ for constant δ > 0. (This is analogous to the parameters achieved for constructing pseudorandom generators from one-way permutations, as surveyed last time, but we are now using a weaker assumption.) Actually the generator we construct will have a slightly worse seed length than O().

The idea is to apply f on slightly dependent inputs, i.e. xi and xj share very few bits. The sets of seed bits used for each output bit will be given by a design, as on Problem Set 2:

Definition 5 S 1 , · · · , Sm ⊆ [d] is an (`, a)-design if

  1. ∀i, |Si| = `
  2. ∀i 6 = j, |Si ∩ Sj | ≤ a

We want lots of sets having small intersections over a small universe.

Lemma 6 For every constant γ > 0 and every , m ∈ N, there exists an (, a)-design S 1 , · · · , Sm ⊆

[d] with d = O

`^2 a

and a = γ · log m. Such a design can be constructed deterministically in time

poly(m, d).

This follows from the results on Problem Set 2. There you did the calculation for γ = 1 and m = 2` for constant  > 0. For this case, the lemma gives d = O

^2 

= O(`), matching what you showed.

Given an (, a)-design S 1 , · · · , Sm ⊆ [d] and average-case hard f : { 0 , 1 }^ → { 0 , 1 }, define G : { 0 , 1 }d^ → { 0 , 1 }m^ as G(x) = f (x|S 1 )f (x|S 2 ) · · · f (x|Sm )

where if x is a string in { 0 , 1 }d^ and S ⊆ [d], |S| = , x|S is the string of length obtained from x by selecting the bits indexed by S.

Theorem 7 Suppose that f : { 0 , 1 }^ → { 0 , 1 } is ( 12 − (^1) t )-hard for nonuniform time t, and S 1 , · · · , Sm ⊆ [d] is an (, a)-design with m = t^1 /^3 and a = 13 · log t, then G : { 0 , 1 }d^ → { 0 , 1 }m^ is an (m, 1 /m) pseudorandom generator.

By construction of the design, the seed length is d = O

`^2 / log t

, which is slightly worse than our original aim of d = O(), but we do achieve our aim for the important case when t() = 2Ω(`). (We have seen earlier that this exponential hardness corresponds to what is needed to show BPP = P case.)

Proof: Suppose G is not an (m, ε) pseudorandom generator for ε = 1/m. By Theorem 2, there is a nonuniform time m next-bit predictor P such that

Pr[P (f (X|S 1 )f (X|S 2 ) · · · f (X|Si− 1 )) = f (X|Si )] >

ε m

(^1) E should be contrasted with the larger class EXP = DTIME(2poly(`))

Theorem 9 For all constants d, the function Par: { 0 , 1 }^ → { 0 , 1 } defined by Par(x 1 ,... , x) = ⊕i=1 xi^ is^ (t,^1 /^2 −^1 /t)-average-case hard for depth^ d^ circuits of size^ t^ = 2 Ω(^1 /d).

Lemma 10 Every function g : { 0 , 1 }a^ → { 0 , 1 } can be computed by a depth 2 circuit of size 2 a.

The following theorem by Nisan uses the two facts above.

Theorem 11 For every constant d and every m, there exists a poly(m)-time computable (m, 1 /m)- pseudorandom generator Gm : { 0 , 1 }log O(d) (^) m → { 0 , 1 }m^ fooling depth d circuits (of size m).

Proof: Put d′^ = d + 10. Choose such that m = 2Ω( 1 /d′^ )

. Let G be the Nisan-Wigderson

generator for f = Parand t() = m^3 = 2Ω(` 1 /d′^ )

. Set a = log m. Then the seed length of G is O(^2 /a) < O(^2 ) = O(logd ′ m)^2 = logO(d ′) m.

We now follow the steps of the proof of Theorem 7 to go from an adversary T breaking the pseudorandomness of G to a circuit A calculating the parity function Par`.

If T has depth d, then the corresponding next-bit predictor P has depth dP = d + c for some small constant c. Recall that, in the proof of Theorem 7, we obtain A from P by A(y) = P (f 1 (y)f 2 (y) · · · fi− 1 (y)) for some i ∈ { 1 ,... , m} and where each fi depends on at most a bits of y. Now we observe that A can be computed by a small constant-depth circuit (if P can). Specif- ically, applying Lemma 10 to each fi, the size of A is at most O(m · 2 a) = O(m^2 ) plus the size of P and the depth of A is at most dP + 2. This contradicts the hardness of Par` (Theorem 9).

We define BPAC 0 as the class of uniform languages decided by probabilistic constant depth circuits of polynomial size, where uniformity means that there is a polynomial time algorithm M such that M (1n) = Cn is the circuits of inputs of length n.

Corollary 12 BPAC 0 ⊆ P˜.

With more work, this can be strengthened to actually put BPAC 0 in AC˜ 0. (The difficulty is that we use majority voting in the derandomization, but small constant-depth circuits cannot compute majority. However, they can compute an “approximate” majority, and this suffices.)

While BPAC 0 may not seem a very natural class of randomized algorithms, on Problem Set 6, you will see how to use the above PRG to derandomize one of the actual randomized algorithms we have seen (namely the approximate DNF-counting algorithm).