liveBook · Manning

Diffie–Hellman key exchange

As explained in Software Security for Developers

Diffie-Hellman is a public-key key-agreement algorithm based on the computational difficulty of the discrete logarithm problem.

Diffie–Hellman (DH) creates a shared secret over an insecure network without transmitting that secret. Two systems exchange public keys and parameters, keep private keys secret, and independently compute the same result. section 7.1.2

The shared secret can become an AES key in a hybrid encryption scheme. DH underpins Elliptic Curve Diffie–Hellman (ECDH) and appears in TLS and SSH. section 7.1.2

Payment and warehouse services

In the ACME scenario, payment and warehouse services exchange public keys. Each combines its private key with the other service’s public key: sharedSecret = f(privateA, publicB) = f(privateB, publicA).

How Software Security for Developers covers it

How deep it goes
Explains exchanged keys, private-key protection, equivalent computations, and the untransmitted shared secret, while deferring mathematical detail.
Examples
Uses a public-chat analogy, an ACME payment-and-warehouse scenario, and a shared-secret computation equation.
What it assumes
Assumes familiarity with AES while introducing DH before extending the idea to elliptic-curve cryptography.
What you can do after
Evaluate how DH establishes an AES key and distinguish its role from the encryption of application data.
How it connects
Connects Diffie–Hellman with ECDH, AES, hybrid encryption, TLS, SSH, and public-key cryptography.

Also explained in

Compare how 4 books explain Diffie–Hellman key exchange →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.