liveBook · Manning

Mutually authenticated key exchange

As explained in Real-World Cryptography

A mutually authenticated key exchange is an authenticated key exchange in which both participants authenticate each other while establishing a shared secret.

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

How Real-World Cryptography covers it

How deep it goes
Explains threat distinctions, signed key contributions, device provisioning, DH and ECDH choices, and public-key validation without detailing full protocol proofs.
Examples
Uses signed public keys, paired devices, QR codes, Bluetooth, Wi-Fi, NFC, and a libsodium X25519 C interface.
What it assumes
Assumes public and private keys, shared secrets, and authenticated channels; builds the distinction between one-sided and mutual authentication.
What you can do after
Evaluate protocol designs by distinguishing passive secrecy from active MITM resistance and checking peer public-key validity.
How it connects
Connects key exchange with man-in-the-middle attacks, digital signatures, Diffie–Hellman, elliptic-curve cryptography, public-key infrastructure, and TLS.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.