Assignment 2
Assignment 2
Assignment 2
August 14, 2024
Instructor: Chethan Kamath
Prove that G′ is a PRG using a hybrid argument. What are the advantages and
disadvantages of this construction over the one in the lecture?
2. Recall the two-world definition of PRF from Definition 1, Lecture 5. Now consider
the alternative definition, Definition 1′ , via the following experiment:
The distinguisher D is given query access to the PRF Fk (·), and it can (adap-
tively) make polynomially-many queries x1 , · · · , xq to obtain Fk (x1 ), · · · , Fk (xq ).
In the end, D issues a challenge x∗ ∈
/ {x1 , . . . , xq }: in the pseudorandom world
∗ ∗
it gets y := Fk (x ) and in the random world it gets a uniformly random value
r∗ from the co-domain of the PRF.
1. For a PRF {Fk : {0, 1}n → {0, 1}n }k∈{0,1}n , the “complementing” PRF defined as
Fk′ (x) := Fk (x) (where the overline denotes bit-string complement)?
Exercise 4 (Weak PRFs). Recall that in the definition of PRFs, the distinguisher can
(adaptively) query its oracle (which is either the PRF or a random function) on inputs of
its choice. Let’s consider a weaker notion where the distinguisher only gets to see output
value on random input points. To be precise, {Fk : {0, 1}n → {0, 1}n }k∈{0,1}n is a weak
PRF if for all PPT (oracle) distinguishers D, the following is negligible
Here the $ in the oracle (instead of (·)) denotes access to output on random input points.
2. If F is a PRF, show that F ′ , defined below, is a weak PRF, but not a PRF:
(
Fk (x) if x is even
Fk′ (x) :=
Fk (x + 1) otherwise
Exercise 5 (Chosen Plaintext Attack (CPA)). Recall the definition of CPA from Lec-
ture 5 (cf. [KL14, Definition 3.21] for a formal definition). This exercise will help you
understand CPA secrecy better.
1. Let Π = (Gen, Enc, Dec) be a symmetric-key encryption (SKE) scheme with deter-
ministic encryption. Show that Π cannot be CPA-secret.
2. Let Π1 = (Gen1 , Enc1 , Dec1 ) and Π2 = (Gen2 , Enc2 , Dec2 ) be two SKE schemes. We
are in a situation where only one of the two schemes is CPA-secret (and we don’t
know which one). Construct a SKE scheme Π that is CPA-secret as long as Π1 or
Π2 is secure. (Such a construction is called a “combiner”.)
Hint: Use the fact that in the random world in Definition 1′ the challenge
output is uniformly random and thus a OTP.
References
[KL14] Jonathan Katz and Yehuda Lindell. Introduction to Modern Cryptography (3rd ed.). Chapman
and Hall/CRC, 2014.