Docsity

Cryptography Homework 5: Pseudorandom Generators and Functions, Exercises of Cryptography and System Security

Toggle sidebar
bg1
COS 433/MAT 473 — Cryptography — Homework 5.
Due Nov 6 (Print, staple and hand in at the beginning of class).
Please type up your solutions using L
A
T
EX.
See course homepage for collaboration policy and late submissions.
Problem 1 (15 pts) In class, we saw one method for increasing the expansion function of a pseu-
dorandom generator; here we give another. Let G:{0,1}∗→ {0,1}∗be a pseudorandom generator
with expansion function `(n), and let t(n)be a function. Consider the function
G0(x) = G(t(|x|))(x) = G(G(G(· · · G(
|{z }
t(|x|)
x)))).
1. Show that when `(n) = 2nand t(n) = log n,G0is a pseudorandom generator. (Hint: use the
hybrid technique.)
2. Does Part 1 also hold for t(n) = n? Identify necessary and sufficient conditions on the
relationship between `(n)and t(n)for G0to be a pseudorandom generator.
3. What are the advantages and disadvantages of this method for length expansion as compared
to the one given in class?
Problem 2 (10 pts) Abit-commitment scheme is a cryptographic primitive that involves two par-
ties, a sender and a receiver. The sender commits to a value b∈ {0,1}by sending the receiver a
string (called the commitment). Later, the sender can “reveal” the value bby sending the receiver
another string (called the opening), which the receiver checks against the commitment. The com-
mitment should be binding, meaning that it should be impossible for the sender to open it as both a
0 and 1. On the other hand, the commitment should be hiding in that the committed value should
be completely hidden (to a polynomial-time receiver) prior to revelation.
1. Try to formally define the properties we want from a commitment scheme. (If you have
trouble, then it may help to try Part 2 first and then formalize the properties of the scheme
you construct.)
2. Construct a commitment scheme from any one-way permutation (and hardcore bit).
Problem 3 (15 pts) Let Fn:{fk:{0,1}n→ {0,1}n}k∈{0,1}nbe a family of pseudorandom func-
tions. We would like to construct a family of pseudorandom functions with 2n-bit outputs from Fn.
Consider the following constructions:
1. F1
nsuch that f1
k(x) = fk(0n)◦fk(x)
1
pf3

Partial preview of the text

Download Cryptography Homework 5: Pseudorandom Generators and Functions and more Exercises Cryptography and System Security in PDF only on Docsity!

COS 433/MAT 473 — Cryptography — Homework 5.

Due Nov 6 (Print, staple and hand in at the beginning of class).

Please type up your solutions using LATEX.

See course homepage for collaboration policy and late submissions.

Problem 1 (15 pts) In class, we saw one method for increasing the expansion function of a pseu- dorandom generator; here we give another. Let G : { 0 , 1 }∗^ → { 0 , 1 }∗^ be a pseudorandom generator with expansion function `(n), and let t(n) be a function. Consider the function

G′(x) = G(t(|x|))(x) = G(G(G(· · · G( ︸ ︷︷ ︸ t(|x|)

x)))).

  1. Show that when `(n) = 2n and t(n) = log n, G′^ is a pseudorandom generator. (Hint: use the hybrid technique.)
  2. Does Part 1 also hold for t(n) = n? Identify necessary and sufficient conditions on the relationship between `(n) and t(n) for G′^ to be a pseudorandom generator.
  3. What are the advantages and disadvantages of this method for length expansion as compared to the one given in class?

Problem 2 (10 pts) A bit-commitment scheme is a cryptographic primitive that involves two par- ties, a sender and a receiver. The sender commits to a value b ∈ { 0 , 1 } by sending the receiver a string (called the commitment). Later, the sender can “reveal” the value b by sending the receiver another string (called the opening), which the receiver checks against the commitment. The com- mitment should be binding, meaning that it should be impossible for the sender to open it as both a 0 and 1. On the other hand, the commitment should be hiding in that the committed value should be completely hidden (to a polynomial-time receiver) prior to revelation.

  1. Try to formally define the properties we want from a commitment scheme. (If you have trouble, then it may help to try Part 2 first and then formalize the properties of the scheme you construct.)
  2. Construct a commitment scheme from any one-way permutation (and hardcore bit).

