Skip to Content
CSE442TIntroduction to Cryptography (Lecture 13)

CSE442T Introduction to Cryptography (Lecture 13)

Chapter 3: Indistinguishability and Pseudorandomness

Pseudorandom Generator (PRG)

Definition 77.1 (Pseudorandom Generator)

G:{0,1}n→{0,1}l(n)G:\{0,1\}^n\to\{0,1\}^{l(n)} is a pseudorandom generator if the following is true:

  1. GG is efficiently computable.
  2. l(n)>nl(n)> n (expansion)
  3. {x←{0,1}n:G(x)}n≈{u←{0,1}l(n)}\{x\gets \{0,1\}^n:G(x)\}_n\approx \{u\gets \{0,1\}^{l(n)}\}

Definition 78.3 (Hard-core bit (predicate) (HCB))

Hard-core bit (predicate) (HCB): h:{0,1}n→{0,1}h:\{0,1\}^n\to \{0,1\} is a hard-core bit of f:{0,1}n→{0,1}∗f:\{0,1\}^n\to \{0,1\}^* if for every adversary AA,

Pr[x←{0,1}n;y=f(x);A(1n,y)=h(x)]≤12+ϵ(n)Pr[x\gets \{0,1\}^n;y=f(x);A(1^n,y)=h(x)]\leq \frac{1}{2}+\epsilon(n)

Ideas: f:{0,1}n→{0,1}∗f:\{0,1\}^n\to \{0,1\}^* is a one-way function.

Given y=f(x)y=f(x), it is hard to recover xx. A cannot produce all of xx but can know some bits of xx.

h(x)h(x) is just a yes/no question regarding xx.

Example:

In RSA function, we pick p,q∈Πnp,q\in \Pi^n as primes and N=pqN=pq. e←ZN∗e\gets \mathbb{Z}_N^* and f(x)=xemod  Nf(x)=x^e\mod N.

h(x)=xnh(x)=x_n is a HCB of ff. Given RSA assumption.

h(x) is not necessarily one of the bits of x=x1x2⋯xnx=x_1x_2\cdots x_n.

Theorem Any one-way function has a HCB.

A HCB can be produced for any one-way function.

Let f:{0,1}n→{0,1}∗f:\{0,1\}^n\to \{0,1\}^* be a strong one-way function.

Define g:{0,1}2n→{0,1}∗g:\{0,1\}^{2n}\to \{0,1\}^* as g(x,r)=(f(x),r),x∈{0,1}n,r∈{0,1}ng(x,r)=(f(x), r),x\in \{0,1\}^n,r\in \{0,1\}^n. gg is a strong one-way function. (proved in homework)

h(x,r)=⟨x,r⟩=x1r1+x2r2+⋯+xnrnmod  2h(x,r)=\langle x,r\rangle=x_1r_1+ x_2r_2+\cdots + x_nr_n\mod 2

⟨x,1n⟩=x1+x2+⋯+xnmod  2\langle x,1^n\rangle=x_1+x_2+\cdots +x_n\mod 2

⟨x,0n−11⟩=xn\langle x,0^{n-1}1\rangle=x_ n

Ideas of proof:

If A could reliably find ⟨x,1n⟩\langle x,1^n\rangle, with rr being completely random, then it could find xx too often.

Pseudorandom Generator from HCB

  1. G(x)={0,1}n→{0,1}n+1G(x)=\{0,1\}^n\to \{0,1\}^{n+1}
  2. G(x)={0,1}n→{0,1}l(n)G(x)=\{0,1\}^n\to \{0,1\}^{l(n)}

For (1),

Theorem HCB generates PRG

Let f:{0,1}n→{0,1}nf:\{0,1\}^n\to \{0,1\}^n be a one-way permutation (bijective) with a HCB hh. Then G(x)=f(x)∣∣h(x)G(x)=f(x)|| h(x) is a PRG.

Proof:

Efficiently computable: ff is one-way so hh is efficiently computable.

Expansion: n<n+1n<n+1

Pseudorandomness:

We proceed by contradiction.

Suppose {G(Un)}≈{Un+1}\{G(U_n)\}\cancel{\approx} \{U_{n+1}\}. Then there would be a next-bit predictor AA such that for some bit ii.

