ML-DSA Post-Quantum Signing Key Generator (FIPS 204)
Generate real NIST FIPS 204 ML-DSA (formerly CRYSTALS-Dilithium) post-quantum digital signature key pairs locally in your browser. Exports OpenSSL 3.5+ and RFC 9881 compatible SPKI & PKCS#8 seed PEM keys.
FIPS 204 · 2.16.840.1.101.3.4.3.19
Generated ML-DSA signing key pairML-DSA-87CNSA 2.0
Generating your ML-DSA-87 key pair…
Live ML-DSA Sign & Verify Playground
Sign a message below, then edit a single character to watch FIPS 204 verification reject tampering in real time.
ML-DSA Parameter Comparison vs. Classical Signatures
| Algorithm | Quantum Safe? | Public Key | Signature | Best Fit |
|---|---|---|---|---|
| Ed25519 / P-256 | No | 32–64 B | 64 B | Existing SSH/WebAuthn until PQ auth rolls out |
| RSA-4096 | No | 512 B | 512 B | Legacy PKI compatibility |
| ML-DSA-44 | Yes (Level 2) | 1,312 B | 2,420 B | Size-sensitive PQ certificates & tokens |
| ML-DSA-65 | Yes (Level 3) | 1,952 B | 3,309 B | Balanced commercial PKI & API signing |
| ML-DSA-87 | Yes (Level 5 · CNSA 2.0) | 2,592 B | 4,627 B | NSA CNSA 2.0, CAs, software & firmware signing |
Generate & Sign Locally (OpenSSL 3.5+ & Node.js)
Generate ML-DSA-87 signing key locally (OpenSSL 3.5+)
openssl genpkey -algorithm ML-DSA-87 -out ml-dsa-87-private.pemExtract SPKI public key (also verifies PEM downloaded above)
openssl pkey -in ml-dsa-87-private.pem -pubout -out ml-dsa-87-public.pemCreate a detached ML-DSA signature over an artifact
openssl pkeyutl -sign -inkey ml-dsa-87-private.pem -rawin -in release.tar.gz -out release.sigVerify the detached ML-DSA signature
openssl pkeyutl -verify -pubin -inkey ml-dsa-87-public.pem -rawin -in release.tar.gz -sigfile release.sigimport { ml_dsa87 } from '@noble/post-quantum/ml-dsa.js'
const { publicKey, secretKey } = ml_dsa87.keygen()
const message = new TextEncoder().encode('artifact-sha256:9f86d08...')
const signature = ml_dsa87.sign(message, secretKey)
const valid = ml_dsa87.verify(signature, message, publicKey)
console.log({ valid, sigBytes: signature.length }) // 4627 bytesRelated Post-Quantum & Signing Tools
SLH-DSA (FIPS 205) →
Conservative hash-only SPHINCS+ signatures (zero lattice risk).
ML-KEM Key Exchange →
FIPS 203 post-quantum key encapsulation (ML-KEM-512/768/1024).
X-Wing Hybrid KEM →
ML-KEM-768 + X25519 & ML-KEM-1024 + P-384 hybrid keys.
PQC Algorithm Comparison →
ML-KEM vs. ML-DSA vs. SLH-DSA vs. X-Wing wire budgets.
Frequently Asked Questions
When should I choose ML-DSA-87 vs. LMS/XMSS?
ML-DSA-87 (FIPS 204) is stateless—safe to use anywhere you previously used RSA or ECDSA/Ed25519 (TLS certs, API signing, software packages). Stateful hash-based signatures (LMS/XMSS) are specialized for firmware/root-of-trust signing where strict monotonic state tracking is guaranteed.
Why are ML-DSA signatures so much larger than Ed25519?
Lattice signatures carry polynomial vectors and hint bits rather than two 32-byte curve scalars. ML-DSA-87 signatures are 4,627 bytes vs. 64 bytes for Ed25519—still very fast to verify, so the main engineering check is ensuring HTTP headers, JWTs, certificate chains, and database columns can fit multi-kilobyte signatures.
Are short-lived RSA/ECDSA JWTs vulnerable to harvest-now, decrypt-later?
No—signatures provide authentication, not confidentiality. An adversary cannot retroactively forge a token that already expired. Focus PQC migration first on long-lived confidentiality (TLS/VPN/PGP) and long-lived trust roots (firmware, CAs, code-signing keys).
How to use this ML-DSA generator
100% client-side · OpenSSL 3.5+ & CNSA 2.0 compatible
Keys are generated locally in your browser using crypto.getRandomValues() and the audited @noble/post-quantum FIPS 204 implementation—never transmitted over the network. Private PEMs use the compact 32-byte RFC 9881 seed-only PKCS#8 encoding accepted by OpenSSL 3.5+. For production code signing or CA roots, generate keys inside an HSM or air-gapped machine.