Skip to Content
CSE442TIntroduction to Cryptography (Lecture 12)

CSE442T Introduction to Cryptography (Lecture 12)

Chapter 3: Indistinguishability and Pseudorandomness

{Xn}\{X_n\} and {Yn}\{Y_n\} are distinguishable by μ(n)\mu(n) if ∃\exists distinguisher D\mathcal{D}

∣P[x←Xn:D(x)=1]−P[y←Yn:D(y)=1]∣≥μ(n)|P[x\gets X_n:\mathcal{D}(x)=1]-P[y\gets Y_n:\mathcal{D}(y)=1]|\geq \mu(n)
  • If μ(n)≥1p(n)←poly(n)\mu(n)\geq \frac{1}{p(n)}\gets poly(n) for infinitely many n, then {Xn}\{X_n\} and {Yn}\{Y_n\} are distinguishable.
  • Otherwise, indistinguishable (∣diff∣<ϵ(n)|diff|<\epsilon(n))

Property: Closed under efficient procedures.

If MM is any n.u.p.p.t. which can take a ample from tt from Xn,YnX_n,Y_n as input M(Xn)M(X_n)

If {Xn}≈{Yn}\{X_n\}\approx\{Y_n\}, then so are {M(Xn)}≈{M(Yn)}\{M(X_n)\}\approx\{M(Y_n)\}

Proof:

If D\mathcal{D} distinguishes M(Xn)M(X_n) and M(Yn)M(Y_n) by μ(n)\mu(n) then D(M(⋅))\mathcal{D}(M(\cdot)) is also a polynomial-time distinguisher of Xn,YnX_n,Y_n.

Hybrid Lemma

Let Xn0,Xn1,…,XnmX^0_n,X^1_n,\dots,X^m_n are ensembles indexed from 1,..,m1,..,m

If D\mathcal{D} distinguishes Xn0X_n^0 and XnmX_n^m by μ(n)\mu(n), then ∃i,1≤i≤m\exists i,1\leq i\leq m where Xni−1X_{n}^{i-1} and XniX_n^i are distinguished by D\mathcal{D} by μ(n)m\frac{\mu(n)}{m}

Proof: (we use triangle inequality.) Let pi=P[t←Xni:D(t)=1],0≤i≤mp_i=P[t\gets X_n^i:\mathcal{D}(t)=1],0\leq i\leq m. We have ∣p0−pm∣≥m(n)|p_0-p_m|\geq m(n)

Using telescoping tricks:

∣p0−pm∣=∣p0−p1+p1−p2+⋯+pm−1−pm∣≤∣p0−p1∣+∣p1−p2∣+⋯+∣pm−1−pm∣\begin{aligned} |p_0-p_m|&=|p_0-p_1+p_1-p_2+\dots +p_{m-1}-p_m|\\ &\leq |p_0-p_1|+|p_1-p_2|+\dots+|p_{m-1}-p_m|\\ \end{aligned}

If all ∣pi−1−pi∣<μ(n)m,∣p0−pm∣<μn|p_{i-1}-p_i|<\frac{\mu(n)}{m},|p_0-p_m|<\mu_n contradiction.

In applications, only useful if m≤q(n)m\leq q(n) polynomial

If Xn0X^0_n and XnmX^m_n are distinguishable by 1p(n)\frac{1}{p(n)}, then 22 inner “hybrids” are distinguishable 1p(n)q(n)=1poly(n)\frac{1}{p(n)q(n)}=\frac{1}{poly(n)}

Example:

For some Brian in Week 1 and Week 50, a distinguisher D\mathcal{D} outputs 1 if hair is considered “long”.

There is some week i,1≤i≤50i,1\leq i\leq 50 ∣pi−1−pi∣≥0.02|p_{i-1}-p_i|\geq 0.02

By prediction lemma, there is a machine that could

P[b→{0,1};pic←Xi−1+b:A(pic)=b]≥12+0.022=0.51P[b\to \{0,1\};pic\gets X^{i-1+b}:\mathcal{A}(pic)=b]\geq \frac{1}{2}+\frac{0.02}{2}=0.51

Next bit test (NBT)

We say {Xn}\{X_n\} passes the next bit test if ∀i∈{0,1,...,l(n)−1}\forall i\in\{0,1,...,l(n)-1\} on {0,1}l(n)\{0,1\}^{l(n)} and for all adversaries A:P[t←Xn:A(t1,t2,...,ti)=ti+1]≤12+ϵ(n)\mathcal{A}:P[t\gets X_n:\mathcal{A}(t_1,t_2,...,t_i)=t_{i+1}]\leq \frac{1}{2}+\epsilon(n) (given first ii bit, the probability of successfully predicts i+1i+1 th bit is almost random 12\frac{1}{2})

