Skip to content
ecdsa.com

ECDHE (ephemeral elliptic-curve Diffie–Hellman)

Elliptic-curve Diffie–Hellman with fresh key pairs for every handshake, the key exchange that gives TLS forward secrecy; in TLS 1.3 it runs over x25519, secp256r1 and similar groups.
Also written asECDHEephemeral ECDHECDHE key exchange

Both sides generate a new private scalar per connection, exchange public values (32 bytes for X25519, 65 for P-256 uncompressed) and derive the shared secret, then forget the scalars. In TLS 1.2, ECDHE appears in suite names (TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) and the server signs its parameters; in TLS 1.3 every non-PSK handshake uses it or a hybrid.

Implementations sometimes reuse an "ephemeral" key for a while for performance, which weakens forward secrecy and, with unvalidated points, invites invalid-curve attacks. On one Apple M4 Max core, OpenSSL 3.6.5 performs about 52,000 X25519 and 40,000 P-256 operations per second, so true per-connection keys cost little.

Standards and references

All terms