Key exchange
Key exchange is a cryptographic protocol by which communicating parties establish a shared secret over a communication channel without directly transmitting that secret.
Real-World Cryptography
A key exchange is a cryptographic protocol in which parties establish a common secret without directly transmitting that secret.
- How it is used
- Establishes a shared secret for authenticated encryption when communicating parties lack a pre-shared symmetric key.
- How deep it goes
- Explains key-pair generation, public-key exchange, shared-secret derivation, and MITM limits, while deferring detailed mathematics.
- Examples
- Uses Alice-and-Bob exchanges, private and public shapes, passive and active MITM scenarios, C code, RSA encapsulation, and Kyber intuition.
- What you can do after
- Apply it by deriving a shared secret for authenticated encryption while distinguishing passive observation from active impersonation.
Elliptic Curve Cryptography for Developers
A cryptographic process in which parties establish a common secret over a network without transmitting that secret directly.
- How it is used
- Establishes a shared secret for encrypting arbitrary-length messages with symmetric encryption over open networks.
- How deep it goes
- Builds elliptic-curve key generation and Diffie-Hellman computation, then tests MQV sharing; defers deeper Diffie-Hellman treatment.
- Examples
- Uses Alice-and-Bob exchange diagrams, passphrase-derived keys, elliptic-curve parameters, and an MQV test with matching hexadecimal shares.
- What you can do after
- Builds elliptic-curve key pairs, computes shared secrets, and verifies matching MQV outputs in code.
Read how Elliptic Curve Cryptography for Developers explains key exchange →
Related concepts
- elliptic-curve diffie-hellmanincludes · Elliptic-curve Diffie-Hellman is a public-key key-agreement method in which parties derive a shared secret through elliptic-curve point operations.
- Diffie–Hellman key exchangeincludes · Diffie–Hellman key exchange is a public-key key-agreement protocol that enables parties to derive a shared secret over an insecure channel without transmitting it.
- public key cryptographyuses · Public-key cryptography is asymmetric cryptography that uses mathematically related public and private keys for encryption, decryption, signing, and verification.
- cryptographic primitivekind of · A cryptographic primitive is a fundamental algorithmic building block that provides a basic security function such as encryption, hashing, or digital signing.
- X3DHincludes · X3DH is a non-interactive key-exchange protocol that combines multiple Diffie-Hellman exchanges to establish shared keying material for asynchronous messaging.
- authenticated key exchangeincludes · A key exchange protocol that authenticates at least one party to prevent an active man-in-the-middle attacker from impersonating that party.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

