Applied Cryptography
Which of the following is the correct combination of a weakness of Diffie–Hellman key exchange without authentication and its countermeasure?
- AAn eavesdropper can compute the shared secret just by seeing the public values. The countermeasure is to keep p and g secret so that the values sent cannot be intercepted on the channel
- BIt cannot prevent a man-in-the-middle attack in which an attacker in between runs separate key exchanges with each party. The countermeasure is to sign the public values with a certificate key to confirm the other party
- CThe secret values a and b are the same every time, so the shared secret never changes. The countermeasure is to run the key exchange only once and keep using the same secret for a long time
Show answer and explanation
Answer: B. It cannot prevent a man-in-the-middle attack in which an attacker in between runs separate key exchanges with each party. The countermeasure is to sign the public values with a certificate key to confirm the other party
This key exchange does not check whether a received public value really came from the other party. An attacker in between can therefore run one key exchange with A using its own value and another with B using its own value, relaying both sides while decrypting them (a man-in-the-middle attack). In TLS the server signs the key exchange with the private key of its certificate and the client verifies this with the certificate, which prevents this attack. p and g are values that may be public and need not be kept secret.
- A. Finding the shared secret from the public values alone requires solving the discrete logarithm problem. p and g may be public.
- B. Correct. The key exchange itself does not authenticate the other party, so it is combined with authentication by signatures and certificates.
- C. a and b can be chosen afresh each time. Using the same secret for a long time actually increases the impact of a leak.