Note that for any A\mathcal{A}, and any ii,

P[t←Ul(n):A(t1,...ti)=ti+1]=12P[t\gets U_{l(n)}:\mathcal{A}(t_1,...t_i)=t_{i+1}]=\frac{1}{2}

If {Xn}≈{Ul(n)}\{X_n\}\approx\{U_{l(n)}\} (pseudorandom), then XnX_n must pass NBT for all ii.

Otherwise ∃A,i\exists \mathcal{A},i where for infinitely many nn,

P[t←Xn:A(t1,t2,...,ti)=ti+1]≤12+ϵ(n)P[t\gets X_n:\mathcal{A}(t_1,t_2,...,t_i)=t_{i+1}]\leq \frac{1}{2}+\epsilon(n)

We can build a distinguisher D\mathcal{D} from A\mathcal{A}.

The converse if True!

The NBT(Next bit test) is complete.

If {Xn}\{X_n\} on {0,1}l(n)\{0,1\}^{l(n)} passes NBT, then it’s pseudorandom.

Ideas of proof

Full proof is on the text.

Our idea is that we want to create Hnl(n)={Xn}H^{l(n)}_n=\{X_n\} and Hn0={Ul(n)}H^0_n=\{U_{l(n)}\}

We construct “random” bit stream:

Hni={x←Xn;u←Ul(n);t=x1x2…xiui+1ui+2…ul(n)}H_n^i=\{x\gets X_n;u\gets U_{l(n)};t=x_1x_2\dots x_i u_{i+1}u_{i+2}\dots u_{l(n)}\}

If {Xn}\{X_n\} were not pseudorandom, there is a DD

∣P[x←Xn:D(x)=1]−P[u←Ul(n):D(u)=1]∣=μ(n)≥1p(n)|P[x\gets X_n:\mathcal{D}(x)=1]-P[u\gets U_{l(n)}:\mathcal{D}(u)=1]|=\mu(n)\geq \frac{1}{p(n)}

By hybrid lemma, there is i,1≤i≤l(n)i,1\leq i\leq l(n) where:

∣P[t←Hi−1:D(t)=1]−P[t←Hi:D(t)=1]∣≥1p(n)l(n)=1poly(n)|P[t\gets H^{i-1}:\mathcal{D}(t)=1]-P[t\gets H^i:\mathcal{D}(t)=1]|\geq \frac{1}{p(n)l(n)}=\frac{1}{poly(n)}

l(n)l(n) is the step we need to take transform XX to XnX^n

Let,

Hi=x1…xiui+1…ul(n)Hi=x1…xixi+1…ul(n)H^i=x_1\dots x_i u_{i+1}\dots u_{l(n)}\\ H^i=x_1\dots x_i x_{i+1}\dots u_{l(n)}

notice that only two bits are distinguished in the procedure.

D\mathcal{D} can distinguish xi+1x_{i+1} from a truly random Ui+1U_{i+1}, knowing the first ii bits xi…xix_i\dots x_i came from x←xnx\gets x_n

So D\mathcal{D} can predict xi+1x_{i+1} from x1…xix_1\dots x_i (contradicting with that XX passes NBT)

Pseudorandom Generator

Suppose G:{0,1}∗→{0,1}∗G:\{0,1\}^*\to\{0,1\}^* is a pseudorandom generator if the following is true:

  1. GG is efficiently computable.
  2. ∣G(x)∣≥∣x∣∀x|G(x)|\geq |x|\forall x (expansion)
  3. {x←Un:G(x)}n\{x\gets U_n:G(x)\}_n is pseudorandom

nn truly random bits →\to n2n^2 pseudorandom bits

PRG exists if and only if one-way function exists

The other part of proof will be your homework, damn.

If one-way function exists, then Pseudorandom Generator exists.

Ideas of proof:

Let f:{0,1}n→{0,1}nf:\{0,1\}^n\to \{0,1\}^n be a strong one-way permutation (bijection).

x←Unx\gets U_n

f(x)∣∣xf(x)||x

Not all bits of xx would be hard to predict.

Hard-core bit: One bit of information about xx which is hard to determine from f(x)f(x). P[success]≤12+ϵ(n)P[\text{success}]\leq \frac{1}{2}+\epsilon(n)

Depends on f(x)f(x)

Last updated on