Questions: Pseudorandom Functions

5 questions to test your understanding

Score: 0 / 5
Question 1 Short Answer

A truly random function from {0,1}^n to {0,1}^n requires 2^n * n bits to specify (a lookup table). A PRF with an n-bit key specifies 2^n outputs using only n bits. Why doesn't this compression make PRFs trivially distinguishable?

Think about your answer, then reveal below.
Question 2 Multiple Choice

The GGM construction builds a PRF from a PRG with expansion factor 2. The key is the PRG seed, and to evaluate F_k(x) for input x = x_1x_2...x_n, you start with k and iteratively apply G, choosing the left or right half based on each bit of x. Why does this work?

AEach bit of x selects a random function from a pre-computed table
BThe construction builds a binary tree of depth n. The root is labeled with key k; each internal node's children are the two halves of the PRG applied to the node's label. The leaf reached by input x is F_k(x). A hybrid argument shows that replacing any single node's PRG output with truly random values is indistinguishable (by PRG security), and there are only polynomially many hybrids across the n levels
CThe XOR of all path nodes ensures output randomness
DG is applied n times to create a hash chain
Question 3 True / False

AES is modeled as a pseudorandom permutation (PRP) rather than a pseudorandom function (PRF). The PRP/PRF switching lemma says the distinction doesn't matter when the number of queries q satisfies q^2 << 2^n.

TTrue
FFalse
Question 4 Multiple Choice

CPA-secure symmetric encryption can be built from a PRF: to encrypt message m, choose random r and output (r, F_k(r) XOR m). Why does the PRF property make this secure?

AThe PRF encrypts the randomness r, hiding the key
BIf F_k is a PRF, then F_k(r) for a random r is indistinguishable from a random string. So F_k(r) XOR m looks like random XOR m = random. An adversary who can distinguish this from random can distinguish F_k from a random function, contradicting the PRF property. The fresh random r ensures different encryptions of the same message produce different ciphertexts (semantic security)
CThe XOR operation provides information-theoretic security like a one-time pad
DThe PRF ensures that r cannot be guessed by the adversary
Question 5 True / False

A PRF is a stronger primitive than a PRG: any PRF can be used to construct a PRG, but the GGM construction shows PRGs are sufficient to build PRFs.

TTrue
FFalse