Skip to Content
CSE442TIntroduction to Cryptography (Lecture 11)

CSE442T Introduction to Cryptography (Lecture 11)

Exam info posted tonight.

Chapter 3: Indistinguishability and pseudo-randomness

Pseudo-randomness

Idea: Efficiently produce many bits

which “appear” truly random.

One-time pad

m{0,1}nm\in\{0,1\}^n

Gen(1n):k{0,1}NGen(1^n):k\gets \{0,1\}^N

Enck(m)=mkEnc_k(m)=m\oplus k

Deck(c)=ckDec_k(c)=c\oplus k

Advantage: Perfectly secret

Disadvantage: Impractical

The goal of pseudo-randomness is to make the algorithm, computationally secure, and practical.

Let {Xn}\{X_n\} be a sequence of distributions over {0,1}l(n)\{0,1\}^{l(n)}, where l(n)l(n) is a polynomial of nn.

“Probability ensemble”

Example:

Let UnU_n be the uniform distribution over {0,1}n\{0,1\}^n

For all x{0,1}nx\in \{0,1\}^n

P[xUn]=12nP[x\gets U_n]=\frac{1}{2^n}

For 1in1\leq i\leq n, P[xi=1]=12P[x_i=1]=\frac{1}{2}

For 1i<jn,P[xi=1 and xj=1]=141\leq i<j\leq n,P[x_i=1 \textup{ and } x_j=1]=\frac{1}{4} (by independence of different bits.)

Let {Xn}n\{X_n\}_n and {Yn}n\{Y_n\}_n be probability ensembles (separate of dist over {0,1}l(n)\{0,1\}^{l(n)})

{Xn}n\{X_n\}_n and {Yn}n\{Y_n\}_n are computationally in-distinguishable if for all non-uniform p.p.t adversary D\mathcal{D} (“distinguishers”)

P[xXn:D(x)=1]P[yYn:D(y)=1]<ϵ(n)|P[x\gets X_n:\mathcal{D}(x)=1]-P[y\gets Y_n:\mathcal{D}(y)=1]|<\epsilon(n)

this basically means that the probability of finding any pattern in the two array is negligible.

If there is a D\mathcal{D} such that

P[xXn:D(x)=1]P[yYn: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)

then D\mathcal{D} is distinguishing with probability μ(n)\mu(n)

If μ(n)1p(n)\mu(n)\geq\frac{1}{p(n)}, then D\mathcal{D} is distinguishing the two     XnYn\implies X_n\cancel{\approx} Y_n

Prediction lemma

Xn0X_n^0 and Xn1X_n^1 ensembles over {0,1}l(n)\{0,1\}^{l(n)}

Suppose \exists distinguisher D\mathcal{D} which distinguish by μ(n)\geq \mu(n). Then \exists adversary A\mathcal{A} such that

P[b{0,1};tXnb]:A(t)=b]12+μ(n)2P[b\gets\{0,1\};t\gets X_n^b]:\mathcal{A}(t)=b]\geq \frac{1}{2}+\frac{\mu(n)}{2}

Proof:

Without loss of generality, suppose

P[tXn1:D(t)=1]P[tXn0:D(t)=1]μ(n)P[t\gets X^1_n:\mathcal{D}(t)=1]-P[t\gets X_n^0:\mathcal{D}(t)=1]\geq \mu(n)

A=D\mathcal{A}=\mathcal{D} (Outputs 1 if and only if DD outputs 1, otherwise 0.)

     P[b{0,1};tXnb:A(t)=b]=P[tXn1;A=1]P[b=1]+P[tXn0;A(t)=0]P[b=0]=12P[tXn1;A(t)=1]+12(1P[tXn0;A(t)=1])=12+12(P[tXn1;A(t)=1]P[tXn0;A(t)=1])12+12μ(n)\begin{aligned} &~~~~~P[b\gets \{0,1\};t\gets X_n^b:\mathcal{A}(t)=b]\\ &=P[t\gets X_n^1;\mathcal{A}=1]\cdot P[b=1]+P[t\gets X_n^0;\mathcal{A}(t)=0]\cdot P[b=0]\\ &=\frac{1}{2}P[t\gets X_n^1;\mathcal{A}(t)=1]+\frac{1}{2}(1-P[t\gets X_n^0;\mathcal{A}(t)=1])\\ &=\frac{1}{2}+\frac{1}{2}(P[t\gets X_n^1;\mathcal{A}(t)=1]-P[t\gets X_n^0;\mathcal{A}(t)=1])\\ &\geq\frac{1}{2}+\frac{1}{2}\mu(n)\\ \end{aligned}

Pseudo-random

{Xn}\{X_n\} over {0,1}l(n)\{0,1\}^{l(n)} is pseudorandom if {Xn}{Ul(n)}\{X_n\}\approx\{U_{l(n)}\}. i.e. indistinguishable from the true randomness.

Example:

Building distinguishers

  1. XnX_n: always outputs 0n0^n, D\mathcal{D}: [outputs 11 if t=0nt=0^n] P[tXn:D(t)=1]P[tUn:D(t)=1]=112n1\vert P[t\gets X_n:\mathcal{D}(t)=1]-P[t\gets U_n:\mathcal{D}(t)=1]\vert=1-\frac{1}{2^n}\approx 1
  2. XnX_n: 1st n1n-1 bits are truly random Un1\gets U_{n-1} nth bit is 11 with probability 0.50001 and 00 with 0.49999, DD: [outputs 11 if Xn=1X_n=1] P[tXn:D(t)=1]P[tUn:D(t)=1]=0.50010.5=0.0010\vert P[t\gets X_n:\mathcal{D}(t)=1]-P[t\gets U_n:\mathcal{D}(t)=1]\vert=0.5001-0.5=0.001\neq 0
  3. XnX_n: For each bit xi{0,1}x_i\gets\{0,1\} unless there have been 1 million 00‘s. in a row. Then outputs 11, DD: [outputs 11 if x1=x2=...=x1000001=0x_1=x_2=...=x_{1000001}=0] P[tXn:D(t)=1]P[tUn:D(t)=1]=01210000010 \vert P[t\gets X_n:\mathcal{D}(t)=1]-P[t\gets U_n:\mathcal{D}(t)=1]\vert=|0-\frac{1}{2^{1000001}}|\neq 0
Last updated on