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 →
Also covered in
What to know first
- public keyA public key is the openly distributable key in an asymmetric cryptographic pair, used for operations such as encrypting data or verifying signatures.
- public key cryptographyPublic-key cryptography is cryptography based on mathematically related public and private keys that support complementary operations such as encryption and decryption or signing and verification.
- symmetric encryptionSymmetric encryption is a cryptographic technique in which the same shared secret key, or equivalent shared secret material, is used to encrypt and decrypt data.
Related concepts
- 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.
- 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.
- public key cryptographyuses · Public-key cryptography is cryptography based on mathematically related public and private keys that support complementary operations such as encryption and decryption or signing and verification.
- 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.
- 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.
- Manually Authenticated Diffie-Hellmanincludes · Manually Authenticated Diffie-Hellman is a key-exchange technique that adds a commitment step and human comparison to hinder active man-in-the-middle attacks.
Questions about key exchange
What is 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.
Which Manning books explain key exchange?
Real-World Cryptography and Elliptic Curve Cryptography for Developers.
What should I know before learning key exchange?
Manning books that teach key exchange usually introduce public key, public key cryptography and symmetric encryption first.
What kinds of key exchange are there?
Kinds of key exchange include Diffie–Hellman key exchange, elliptic-curve diffie-hellman, authenticated key exchange and Manually Authenticated Diffie-Hellman.
What is key exchange a kind of?
Key exchange is a kind of cryptographic primitive. A cryptographic primitive is a fundamental algorithmic building block that provides a basic security function such as encryption, hashing, or digital signing.
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.

