Skip to content
ecdsa.com
RecommendedMontgomery

curve25519

Curve25519 is the Montgomery curve behind X25519, the default key exchange of TLS 1.3, SSH and WireGuard.

curve25519 is a Montgomery curve By² = x³ + Ax² + x over a 255-bit prime field with a 253-bit prime-order subgroup and cofactor 8; its estimated security level is 128 bits. Status: recommended for new systems.

Curve25519 is the Montgomery curve y² = x³ + 486662x² + x over the prime 2^255 − 19, designed by Daniel J. Bernstein in 2006 and specified in RFC 7748. Its group has order 8·n with a 253-bit prime n, giving about 128 bits of security, and its quadratic twist is also secure.

X25519, the Diffie–Hellman function on this curve, uses u-coordinates only: keys are 32-byte strings, and private keys are 'clamped' as RFC 7748 §5 prescribes so that the cofactor cannot leak information. The function accepts any 32 bytes as a public key; low-order inputs give an all-zero shared secret, which protocols should reject.

TLS 1.3 lists x25519 as a Recommended group and uses it as the classical half of the X25519MLKEM768 hybrid; SSH uses it as curve25519-sha256 (RFC 8731), and WireGuard, Signal and age are built on it. Its twisted Edwards twin is edwards25519, used for Ed25519 signatures.

Names in standards

StandardName
RFC 7748curve25519
RFC 7748 / RFC 8410X25519
SSHcurve25519-sha256

Object identifiers

Domain parameters

255-bit prime field · about 128-bit security

Field prime p
0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed
Coefficient a
0x76d06
Coefficient b
0x1
Base point x
0x9
Base point y
0x20ae19a1b8a086b4e01edd2c7748d14c923d4d7e6d7c61b229e9c5a27eced3d9
Order n of the base point
0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed
Cofactor h
0x8

Used in

  • TLS 1.3 (x25519, X25519MLKEM768)
  • SSH (curve25519-sha256)
  • Signal
  • WireGuard
  • age
  • HPKE

Identifiers in registries

TLS supported groups
x25519 0x001DMLKEM512X25519 0x11EAX25519MLKEM768 0x11ECX25519Kyber768Draft00 0x6399
JOSE algorithms
HPKE-3HPKE-3-KEHPKE-4
JWK curves
X25519
COSE elliptic curves
X25519 4
SSH key exchange methods
curve25519-sha256gss-curve25519-sha256-*mlkem768x25519-sha256sntrup761x25519-sha512
HPKE KEM identifiers
DHKEM(X25519, HKDF-SHA256) 0x0020DHKEM(X25519+Elligator, HKDF-SHA256) 0x0022X25519Kyber768Draft00 0x0030X-Wing 0x647A

Standards and references

All curves