Pr[x←{0,1}n;t=G(x);A(t1t2⋯ti−1)=ti]≥12+ϵ(n)Pr[x\gets \{0,1\}^n;t=G(x);A(t_1t_2\cdots t_{i-1})=t_i]\geq \frac{1}{2}+\epsilon(n)

Since ff is a bijection, x←Unx\gets U_n and f(x)←Unf(x)\gets U_n.

G(x)=f(x)∣∣h(x)G(x)=f(x)|| h(x)

So AA could not predict tit_i with advantage 12+ϵ(n)\frac{1}{2}+\epsilon(n) given any first nn bits.

Pr[ti=1∣t1t2⋯ti−1]=12Pr[t_i=1|t_1t_2\cdots t_{i-1}]= \frac{1}{2}

So i=n+1i=n+1 the last bit, AA could predict.

Pr[x←{0,1}n;y=f(x);A(y)=h(x)]>12+ϵ(n)Pr[x\gets \{0,1\}^n;y=f(x);A(y)=h(x)]>\frac{1}{2}+\epsilon(n)

This contradicts the HCB definition of hh.

Construction of PRG

G′={0,1}n→{0,1}l(n)G'=\{0,1\}^n\to \{0,1\}^{l(n)}

using PRG G:{0,1}n→{0,1}n+1G:\{0,1\}^n\to \{0,1\}^{n+1}

Let s←{0,1}ns\gets \{0,1\}^n be a random string.

We proceed by the following construction:

G(s)=X1∣∣b1G(s)=X_1||b_1

G(X1)=X2∣∣b2G(X_1)=X_2||b_2

G(X2)=X3∣∣b3G(X_2)=X_3||b_3

⋯\cdots

G(Xl(n)−1)=Xl(n)∣∣bl(n)G(X_{l(n)-1})=X_{l(n)}||b_{l(n)}

G′(s)=b1b2b3⋯bl(n)G'(s)=b_1b_2b_3\cdots b_{l(n)}

We claim G′:{0,1}n→{0,1}l(n)G':\{0,1\}^n\to \{0,1\}^{l(n)} is a PRG.

Corollary: Combining constructions

f:{0,1}n→{0,1}nf:\{0,1\}^n\to \{0,1\}^n is a one-way permutation with a HCB h:{0,1}n→{0,1}h: \{0,1\}^n\to \{0,1\}.

G(s)=h(x)∣∣h(f(x))∣∣h(f2(x))⋯h(fl(n)−1(x))G(s)=h(x)||h(f(x))||h(f^2(x))\cdots h(f^{l(n)-1}(x)) is a PRG. Where fa(x)=f(fa−1(x))f^a(x)=f(f^{a-1}(x)).

Proof:

G′G' is a PRG:

  1. Efficiently computable: since we are computing G′G' by applying GG multiple times (polynomial of l(n)l(n) times).
  2. Expansion: n<l(n)n<l(n).
  3. Pseudorandomness: We proceed by contradiction. Suppose the output is not pseudorandom. Then there exists a distinguisher D\mathcal{D} that can distinguish G′G' from Ul(n)U_{l(n)} with advantage 12+ϵ(n)\frac{1}{2}+\epsilon(n).

Strategy: use hybrid argument to construct distributions.

H0=Ul(n)=u1u2⋯ul(n)H1=u1u2⋯ul(n)−1bl(n)H2=u1u2⋯ul(n)−2bl(n)−1bl(n)⋯Hl(n)=b1b2⋯bl(n)\begin{aligned} H^0&=U_{l(n)}=u_1u_2\cdots u_{l(n)}\\ H^1&=u_1u_2\cdots u_{l(n)-1}b_{l(n)}\\ H^2&=u_1u_2\cdots u_{l(n)-2}b_{l(n)-1}b_{l(n)}\\ &\cdots\\ H^{l(n)}&=b_1b_2\cdots b_{l(n)} \end{aligned}

By the hybrid argument, there exists an ii such that D\mathcal{D} can distinguish HiH^i and Hi+1H^{i+1} 0≤i≤l(n)−10\leq i\leq l(n)-1 by 1p(n)l(n)\frac{1}{p(n)l(n)}

Show that there exists D\mathcal{D} for

{u←Un+1} vs. {x←Un;G(x)=u}\{u\gets U_{n+1}\}\text{ vs. }\{x\gets U_n;G(x)=u\}

with advantage 12+ϵ(n)\frac{1}{2}+\epsilon(n). (contradiction)

Last updated on