Problem 3 (15 pts) Let Fn : {fk : { 0 , 1 }n^ → { 0 , 1 }n}k∈{ 0 , 1 }n be a family of pseudorandom func- tions. We would like to construct a family of pseudorandom functions with 2 n-bit outputs from Fn. Consider the following constructions:

  1. F n^1 such that f (^) k^1 (x) = fk(0n) ◦ fk(x)
  1. F n^2 such that f (^) k^2 (x) = fk(x) ◦ fk(¯x), where x¯ is the bit-complement of x (i.e flipping all the bits).
  2. F n^3 such that f (^) k^3 (x) = f 0 n^ (x) ◦ fk(x) For each construction, say if we obtain necessarily a family of pseudorandom functions or not. Justify your answers.

Problem 4 (20 pts) Suppose G : { 0 , 1 }n^7 → { 0 , 1 }^2 n^ is a PRG with security 2 n/^10. Formally, this means that for every non uniform adversary A running in time less than 2 n/^10 , we have

| Pr[A(G(Un)) = 1] − Pr[A(U 2 n) = 1]| ≤ 2 −n/^10

(such PRGs are believed to exists under a strong form of the FACTORING assumptions). Consider the GGM construction of PRFs we saw in class (the tree construction) using this PRG. Suppose that we use a tree of depth m = n^0.^1 to build a function fk : { 0 , 1 }m^7 → { 0 , 1 }m^ for each k ∈ { 0 , 1 }n as described in class. That is,

fk(x) = Gxm (Gxm− 1... Gx 1 (k).. .))

. Prove that fk is a PRF even if the adversary is given the complete truth table of fk (but not the value of k). More formally, show that for any non uniform PPT A running in time polynomial in the size of the truth table of fk (that is, polynomial in m 2 m), we have

| Pr[A(fk) = 1] − Pr[A(Um 2 m ) = 1]| ≤ neg(n)

where A(fk) means ‘the output of A given the truth table of fk, which is a sequence of m 2 m^ bits’ and A(Um 2 m^ ) means ‘the output of A given m 2 m^ random bits’. (Hint: Use the hybrid argument but observe that in this case the proof is simpler since the adversary has enough time to construct the entire tree.)

Problem 5 (20 pts) 1. Let f : { 0 , 1 }m^7 → { 0 , 1 }m^ be a random function. Show that, with probability close to 1, f cannot be computed by a non uniform algorithm A running in time m^100. (Hint: estimate the number of algorithms of code size m^100 ).

  1. Microloft Inc. claims that it has developed a product that can distinguish between easy and hard functions. Formally, their algorithm D takes as input a function f : { 0 , 1 }m^7 → { 0 , 1 }m^ (given as an oracle, so D can query f on any input it wants) and outputs 1 if f can be computed in time at most m^100 and 0 otherwise. Use your knowledge of PRFs to argue that this claim is not likely to be true (unless Microloft also has an algorithm for factoring).
  2. After the failure of their last product, Microloft Inc. is coming up with a new product L that promises to do the following: given black box access to any ‘easy’ function f : { 0 , 1 }m^7 → { 0 , 1 }m, L can ‘learn’ the function, in the sense that it can predict its values on random inputs with good probability. More formally, suppose f is computed by a non uniform algorithm running in time m^100. The algorithm (or ‘product’) L operates in two steps: in the first step it evaluates f on any poly(m) inputs of tis choice. In the next step, L is presented with a new input x, chosen uniformly from { 0 , 1 }m, and is asked to predict the value of f (x). Microsoft Inc. claims that L can succeed in the second step with probability at least 1 / 10. Using your knowledge of PRFs, show that this product is also not likely to work (unless Mi- croloft also has a factoring algorithm).