A mutually authenticated key exchange lets two participants establish the same shared secret while proving each participant’s identity. This blocks an active man-in-the-middle attacker from impersonating both sides: an unauthenticated exchange protects against passive observation, but not message substitution. section 5.5 section 5.1
A typical exchange proceeds in recognizable stages:
- Each participant creates or supplies a key-exchange key pair and sends its public key. section 5.1
- Each side authenticates the other’s key-exchange contribution, commonly by relying on a known public key or by signing the exchanged public key. section 7.1.2 section 5.5
- Both sides combine their private key with the peer’s public key to derive matching session secrets; invalid public keys must be rejected. section 5.5
Pairing two devices
Two devices can exchange public keys through a QR code or another authenticated but nonconfidential channel. Once each device has the other’s public key, they can perform a mutually authenticated exchange over an adversary-controlled channel such as Bluetooth, NFC, or Wi-Fi. section 11.3.1
Diffie–Hellman and elliptic-curve Diffie–Hellman provide the exchange mechanism. DH commonly uses RFC 7919 parameters, while ECDH offers smaller keys through curves such as P-256 and Curve25519. Digital signatures help authenticate more complex or larger-scale systems, where manually provisioning every public key is impractical. section 5.5 section 5.1
