X25519
A fast, widely used elliptic curve key exchange function that lets two parties derive the same 32-byte shared secret from each other's public keys.
In more detail
X25519 performs elliptic curve Diffie-Hellman on Curve25519 and is defined in RFC 7748. Its public keys are 32 bytes, or 44 bytes with the encoding that names the algorithm, compared with 256 bytes for a 2048-bit Diffie-Hellman value. It is the most common key exchange in TLS 1.3 and is now often paired with ML-KEM in hybrid post-quantum handshakes.
Examples
openssl genpkey -algorithm X25519 -out "$who.key"Bob's public key on the wire: 44 bytesshared secret: 32 bytesRelated terms
- ECDH — Elliptic curve Diffie-Hellman: key agreement carried out on an elliptic curve, so two parties reach a shared secret using small keys and fast maths.
- key exchange — The step in which two parties establish a shared secret key over a network, so they can then encrypt their conversation.
- Ed25519 — A modern public-key signature algorithm with small, fast keys, the recommended type for new SSH keys.
- hybrid key exchange — Running a classical key exchange and a post-quantum one together and combining both results, so an attacker has to break both to learn the session key.
Taught in
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- Post-Quantum Cryptography & Key Lifecycles — Cybersecurity Fundamentals, GRC & Cryptography