Docsity

Problem Set 3 for CS 120/CSCI: Introduction to Cryptography, Exercises of Cryptography and System Security

Toggle sidebar
bg1
CS 120/CSCI E-177: Introduction to Cryptography
Problem Set 3
Assigned: Oct. 12, 2006 Due: Oct. 18, 2006 (1:10 PM)
Justify all of your answers. See the syllabus for collaboration and lateness policies. You can submit
by email to ciocan@eecs (please include source files) or by hardcopy Carol Harlow in MD 343.
Problem 1. (Breaking Some Stream Ciphers)
1. Define G(x) = y0. . . yn, where x=x0· · · xn−1,y0=x0,yi=xi−1⊕ximod nfor i= 1, . . . , n.
Show that Gis not a pseudorandom generator. Also show that the encryption scheme based
on G, where Ek(m) = m⊕G(k), is not computationally secure (i.e. does not have computa-
tionally indistinguishable encryptions).
In the remainder of the problem, you will generalize the above to any pseudorandom generator
for which each bit of output depends on at most two bits of the seed. That is, for every nand
every i∈ {1, . . . , `(n)}(where `is the expansion function of G), there exist j, k ∈ {1, . . . , n}and a
function fsuch that G(x)i=f(xj, xk) for all x∈ {0,1}n. (In contrast, a remarkable result from
2004 shows how to convert essentially any pseudorandom generator into one where every output
bit depends on only four bits of the seed.)
2. Show that if Gis a pseudorandom generator such that each bit of the output depends on
at most two bits of the seed, then in fact each bit of the output is equal to either some bit
of the seed, the complement of some bit of the seed, the xor of two bits of the seed, or the
complement of the xor of two bits of the seed. That is, the functions f(xj, xk) must be one
of xj,¬xj,xk,¬xk,xj⊕xk, or ¬(xj⊕xk). (Hint: what property do all 2-bit functions other
than these have?)
3. Show that there does not exist a pseudorandom generator such that each bit of the output
depends on at most two bits of the seed. Also show that the encryption scheme based on
G, where Ek(m) = m⊕G(k), is not computationally secure. (Hint: After using Part 2, we
can define a set S={j:xjor its complement is an output bit of G}and a graph Hwith
edge set {(j, k) : xj⊕xkor its complement is an output bit of G}. Use the expansion of G
to argue that either Hcontains a cycle or there are two elements of Sconnected by a path
in H.)
Problem 2. (Guessing Indistinguishability ⇒Indistinguishability) In class, we showed
that if an encryption scheme has computationally indistinguishable encryptions then it also satisfies
guessing indistinguishability. Show that the converse of this statement is also true.
Problem 3. (Properties of Pseudorandom Sequences) Let Gbe a pseudorandom generator
with expansion function `. Show that G(Un) has a sequence of at least 2log2`(n) consecutive ones
with low probability (i.e. tending to 0 as n→ ∞). Can this probability be negligible?
1
pf2

Partial preview of the text

Download Problem Set 3 for CS 120/CSCI: Introduction to Cryptography and more Exercises Cryptography and System Security in PDF only on Docsity!

CS 120/CSCI E-177: Introduction to Cryptography

Problem Set 3

Assigned: Oct. 12, 2006 Due: Oct. 18, 2006 (1:10 PM)

Justify all of your answers. See the syllabus for collaboration and lateness policies. You can submit by email to ciocan@eecs (please include source files) or by hardcopy Carol Harlow in MD 343.

Problem 1. (Breaking Some Stream Ciphers)

  1. Define G(x) = y 0... yn, where x = x 0 · · · xn− 1 , y 0 = x 0 , yi = xi− 1 ⊕ xi mod n for i = 1,... , n. Show that G is not a pseudorandom generator. Also show that the encryption scheme based on G, where Ek(m) = m ⊕ G(k), is not computationally secure (i.e. does not have computa- tionally indistinguishable encryptions). In the remainder of the problem, you will generalize the above to any pseudorandom generator for which each bit of output depends on at most two bits of the seed. That is, for every n and every i ∈ { 1 ,... , (n)} (where is the expansion function of G), there exist j, k ∈ { 1 ,... , n} and a function f such that G(x)i = f (xj , xk) for all x ∈ { 0 , 1 }n. (In contrast, a remarkable result from 2004 shows how to convert essentially any pseudorandom generator into one where every output bit depends on only four bits of the seed.)
  2. Show that if G is a pseudorandom generator such that each bit of the output depends on at most two bits of the seed, then in fact each bit of the output is equal to either some bit of the seed, the complement of some bit of the seed, the xor of two bits of the seed, or the complement of the xor of two bits of the seed. That is, the functions f (xj , xk) must be one of xj , ¬xj , xk, ¬xk, xj ⊕ xk, or ¬(xj ⊕ xk). (Hint: what property do all 2-bit functions other than these have?)
  3. Show that there does not exist a pseudorandom generator such that each bit of the output depends on at most two bits of the seed. Also show that the encryption scheme based on G, where Ek(m) = m ⊕ G(k), is not computationally secure. (Hint: After using Part 2, we can define a set S = {j : xj or its complement is an output bit of G} and a graph H with edge set {(j, k) : xj ⊕ xk or its complement is an output bit of G}. Use the expansion of G to argue that either H contains a cycle or there are two elements of S connected by a path in H.)

Problem 2. (Guessing Indistinguishability ⇒ Indistinguishability) In class, we showed that if an encryption scheme has computationally indistinguishable encryptions then it also satisfies guessing indistinguishability. Show that the converse of this statement is also true.

Problem 3. (Properties of Pseudorandom Sequences) Let G be a pseudorandom generator with expansion function . Show that G(Un) has a sequence of at least 2 log 2(n) consecutive ones with low probability (i.e. tending to 0 as n → ∞). Can this probability be negligible?

Problem 4. (Key recovery in secure encryption) Let (G, E, D) be a computationally secure encryption scheme over the message space { 0 , 1 }n. Show that the probability that a PPT adversary can recover the key after seeing the encryption of a random message (uniformly distributed in { 0 , 1 }n) is negligible. (Hint: use semantic security.)