Applied Cryptography

In protocols such as TLS 1.3, the shared secret obtained from an ECDHE key exchange is not used directly as an encryption key; instead keys are made by passing it through a key derivation function (KDF) such as HKDF. Which of the following is an appropriate reason?

  1. APassing it through a key derivation function makes the shared secret secure even against quantum computers
  2. BThe value from the key exchange is too short, so the computation is deliberately made slow to slow down brute force
  3. CThe value from the key exchange is not necessarily uniformly random, so it is turned into an unbiased key, and separate keys are derived for each purpose
Show answer and explanation

Answer: C. The value from the key exchange is not necessarily uniformly random, so it is turned into an unbiased key, and separate keys are derived for each purpose

The shared secret obtained from a key exchange is, for example, the coordinate of a point on an elliptic curve, and not all of its bits are necessarily uniformly random. HKDF uses HMAC first to extract an unbiased pseudorandom key from the shared secret (Extract), and then expands it together with labels such as "client-to-server encryption" (Expand) to make as many keys of the required lengths as needed. Using independent keys for each purpose keeps a problem with one key from spreading to other purposes. PBKDF2 and Argon2, which derive keys from passwords, are deliberately slow, but HKDF is a light operation that assumes an input with sufficiently high entropy.

  • A. A key derivation function does not change how strong the key exchange itself is against quantum computers. Becoming quantum-resistant requires changing the key exchange scheme.
  • B. Deliberately slow computation is the idea behind PBKDF2 and Argon2, which derive keys from passwords. The output of a key exchange already has sufficient length and entropy.
  • C. Correct. Keys are made in two stages: Extract, which removes bias, and Expand, which makes a key for each purpose.
Practice this topic Back to topic

Books on Applied Cryptography Ad

As an Amazon Associate I earn from qualifying purchases.

More Applied Cryptography questions

  1. The mechanism of RSA is checked with small numbers. From the primes p = 5 and q = 11, n = pq is formed, and the public exponent is e = 3. With φ(n) = (p − 1)(q − 1), which of the following is the private exponent d (0 < d < φ(n)) that satisfies e × d ≡ 1 (mod φ(n))?
  2. In RSA, let the public key be n = 55 and e = 3. Which of the following is the ciphertext c when the plaintext m = 7 is encrypted as c = m^e mod n?
  3. Which of the following correctly describes a problem with using textbook RSA (computing c = m^e mod n directly from the plaintext m) without padding in real communication?
  4. In Diffie–Hellman key exchange, a prime p and a generator g are public; A and B choose secret values a and b and send each other g^a mod p and g^b mod p. Which of the following is the reason an eavesdropper is believed unable to find the shared secret g^(ab) mod p even after seeing all these public values?
  5. Diffie–Hellman key exchange is checked with small numbers. Let p = 23 and g = 5; A chooses the secret value a = 6 and B the secret value b = 15. A sends A = g^a mod p and B sends B = g^b mod p. Which of the following is the shared secret the two obtain?

Comparisons in this topic