Security Architecture and Engineering

Two systems run an anonymous Diffie-Hellman exchange over an untrusted network, and an attacker relays traffic, negotiating a separate key with each side. Which change actually stops this attack?

Show the answer

Correct answerB. Authenticate the exchange with certificate-based signatures

AWhy not this: A larger prime resists computing discrete logs; the attacker never needs to, since each side exchanges with the attacker.

BWhy this is right: Verifying a signed exchange proves the peer's identity, so an attacker cannot complete a key exchange as either party.

CWhy not this: Ephemeral keys give forward secrecy, but the attacker still completes a separate exchange with each side.

DWhy not this: Hashing the secret changes the derived key's form only; it adds no peer authentication.

The attack works because neither side verifies who it is exchanging keys with. Signed, certificate-validated exchange values bind each key to an identity, so the relay fails. A larger prime and ephemeral keys protect the math and past sessions, but the attacker still completes an exchange with each side.