key exchange
The step in which two parties establish a shared secret key over a network, so they can then encrypt their conversation.
In more detail
It is done either by key agreement, where both sides contribute and compute the same secret, as in Diffie-Hellman and X25519, or by key transport, where one side creates the key and sends it encrypted to the other. The resulting secret is fed into a key derivation function to make the session keys used by a fast symmetric cipher. The exchange must be authenticated, or an attacker in the middle can run a separate exchange with each side.
Examples
openssl pkeyutl -derive -inkey bob.key -peerkey alice.pub -out bob.binAlice and Bob derived the same secretRelated terms
- Diffie-Hellman — A method that lets two parties agree on a shared secret key over a public network, even while an eavesdropper sees every message they exchange.
- key transport — Establishing a shared key by having one party create it and send it to the other encrypted, instead of both parties computing it together.
- TLS handshake — The opening exchange of a TLS connection, in which client and server agree on settings, check certificates and create shared keys.
- forward secrecy — A property of key exchange where a stolen long-term private key cannot decrypt past recorded sessions, because each session used temporary keys.
Taught in
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- Post-Quantum Cryptography & Key Lifecycles — Cybersecurity Fundamentals, GRC & Cryptography