Skip to content
Broken by quantumed448

Ed448

An EdDSA signature scheme on the larger Curve448 ("Goldilocks") curve, offering a higher classical security margin than Ed25519.

Used for
Signature
Family
Elliptic curve (Edwards, discrete logarithm)
Classical security
224 bits
Against a quantum computer
Broken
Standards
RFC 8032, FIPS 186-5, NIST IR 8547
Read the guideHow public-key cryptography works

Migration guides

Concrete code changes to move off Ed448. Pick your stack.

node:crypto / @noble/post-quantum · javascriptNode.js: sign and verify with ML-DSA-65 (node:crypto on Node 24.6+, or @noble/post-quantum)Production-ready

Why

ECDSA, Ed25519 and RSA signatures will be forgeable once a large quantum computer exists. Signatures are not exposed to "harvest now, decrypt later", but anything that must stay trustworthy for years (software updates, firmware, documents, long-lived API keys, internal PKI) needs a post-quantum path. ML-DSA (FIPS 204) is the standard general-purpose replacement; ML-DSA-65 is the common default.

Node.js supports ML-DSA natively in node:crypto from 24.6.0 (key generation, crypto.sign, crypto.verify) when built with OpenSSL 3.5+, which all official Node 24 and 26 builds are. @noble/post-quantum works on any runtime, including Node 22 and browsers.

Steps

  1. Add an algorithm identifier to everything you sign (a header field, a key ID that maps to an algorithm), so verifiers know which algorithm to use. This is the crypto-agility step that makes later swaps cheap.
  2. Generate an ML-DSA-65 key pair and distribute the public key alongside (not instead of) the old one.
  3. Sign new artifacts with ML-DSA, or with both algorithms during the transition ("dual signing"); teach verifiers to accept either.
  4. Once all verifiers understand ML-DSA, stop issuing classical signatures.

Before

js
import { generateKeyPairSync, sign, verify } from 'node:crypto';

const { publicKey, privateKey } = generateKeyPairSync('ed25519');
const sig = sign(null, data, privateKey);           // 64 bytes
const ok = verify(null, data, publicKey, sig);

After: node:crypto (Node 24.6+)

js
import { generateKeyPairSync, sign, verify } from 'node:crypto';

const { publicKey, privateKey } = generateKeyPairSync('ml-dsa-65');
const sig = sign(null, data, privateKey);           // algorithm must be null/undefined: 3309 bytes
const ok = verify(null, data, publicKey, sig);

// Optional domain separation (FIPS 204 "context", up to 255 bytes; Node 24.8+):
const sig2 = sign(null, data, { key: privateKey, context: Buffer.from('myapp/release/v1') });
verify(null, data, { key: publicKey, context: Buffer.from('myapp/release/v1') }, sig2);

// Keys export as usual
const spkiPem = publicKey.export({ type: 'spki', format: 'pem' });

After: @noble/post-quantum (any runtime)

js
import { ml_dsa65 } from '@noble/post-quantum/ml-dsa.js';

const keys = ml_dsa65.keygen();                     // publicKey 1952 B, secretKey 4032 B
const sig = ml_dsa65.sign(data, keys.secretKey);    // 0.5.x argument order: (message, secretKey)
const ok = ml_dsa65.verify(sig, data, keys.publicKey);

Gotchas

  • Size. ML-DSA-65 signatures are 3,309 bytes and public keys 1,952 bytes, against 64 and 32 bytes for Ed25519 and 256 bytes for an RSA-2048 signature. Check HTTP header limits (many proxies cap headers at 8-16 KB), JWT/cookie sizes, database columns (VARBINARY(256) will not do) and QR codes.
  • Need tiny signatures or extreme conservatism? FN-DSA (Falcon, FIPS 206) will give ~666-byte signatures but is not final yet. SLH-DSA (FIPS 205) relies only on hashes but signatures are 7.8-50 KB.
  • Context strings must match on both sides, or verification fails.
  • Pre-hash variants (HashML-DSA) are different algorithms with different signatures; use plain ML-DSA unless a protocol requires otherwise.
  • HSM/KMS support for ML-DSA is arriving but uneven; check your provider before moving signing keys.
  • Verifiers first. Roll out verification support everywhere before switching signers, otherwise old clients reject new artifacts.

Verify

js
import assert from 'node:assert';
assert.equal(sig.length, 3309);
assert.ok(verify(null, data, publicKey, sig));
assert.ok(!verify(null, Buffer.from('tampered'), publicKey, sig));
cryptography (pyca) · pythonPython: sign and verify with ML-DSA-65 in pyca/cryptography (48+)Production-ready

Why

RSA, ECDSA and Ed25519 signatures become forgeable once a large quantum computer exists. ML-DSA (FIPS 204) is the standard replacement. pyca/cryptography added an ML-DSA module in 47.0.0 (AWS-LC/BoringSSL) and OpenSSL 3.5+ backend support in 48.0.0; 49.0.0 added X.509 certificate/CSR/CRL signing with ML-DSA keys, and 50.0.0 lets the X.509 verification APIs accept ML-DSA-44/65/87 (RFC 9881).

Steps

  1. pip install -U "cryptography>=48" (49+ if you need ML-DSA certificates).
  2. Put an algorithm identifier next to every stored signature so verifiers can support both old and new algorithms during the transition.
  3. Generate an ML-DSA-65 key, distribute the public key, and dual-sign (classical + ML-DSA) until all verifiers are upgraded.

Before

python
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey

key = Ed25519PrivateKey.generate()
sig = key.sign(b"release-1.2.3.tar.gz digest")     # 64 bytes
key.public_key().verify(sig, b"release-1.2.3.tar.gz digest")

After

python
from cryptography.hazmat.primitives.asymmetric.mldsa import MLDSA65PrivateKey, MLDSA65PublicKey
from cryptography.hazmat.primitives import serialization

key = MLDSA65PrivateKey.generate()
msg = b"release-1.2.3.tar.gz digest"
sig = key.sign(msg, context=b"myapp/release/v1")   # 3309 bytes; context is optional
pub = key.public_key()
pub.verify(sig, msg, context=b"myapp/release/v1")  # raises InvalidSignature on failure

# Distribute / store
pub_raw = pub.public_bytes_raw()                    # 1952 bytes
pub_pem = pub.public_bytes(serialization.Encoding.PEM, serialization.PublicFormat.SubjectPublicKeyInfo)
seed = key.private_bytes_raw()                      # 32-byte seed; protect it like any private key
same_key = MLDSA65PrivateKey.from_seed_bytes(seed)

Gotchas

  • Sizes. Signature 3,309 bytes, public key 1,952 bytes. Check column types, message limits and anything that embeds signatures in URLs or headers.
  • Context must match between signer and verifier.
  • Seed-only private keys. private_bytes* returns the seed form; some other tools expect the expanded key. Test interoperability with whatever else reads your keys (HSMs, OpenSSL, Go, Java).
  • Backend. A cryptography linked against an older system OpenSSL raises UnsupportedAlgorithm.
  • Large messages. For huge files, sign a SHA-512 digest with a clear domain label, or use the external-mu API (sign_mu, MLDSAMuHasher, 49+/50+) if you need streaming.

Verify

python
from cryptography.exceptions import InvalidSignature
try:
    pub.verify(sig, b"tampered", context=b"myapp/release/v1")
    raise SystemExit("should not verify")
except InvalidSignature:
    print("ok", len(sig))   # ok 3309