5 Key exchanges

This chapter covers

  • What key exchanges are and how they can be useful
  • The Diffie-Hellman and Elliptic Curve Diffie-Hellman key exchanges
  • Security considerations when using key exchanges

We are now entering the realm of asymmetric cryptography (also called public key cryptography) with our first asymmetric cryptographic primitive: the key exchange. A key exchange is, as the name hints, an exchange of keys. For example, Alice sends a key to Bob, and Bob sends a key to Alice. This allows the two peers to agree on a shared secret, which can then be used to encrypt communications with an authenticated encryption algorithm.

Warning As I hinted in the introduction of this book, there is much more math involved in asymmetric cryptography; ...

Get Real-World Cryptography now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.