Skip to content
Search

Diffie–Hellman key exchange

lastmod 2023-11-25created 2023-09-243 edits

Diffie–Hellman key exchange is a method of exchanging cryptographic keys that allows two parties to share a common secret key over an unencrypted communication network. It was published by Whitfield Diffie and Martin Hellman in 1976.

Diffie–Hellman key exchange established a basic method of cryptographic communication, and later, in 1977, the RSA cipher, a public-key cryptosystem, was proposed.

The principle that lets the key value be agreed upon even if the entire communication is being eavesdropped on by a malicious sniffer is that what is transmitted is not the key value itself but the method of creating the key value.

In RSA

The core of the DH algorithm is that computing with the other party's public key and my private key yields the secret key.

After that, the other party and I just encrypt data with the secret key and send it.

This DH algorithm is a "key exchange" algorithm used to share a symmetric key.

It is not for encryption or signing.

Generating a Diffie-Hellman parameter (dhparam) key

How to generate dhparam.pem (2048bit) using OpenSSL:

openssl dhparam -out dhparam.pem 2048

See also

Favorite site

author Zer0 sitemap