YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE
CPSC 461b: Foundations of Cryptography | Handout #6 | |
Yitong Yin | March 1, 2009 | |
Solutions to Problem Set 2
Originally due Thursday, February 26, 2009.
Problem 1 One-way functions and collections of one-way functions
[Textbook, Chapter 2, Exercise 18.]
where In is the output distribution of algorithm I on input 1n, and Xn is the output of algorithm D on input In.
A new function g can be defined as such: for each z {0,1}q(n), represent that Sn(z) = (i,x), thus g(z) = (i,fi(x)). It also follows that g(Uq(n)) = (In,fIn(Xn)).
We will show that the above g is a one-way function.
Function g is polynomial-time computable since Sn can be computed by the polynomial-time algorithms I and D and fi can be computed by the polynomial-time algorithm F .
Suppose that g is polynomial-time invertable, namely, there exists a polynomial-time algorithms A such that for some polynomial p(n),
Define a new algorithm B as such: for each input y = (i,fi(x)) where i ∩{0,1}n and x Di, represent that Sn(A(1q(n),y)) = (j,z), where j {0,1}n and such that B(y) = z. We show that B inverts the collection (I,D,F).
Since g(Uq(n)) = (In,fIn(Xn)), the event that A(1q(n),g(Uq(n))) g-1(g(Uq(n))) is equivalent to the event that A(1q(n),(In,fIn(Xn))) g-1(In,fIn(Xn)), which according to the definition of B, holds only if B(In,fIn(Xn)) f-1(fIn(Xn)). Therefore,
Problem 2 Hard core of one-way function
[Textbook, Chapter 2, Exercise 24, as modified below.]
Note that the “Guideline” is poorly printed and easy to misinterpret. The second subscript “x ” on the right side of the definition of g is , not I, but it takes sharp eyes to spot the difference in the printed version of the book. Here, is intended to denote the set difference {1,2,…,|x|}- I.
Also, we are used to dealing with functions on strings, yet the guideline defines g to take a set argument. There are many ways of representing finite sets by strings. For this problem, represent the set I ⊆{1,2,…,|x|} by the length-|x| bit-vector u, where ui = 1 iff i I. It follows that is represented by ¬u, the bitwise complement of u.
Finally, we define x[u] = xi1…xik, where ij is the position of the jth 1-bit in u, and k is the number of 1-bits in u. Thus, if u represents the set S, then x[u] denotes the string xS defined in the guideline.
Using these conventions, the intended function g is defined by
You may ignore the part of the guideline that talks about more “dramatic” predictability.
We take the function g(x,u) = (f(x[u]),x[¬u],u) defined in the problem guideline. For each input (x,u), let bi(x,u) denote the ith bit of the input.
Let Ai be such an algorithm: for each input in the form of (f(x[u]),x[¬u],u) if i > |u| (size of the set u), return the (i -|u|)th bit of the binary representation of u; if i ≤|u| and iu, return xi which is contained in x[¬u]; and if otherwise, flip a fair coin and return the outcome.
It is easy to see that it always holds that Ai(g(x,u)) = bi(x,u) for i > |u|, i.e. Pr[Ai(g(Un)) = bi(x,u)] = 1 for i > |u|.
For i ≤|u|, Ai(g(x,u)) = bi(x,u) when iu, or if i u and Ai makes a correct guess. According to the total probability, for i ≤|u|,
Amplification is the technique for reducing errors in probabilistic algorithms by repeating the computation many times. We have used amplification both for reducing the error probability in algorithms attempting to invert one-way functions and also for increasing the advantage of algorithms attempting to guess hard core predicates. However, the way it is used differs markedly in the two cases.
For inverting functions, we assume an algorithm A(y) succeeds with probability at least ϵ(n) at returning a value x f-1(y). To amplify, we repeat A(y) for r(n) times and succeed if any of the runs succeed. This depends on our ability to feasibly test whether the value returned by A(y) in a given run is correct or not. Hence, the amplified success probability is at least
For guessing the value of a hard core predicate, we assume an algorithm D(y) with advantage ϵ(n) at predicting b(x). To amplify, we repeat D(y) for r(n) times. Because we do knot know which runs of D(y) return correct answers, we select our final answer to be the majority of all returned answers. The advantage of the resulting algorithm D′ is not easy to compute directly, so we use the Chernoff bound or other statistical techniques to get a lower bound on it.
For all n > 2C, it holds that log 2n > C, thus RHS(n) = (log 2n)2 < C log 2n ≤ RHS(n). Since -log 2(⋅) is monotonically decreasing, it must holds all the above n that ϵ(n) = 2-LHS(n) < 2-RHS(n) = .