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 derivation
function like HKDF.
Suppose
is a
non-uniform secret key sampled from the key space
.
In particular,
is sampled uniformly from the set of all keys whose most significant
128 bits are all 0. In other words,
is chosen uniformly from a small subset of the key space. More precisely,
for all
Let
be a secure PRF with input space
. Which
of the following is a secure PRF when the key
is uniform in the
key space
, but is insecure when the key is sampled from the
non-uniform
distribution described above?