RandomKeygen
Free · Private · Client-sideGenerated locally — never transmitted

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.

Standard & OID

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…

NIST Category 5 (~AES-256 security) — required by NSA CNSA 2.0 for code, cert & document signing

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

AlgorithmQuantum Safe?Public KeySignatureBest Fit
Ed25519 / P-256No32–64 B64 BExisting SSH/WebAuthn until PQ auth rolls out
RSA-4096No512 B512 BLegacy PKI compatibility
ML-DSA-44Yes (Level 2)1,312 B2,420 BSize-sensitive PQ certificates & tokens
ML-DSA-65Yes (Level 3)1,952 B3,309 BBalanced commercial PKI & API signing
ML-DSA-87Yes (Level 5 · CNSA 2.0)2,592 B4,627 BNSA 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.pem

Extract SPKI public key (also verifies PEM downloaded above)

$openssl pkey -in ml-dsa-87-private.pem -pubout -out ml-dsa-87-public.pem

Create a detached ML-DSA signature over an artifact

$openssl pkeyutl -sign -inkey ml-dsa-87-private.pem -rawin -in release.tar.gz -out release.sig

Verify the detached ML-DSA signature

$openssl pkeyutl -verify -pubin -inkey ml-dsa-87-public.pem -rawin -in release.tar.gz -sigfile release.sig
mldsa.ts
import { 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 bytes

Related Post-Quantum & Signing Tools

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

01
Choose an ML-DSA parameter set
Pick ML-DSA-87 (default) for NSA CNSA 2.0 compliance and Category 5 security, or ML-DSA-65 for general commercial signing with smaller 3.3 KB signatures.
02
Export RFC 9881 PEM or raw bytes
Download standard SPKI public keys and compact 32-byte PKCS#8 seed private keys accepted directly by OpenSSL 3.5+.
03
Sign and verify locally
Use the interactive signature playground below to sign any message, inspect real FIPS 204 signature sizes, and test tamper detection.

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.