Quiz4 PDF
Quiz4 PDF
You submitted this homework on Tue 17 Feb 2015 1:51 PM CET. You got a
score of 8.50 out of 10.00. You can attempt again in 10 minutes.
Question 1
An attacker intercepts the following ciphertext (hex encoded):
20814804c1767293b99f1d9cab3bc3e7 ac1e37bfb15599e5f40eef805488281d
He knows that the plaintext is the ASCII encoding of the message "Pay Bob 100$" (excluding the
quotes). He also knows that the cipher used is CBC encryption with a random IV using AES as the
underlying block cipher. Show that the attacker can change the ciphertext so that it will decrypt to
"Pay Bob 500$". What is the resulting ciphertext (hex encoded)? This shows that CBC provides
no integrity.
You entered:
20814804c1767293bd9f1d9cab3bc3e7
ac1e37bfb15599e5f40eef805488281d
Total 1.00 /
1.00
Question 2
Let (E, D) be an encryption system with key space K , message space {0, 1} n and ciphertext
space {0, 1} s . Suppose (E, D) provides authenticated encryption. Which of the following
systems provide authenticated encryption: (as usual, we use ∥ to denote string concatenation)
′
E (k, m) = (E(k, m), 0) and 0.00 ′
(E , D ) provides
′
′
D(k, c) if b = 0 authenticated
D (k, (c, b) ) =
{ ⊥ otherwise encryption because
an attack on
(E , D ) directly
′ ′
gives an attack on
(E, D) .
′
E (k, m) = (E(k, m), 0) and 0.25 This system does
′
D (k, (c, b) ) = D(k, c) not provide
ciphertext integrity.
The attacker
queries for
to obtain
′ n
E (k, 0 )
(c, 0) . It then
′
⨁ s
and 0.00 ′ ′
provides
⨁
E (k, m) = E(k, m) 1 (E , D )
authenticated
′ s
D (k, c) = D(k, c 1 )
encryption because
an attack on
′
(E , D )
′
directly
gives an attack on
(E, D) .
′
E (k, m) = (E(k, m), E(k, m)) and 0.25 This system does
′
D(k, c 1 ) if D(k, c 1 ) = D(k, c 2 ) not provide
D (k, (c 1 , c 2 ) ) =
{ ⊥ otherwise ciphertext integrity.
To see why, recall
that authenticated
encryption (without
a nonce) must be
randomized to
provide CPA
security. Therefore,
′
E (k, m) = (c 1 , c 2 )
Question 3
If you need to build an application that needs to encrypt multiple messages using a single key,
what encryption method should you use? (for now, we ignore the question of key generation and
management)
Total 1.00 /
1.00
Question 4
Let (E, D) be a symmetric encryption system with message space M (think of M as only
consisting for short messages, say 32 bytes). Define the following MAC (S, V ) for messages in M :
1 if D(k, t) = m
S(k, m) := E(k, m) ; V (k, m, t) :=
{0 otherwise
What is the property that the encryption system (E, D) needs to satisfy for this MAC system to be
secure?
perfect secrecy
semantic security
Total 1.00 /
1.00
Question 5
In lecture 8.1 we discussed how to derive session keys from a shared secret. The problem is what
to do when the shared secret is non-uniform. In this question we show that using a PRF with a
non-uniform key may result in non-uniform values. This shows that session keys cannot be
derived by directly using a non-uniform secret as a key in a PRF. Instead, one has to use a key
Suppose k is a non-uniform secret key sampled from the key space {0, 1} 256 . In particular, k is
sampled uniformly from the set of all keys whose most significant 128 bits are all 0. In other
words, k is chosen uniformly from a small subset of the key space. More precisely,
128 128
1/2 if MSB 128 (c) = 0
for all c ∈ {0, 1} 256
: Pr[k = c] =
{0 otherwise
Let F(k, x) be a secure PRF with input space {0, 1} 256 . Which of the following is a secure PRF
when the key k is uniform in the key space {0, 1} 256 , but is insecure when the key is sampled
128
′
F(k, x) if MSB 128 (k) = 0
F (k, x) =
256
{1 otherwise
1.00 ′
F (k, x) is a secure PRF
′
F(k, x) if MSB 128 (k) ≠0 128
because for a uniform key k the
F (k, x) =
{1
256
otherwise probability that
is
128
MSB 128 (k) = 0
′
F (k, x) = F(k, x)
′
F(k, x) if MSB 128 (k) ≠1 128
F (k, x) =
256
{0 otherwise
Total 1.00 /
1.00
Question 6
In what settings is it acceptable to use deterministic authenticated encryption (DAE) like SIV?
Total 1.00 /
1.00
Question 7
Let E(k, x) be a secure block cipher. Consider the following tweakable block cipher:
E ′ ((k1 , k2 ), t, x) = E(k1 , x) ⨁ E(k2 , t) .
′
E ((k1 , k2 ), t, x) ⨁ ′ ′ ′
E ((k1 , k2 ), t , x) = E ((k1 , k2 ), t, x )
′
⨁ ′
E ((k1 , k2 ), t
′
′
E ((k1 , k2 ), 0, x) ⨁ ′ ′
E ((k1 , k2 ), 1, x) = E ((k1 , k2 ), 0, x )
′
⨁ ′
E ((k1 , k2 ), 1,
′
E ((k1 , k2 ), 0, x) ⨁ ′ ′
E ((k1 , k2 ), 0, x) = E ((k1 , k2 ), 0, x )
′
⨁ ′
E ((k1 , k2 ), 0,
Total 0.00 /
1.00
Question 8
In lecture 8.5 we discussed format preserving encryption which is a PRP on a domain
{0, … ,s − 1} for some pre-specified value of s. Recall that the construction we presented
worked in two steps, where the second step worked by iterating the PRP until the output fell into
Suppose we try to build a format preserving credit card encryption system from AES using *only*
the second step. That is, we start with a PRP with domain {0, 1} 128 from which we want to build
a PRP with domain 1016 . If we only used step (2), how many iterations of AES would be needed in
16
16
10
16 128
10 /2
Total 1.00 /
1.00
Question 9
Let (E, D) be a secure tweakable block cipher. Define the following MAC (S, V ) :
1 if E(k, m, 0) = tag
S(k, m) := E(k, m, 0) ; V (k, m, tag) :=
{0 otherwise
In other words, the message m is used as the tweak and the plaintext given to E is always set to
it
depends
on the
tweakable
block
cipher.
no
Total 1.00 /
1.00
Question 10
In Lecture 7.6 we discussed padding oracle attacks. These chosen-ciphertext attacks can break
Suppose the system is vulnerable to a padding oracle attack. An attacker intercepts a 64-byte
ciphertext c (the first 16 bytes of c are the IV and the remaining 48 bytes are the encrypted
payload). How many chosen ciphertext queries would the attacker need in the worst case in order
to decrypt the entire 48 byte payload? Recall that padding oracle attacks decrypt the payload one
byte at a time.
1.00 Correct. Padding oracle attacks decrypt the payload one byte at a
12288 time. For each byte the attacker needs no more than 256 guesses in
the worst case. Since there are 48 bytes total, the number queries
needed is 256 × 48 = 12288 .
1024
12240
256
Total 1.00 /
1.00