Post · 7 min read· pp. 556–559

CS276 Lecture 13: Pseudorandom Generators

Scribed by Siu-On Chan

Summary

Today we complete the proof that it is possible to construct a pseudorandom generator from a one-way permutation.

1. Pseudorandom Generators from One-Way Permutations

Last time we proved the Goldreich-Levin theorem.

Theorem 1 (Goldreich and Levin) Let f:{0,1}n→{0,1}n{f: \{ 0,1 \}^n \rightarrow \{ 0,1 \}^n} be a (t,ϵ){(t,\epsilon)}-one way permutation computable in time r≤t{r\leq t}. Then the predicate x,r↦⟨x,r⟩{x,r \mapsto \langle x,r \rangle} is (Ω(t⋅ϵ2⋅n−O(1),3ϵ){(\Omega( t \cdot \epsilon^2 \cdot n^{-O(1)} , 3\epsilon)} hard core for the permutation x,r↦f(x),r{x,r \mapsto f(x),r}.

A way to look at this result is the following: suppose f{f} is (2Ω(n),2−Ω(n)){(2^{\Omega(n)},2^{-\Omega(n)})} one way and computable in nO(1){n^{O(1)}} time. Then ⟨x,r⟩{\langle x,r \rangle} is a (2Ω(n),2−Ω(n)){(2^{\Omega(n)},2^{-\Omega(n)})} hard-core predicate for the permutation x,r→f(x),r{x,r \rightarrow f(x),r}.

From now on, we shall assume that we have a one-way permutation f:{0,1}n→{0,1}n{f: \{ 0,1 \}^n \rightarrow \{ 0,1 \}^n} and a predicate P:{0,1}n→{0,1}{P:\{ 0,1 \}^n \rightarrow \{ 0,1 \}} that is (t,ϵ){(t,\epsilon)} hard core for f{f}.

This already gives us a pseudorandom generator with one-bit expansion.

Theorem 2 (Yao) Let f:{0,1}n→{0,1}n{f:\{ 0,1 \}^n \rightarrow \{ 0,1 \}^n} be a permutation, and suppose P:{0,1}n→{0,1}{P:\{ 0,1 \}^n \rightarrow \{ 0,1 \}} is (t,ϵ){(t,\epsilon)}-hard core for f{f}. Then the mapping

x↦P(x),f(x)\displaystyle x \mapsto P(x),f(x)

is (t−O(1),ϵ){(t-O(1), \epsilon)}-pseudorandom generator mapping n{n} bits into n+1{n+1} bits.

Note that f{f} is required to be a permutation rather than just a function. If f{f} is merely a function, it may always begin with 0 and the overall mapping would not be pseudorandom.

For the special case where the predicate P{P} is given by Goldreich-Levin, the mapping would be

x↦⟨x,r⟩,f(x),r\displaystyle x \mapsto \langle x,r \rangle,f(x),r

Proof: Suppose the mapping is not (t−2,ϵ){(t-2,\epsilon)}-pseudorandom. There is an algorithm D{D} of complexity ≤t−2{\leq t-2} such that

∣Px∼{0,1}n[D(P(x)f(x))=1]−Pb∼{0,1}x∼{0,1}n[D(bf(x))=1]∣>ϵ     (1)\displaystyle \left|\mathop{\mathbb P}_{x\sim\{0,1\}^n} [D(P(x)f(x))=1] - \mathop{\mathop{\mathbb P}_{b\sim\{0,1\}}}_{x\sim\{0,1\}^n} [D(bf(x))=1]\right| > \epsilon \ \ \ \ \ (1)

where we have used the fact that since f{f} is permutation, f(x){f(x)} would be a uniformly random element in {0,1}n{\{0,1\}^n} when x{x} is such.

We will first remove the absolute sign in (1). The new inequality holds for either D{D} or 1−D{1-D} (i.e. the complement of D{D}), and they both have complexity at most t−1{t-1}.

Now define an algorithm A{A} as follows.

On input y=f(x){y=f(x)}, pick a random bit r∼{0,1}{r\sim\{0,1\}}. If D(r,y)=1{D(r,y)=1}, then output r{r}, otherwise output 1−r{1-r}.

Algorithm A{A} has complexity at most t{t}. We claim that

Px∼{0,1}n[A(f(x))=P(x)]>12+ϵ\displaystyle \mathop{\mathbb P}_{x\sim\{0,1\}^n} [A(f(x))=P(x)]> \frac12+\epsilon

so P(⋅){P(\cdot)} is not (t,ϵ){(t,\epsilon)}-hard core.

To make explicit the dependence of A{A} on r{r}, we will denote by Ar(f(x)){A_r(f(x))} the fact that A{A} picks r{r} as its random bit.

To prove the claim, we expand

Px,r[Ar(f(x))=P(x)]=Px,r[Ar(f(x))=P(x)∣r=P(x)]P[r=P(x)]+Px,r[Ar(f(x))=P(x)∣r≠P(x)]P[r≠P(x)]\displaystyle \begin{array}{rcl} \mathop{\mathbb P}_{x,r} [A_r(f(x))=P(x)] &= & \mathop{\mathbb P}_{x,r} [A_r(f(x))=P(x)\mid r=P(x)]\mathop{\mathbb P}[r=P(x)] + \\ && \mathop{\mathbb P}_{x,r} [A_r(f(x))=P(x)\mid r\neq P(x)]\mathop{\mathbb P}[r\neq P(x)] \\ \end{array}

Note that P[r=P(x)]=P[r≠P(x)]=1/2{\mathop{\mathbb P}[r=P(x)]=\mathop{\mathbb P}[r\neq P(x)]=1/2} no matter what P(x){P(x)} is. The above probability thus becomes

12Px,r[D(rf(x))=1∣r=P(x)]+12Px,r[D(rf(x))=0∣r≠P(x)]     (2)\displaystyle \frac12 \mathop{\mathbb P}_{x,r} [D(rf(x))=1\mid r=P(x)] + \frac12 \mathop{\mathbb P}_{x,r} [D(rf(x))=0\mid r\neq P(x) ] \ \ \ \ \ (2)

The second term is just 12−12Px,r[D(rf(x))=1∣r≠P(x)]{\frac12 - \frac12 \mathop{\mathbb P}_{x,r} [D(rf(x))=1\mid r\neq P(x) ]}. Now we add to and subtract from (2) the quantity 12Px,r[D(rf(x))=1∣r=P(x)]{\frac12 \mathop{\mathbb P}_{x,r} [D(rf(x))=1\mid r=P(x) ]}, getting

12+Px,r[D(rf(x))=1∣r=P(x)]−\displaystyle \frac12 + \mathop{\mathbb P}_{x,r} [D(rf(x))=1\mid r=P(x)] -

(12P[D(rf(x))=1∣r=P(x)]+\displaystyle \left(\frac12 \mathop{\mathbb P}[D(rf(x))=1\mid r=P(x)] + \right.

12P[D(rf(x))=1∣r≠P(x)])\displaystyle \left.\frac12 \mathop{\mathbb P}[D(rf(x))=1\mid r\neq P(x)]\right)

The expression in the bracket is P[D(rf(x))=1]{\mathop{\mathbb P}[D(rf(x))=1]}, and by our assumption on D{D}, the whole expression is more than 12+ϵ{\frac12 + \epsilon}, as claimed. □\Box

The main idea of the proof is to convert something that distinguishes (i.e. D{D}) to something that outputs (i.e. A{A}). D{D} helps us distinguish good answers and bad answers.

We will amplify the expansion of the generator by the following idea: from an n{n}-bit input, we run the generator to obtain n+1{n+1} pseudorandom bits. We output one of those n+1{n+1} bits and feed the other n{n} back into the generator, and so on. Specialized to the above construction, and repeated k{k} times the mapping becomes

Gk(x):=P(x),P(f(x)),P(f(f(x)),…,P(f(k−1)(x),f(k)(x)     (3)\displaystyle G_k (x) := P(x), P(f(x)), P(f(f(x)), \ldots, P(f^{(k-1)} (x), f^{(k)} (x) \ \ \ \ \ (3)

This corresponds to the following diagram where all output bits lie at the bottom.

 (image unavailable)

Theorem 3 (Blum-Micali) Let f:{0,1}n→{0,1}n{f:\{ 0,1 \}^n \rightarrow \{ 0,1 \}^n} be a permutation, and suppose P:{0,1}n→{0,1}{P:\{ 0,1 \}^n \rightarrow \{ 0,1 \}} is (t,ϵ){(t,\epsilon)}-hard core for f{f} and that f,P{f,P} are computable with complexity r{r}.

Then Gk:{0,1}n→{0,1}n+k{G_k : \{ 0,1 \}^n \rightarrow \{ 0,1 \}^{n+k}} as defined in (3) is (t−O(rk),ϵk){(t-O(rk), \epsilon k)}-pseudorandom.

Proof: Suppose Gk{G_k} is not (t−O(rk),ϵk){(t-O(rk),\epsilon k)}-pseudorandom. Then there is an algorithm D{D} of complexity at most t−O(rk){t-O(rk)} such that

∣Px∼{0,1}n[D(Gk(x))=1]−Pz∼{0,1}n+k[D(z)=1]∣>ϵk\displaystyle \left| \mathop{\mathbb P}_{x\sim\{0,1\}^n} [D(G_k(x))=1]-\mathop{\mathbb P}_{z\sim\{0,1\}^{n+k}} [D(z)=1] \right| > \epsilon k

We will then use the hybrid argument. We will define a sequence of distributions H0,…,Hk{H_0,\dots,H_k}, the first is Gk{G_k}‘s output, the last is uniformly random bits, and every two adjacent ones differ only in one invocation of G{G}.

 (image unavailable)

More specifically, define Hi{H_i} to be the distribution where we intercept the output of the first i{i} copies of G{G}‘s, replace them with random bits, and run the rest of Gk{G_k} as usual (see the above figure in which blue lines represent intercepted outputs). Then H0{H_0} is just the distribution of the output of Gk{G_k}, and Hk{H_k} is the uniform distribution, as desired. Now

ϵk<∣Pz∼H0[D(z)=1]−Pz∼Hk[D(z)=1]∣=∣∑i=0k−1(Pz∼Hi[D(z)=1]−Pz∼Hi+1[D(z)=1])∣\displaystyle \begin{array}{rcl} \epsilon k &< & \left|\mathop{\mathbb P}_{z\sim H_0} [D(z)=1]-\mathop{\mathbb P}_{z\sim H_k} [D(z)=1]\right| \\ &= & \left|\sum_{i=0}^{k-1}\left(\mathop{\mathbb P}_{z\sim H_i} [D(z)=1]-\mathop{\mathbb P}_{z\sim H_{i+1}} [D(z)=1] \right) \right| \end{array}

So there is an i{i} such that

∣Pz∼Hi[D(z)=1]−Pz∼Hi+1[D(z)=1]∣>ϵ\displaystyle \left|\mathop{\mathbb P}_{z\sim H_i} [D(z)=1]-\mathop{\mathbb P}_{z\sim H_{i+1}}[D(z)=1]\right| > \epsilon

In both Hi{H_i} and Hi+1{H_{i+1}}, the first i{i} bits r1,…,ri{r_1,\dots,r_i} are random. We now define a new algorithm D′{D'} that takes as input b,y{b,y} and has output distribution Hi{H_i} or Hi+1{H_{i+1}} in two special cases: if b,y{b,y} are drawn from P(x),f(x){P(x),f(x)}, then D′{D'} has output distribution Hi{H_i}; if b,y{b,y} are drawn from (random bit),f(x){f(x)}, then D′{D'} has output distribution Hi+1{H_{i+1}}. In other words, if b,y{b,y} are P(x),f(x){P(x),f(x)}, D′{D'} should output

r1,…,ri,P(x),P(f(x)),…,P(f(k−i−1)(x)),f(k−i)(x)\displaystyle r_1,\dots,r_i,P(x),P(f(x)),\dots,P(f^{(k-i-1)}(x)),f^{(k-i)}(x)

If b,y{b,y} are (random bit),f(x){f(x)}, D′{D'} should output

r1,…,ri,ri+1,P(f(x)),…,P(f(k−i−1)(x)),f(k−i)(x)\displaystyle r_1,\dots,r_i,r_{i+1},P(f(x)),\dots,P(f^{(k-i-1)}(x)),f^{(k-i)}(x)

This suggests that D′{D'} on input b,y{b,y} should pick random bits r1,…,ri{r_1,\dots,r_i} and output r1,…,ri,b,P(y),…,P(f(k−i−2)(y)),f(k−i−1)(y){r_1,\dots,r_i,b,P(y),\dots,P(f^{(k-i-2)}(y)),f^{(k-i-1)}(y)}.

We have

∣Px∼{0,1}n[D′(P(x)f(x))=1]−Pz∼{0,1}n+1[D′(z)=1]∣=∣Px∼Hi[D′(x)=1]−Px∼Hi+1[D′(x)=1]∣>ϵ\displaystyle \begin{array}{rcl} & & \left| \mathop{\mathbb P}_{x\sim\{0,1\}^n}[D'(P(x)f(x))=1]-\mathop{\mathbb P}_{z\sim\{0,1\}^{n+1}}[D'(z)=1] \right| \\ &= & \left| \mathop{\mathbb P}_{x\sim H_i} [D'(x)=1] - \mathop{\mathbb P}_{x\sim H_{i+1}} [D'(x)=1] \right| \\ &> & \epsilon \end{array}

and P(⋅){P(\cdot)} is not (t,ϵ){(t,\epsilon)}-hard core. □\Box

Thinking about the following problem is a good preparation for the proof the main result of the next lecture.

Exercise 1 (Tree Composition of Generators) Let G:{0,1}n→{0,1}2n{G:\{ 0,1 \}^n \rightarrow \{ 0,1 \}^{2n}} be a (t,ϵ){(t,\epsilon)} pseudorandom generator computable in time r{r}, let G0(x){G_0(x)} be the first n{n} bits of the output of G(x){G(x)}, and let G1(x){G_1(x)} be the last n{n} bits of the output of G(x){G(x)}.

*Define G′:{0,1}n→{0,1}4n{G' : \{ 0,1 \}^n \rightarrow \{ 0,1 \}^{4n}} as

G′(x)=G(G0(x)),G(G1(x))\displaystyle G' (x) = G(G_0(x)), G( G_1 (x))
*

Prove that G′{G'} is a (t−O(r),3ϵ){(t-O(r),3\epsilon)} pseudorandom generator.