Skip to content
NOUMENResearch
Network
Engineering
, home page

IntelligenceAlgorithmsx25519

X25519

Elliptic-curve Diffie-Hellman on Curve25519, defined in RFC 7748. It is the most common key exchange in TLS 1.3, SSH, Signal, WireGuard and libsodium.

In short

What a quantum computer changes.

Quantum effect
Broken by Shor's algorithm
Family
Classical public keyRests on elliptic-curve discrete logarithm.
What it means
Shor's algorithm, run on a large, fault-tolerant quantum computer, factors large numbers and solves discrete logarithms, including those on elliptic curves, far faster than any known classical method. The security of this algorithm rests on elliptic-curve discrete logarithm, which is one of those problems. Anyone with such a machine could work out a private key from the matching public key. Signatures could then be forged, and data protected by a key exchange built on this algorithm could be decrypted, including traffic recorded now and kept for later. Longer keys do not fix this. The usual answer is to plan a move to a post-quantum or hybrid scheme.

This describes the family, not any project that uses it.

41 in the catalogue

Packages that provide it

Packages that provide X25519
PackageProvides
@noble/curvesnpmPure TypeScript elliptic-curve library: ECDSA on secp256k1 and the NIST P curves, BIP340 Schnorr, Ed25519 and Ed448, X25519 and X448, ECDH, BLS signatures and pairings on BLS12-381 and BN254, FROST threshold signatures and the Poseidon hash.
eciesjsnpmECIES public-key encryption over secp256k1 or Curve25519 (X25519 or Ed25519 keys), deriving keys with HKDF and encrypting with AES-256-GCM or XChaCha20-Poly1305.
tweetnaclnpmPure JavaScript port of TweetNaCl: X25519 with XSalsa20-Poly1305 public-key boxes, XSalsa20-Poly1305 secret boxes, Ed25519 signatures and SHA-512.
libsodium-wrappersnpmlibsodium compiled to WebAssembly and JavaScript with generated wrappers: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, SHA-3, HMAC, Argon2 password hashing, ML-KEM-768 and the X-Wing hybrid KEM.
libsodium-wrappers-sumonpmThe sumo build of libsodium.js: everything in libsodium-wrappers plus scrypt password hashing and lower-level functions.
sodium-nativenpmLow-level native Node.js bindings to libsodium: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, HMAC, Argon2 and scrypt, plus a PBKDF2-SHA512 extension.
@stablelib/x25519npmTypeScript X25519 key agreement on Curve25519.
@peculiar/webcryptonpmWebCrypto API implementation for Node.js on top of the built-in crypto module, adding curves such as secp256k1, brainpool, Ed448 and X448 and non-standard mechanisms such as DES and RSAES-PKCS1-v1_5.
josenpmJWS, JWE, JWT and JWK for Node.js, browsers and other WebCrypto runtimes, with RSA, ECDSA, Ed25519 and ML-DSA signatures, HMAC, RSA-OAEP, ECDH-ES and AES key management, AES-GCM and AES-CBC-HMAC content encryption and PBES2.
openpgpnpmOpenPGP.js, a JavaScript implementation of OpenPGP (RFC 9580): RSA, DSA, ECDSA and ECDH on NIST, brainpool and secp256k1 curves, Ed25519, Ed448, X25519 and X448, AES with GCM, OCB and EAX, and Argon2 key derivation.
ssh2npmSSH2 client and server in JavaScript for Node.js, with Curve25519, ECDH and finite-field Diffie-Hellman key exchange, Ed25519, ECDSA, RSA and DSA host keys, AES-GCM, AES-CTR, AES-CBC and ChaCha20-Poly1305 ciphers, and HMAC.
sshpknpmParses, converts and uses SSH keys and certificates of type RSA, DSA, ECDSA (nistp256, nistp384, nistp521) and Ed25519, with signing, verification and Diffie-Hellman helpers.
hpke-jsnpmHybrid Public Key Encryption (RFC 9180) on top of WebCrypto, with DHKEM over P-256, P-384, P-521, X25519 and X448, HKDF-SHA-2, and AES-GCM or ChaCha20-Poly1305.
@hpke/corenpmCore Hybrid Public Key Encryption (RFC 9180) module on WebCrypto, with DHKEM over P-256, P-384, P-521 and X25519, HKDF-SHA-2 and AES-GCM.
@hpke/dhkem-x25519npmHPKE extension module providing DHKEM(X25519, HKDF-SHA256) for @hpke/core.
@metamask/eth-sig-utilnpmMetaMask signing functions for personal_sign, EIP-712 typed data and EIP-7702 authorizations over secp256k1, plus x25519-xsalsa20-poly1305 message encryption.
@libp2p/noisenpmNoise XX handshake connection encrypter for libp2p using X25519, ChaCha20-Poly1305, SHA-256 and HKDF.
@chainsafe/libp2p-noisenpmThe former package of the libp2p Noise handshake connection encrypter using X25519, ChaCha20-Poly1305, SHA-256 and HKDF.
curve25519-dalekcrates.ioPure Rust group arithmetic on the Edwards and Montgomery forms of Curve25519 and on the Ristretto group.
x25519-dalekcrates.ioPure Rust X25519 elliptic curve Diffie-Hellman key exchange built on curve25519-dalek.
ed25519-compactcrates.ioSmall pure Rust Ed25519 signature implementation with optional X25519 key exchange.
eciescrates.ioElliptic Curve Integrated Encryption Scheme over secp256k1 or Curve25519, using HKDF-SHA256 with AES-256-GCM or XChaCha20-Poly1305.
ringcrates.ioCryptographic library largely derived from BoringSSL, offering ECDSA P-256 and P-384, Ed25519, RSA signatures, X25519 and ECDH, AES-GCM, ChaCha20-Poly1305, SHA-1 and SHA-2, HMAC, HKDF, PBKDF2 and a system random generator.
aws-lc-rscrates.ioring-compatible Rust API over the AWS-LC C library, adding ML-KEM, ML-DSA, RSA encryption, raw AES modes and an optional FIPS build.
aws-lc-syscrates.ioLow-level generated FFI bindings to the AWS-LC C cryptography library, which aws-lc-rs wraps.
opensslcrates.ioRust bindings to OpenSSL covering TLS, X.509, RSA, DSA, Diffie-Hellman, elliptic curve and Edwards curve keys, symmetric ciphers, hashes, MACs and key derivation.
openssl-syscrates.ioRaw FFI declarations for the OpenSSL C library, used by the openssl crate.
boringcrates.ioRust bindings to BoringSSL with TLS support, RSA, DSA, Diffie-Hellman, ECDSA and ECDH, Ed25519 and X25519, ML-KEM, ML-DSA, HPKE, AEAD ciphers, hashes, HMAC and key derivation.
botancrates.ioRust wrapper for the Botan C++ library, exposing ciphers, hashes, MACs, KDFs, password hashing, random generators, X.509 and classical and post-quantum public key algorithms.
libcruxcrates.ioRe-export crate for the libcrux library of formally verified implementations, including ML-KEM, ML-DSA, X25519, P-256 ECDSA and ECDH, Ed25519, RSA-PSS, AES-GCM, ChaCha20-Poly1305, SHA-2, SHA-3, BLAKE2, HMAC, HKDF and HPKE.
orioncrates.ioPure Rust library offering ML-KEM, ML-DSA, X-Wing, HPKE, X25519, (X)ChaCha20-Poly1305, BLAKE2b, BLAKE3, SHA-2, SHA-3, HMAC, HKDF, PBKDF2, Argon2 and scrypt.
dryoccrates.ioPure Rust libsodium-compatible library with crypto_box, secretbox, Ed25519 signatures, BLAKE2b, SHA-2, SHA-3, HMAC, HKDF, Argon2 password hashing, ML-KEM-768, X-Wing and HPKE sealed boxes.
sodiumoxidecrates.ioRust bindings to libsodium: X25519 crypto_box, XSalsa20-Poly1305 secretbox, Ed25519 signatures, ChaCha20-Poly1305 and AES-256-GCM AEADs, SHA-2, BLAKE2b, HMAC, Argon2 and scrypt password hashing.
libsodium-syscrates.ioRaw FFI bindings to the libsodium C library, used by sodiumoxide.
crypto_boxcrates.ioPure Rust NaCl crypto_box public-key authenticated encryption combining X25519 with XSalsa20-Poly1305, or with XChaCha20-Poly1305 as ChaChaBox.
rustlscrates.ioTLS 1.2 and TLS 1.3 library in Rust whose cryptography comes from a pluggable provider, aws-lc-rs by default or ring.
hpkecrates.ioPure Rust Hybrid Public Key Encryption (RFC 9180) with X25519 and NIST P-curve DHKEMs, ML-KEM and X-Wing KEMs, HKDF or SHAKE KDFs and AES-GCM or ChaCha20-Poly1305.
snowcrates.ioPure Rust implementation of the Noise Protocol Framework with 25519, AES-GCM, ChaCha20-Poly1305, SHA-2, BLAKE2 and optional P-256 and BLAKE3.
agecrates.ioLibrary for the age file encryption format, with X25519, hybrid ML-KEM-768 plus X25519, P-256 tag, SSH key and scrypt passphrase recipients and ChaCha20-Poly1305 payload encryption.
sequoia-openpgpcrates.ioOpenPGP (RFC 9580 and RFC 4880) implementation with RSA, DSA, ECDSA, ECDH, EdDSA, X25519 and X448 keys, post-quantum ML-KEM, ML-DSA and SLH-DSA algorithms, AES and SHA-1, SHA-2 and SHA-3 hashes.
josekitcrates.ioJOSE library (JWT, JWS, JWE, JWK) with HMAC, RSA, ECDSA, EdDSA, ECDH-ES, AES key wrap, AES-GCM and PBES2, backed by OpenSSL, AWS-LC or pure Rust crates.

1 listed

Sources

  1. RFC 7748: Elliptic Curves for Securityrfc-editor.orgRetrieved 3 December 2026

Full record

Identifier
x25519
Kind
key-exchange
Family
Classical public key
Rests on
elliptic-curve discrete logarithm
Quantum effect
Broken by Shor's algorithm

Standards