ML-DSA Sign & Verify Online | Post-Quantum Signatures (FIPS 204)
Digital Signatures How It Works
This tool runs the full FIPS 204 (ML-DSA) workflow in your browser using the @noble/post-quantum library, loaded as a separate lazy chunk. Generate a key pair for any of the three parameter sets (ML-DSA-44/65/87), sign a message with the secret key, then verify the signature with the public key — all locally, no data leaves your device. Post-quantum keys and signatures are larger than classical ones (1–5 KB), so the tool validates every input against exact FIPS 204 byte lengths and supports both hex and Base64 encoding.
Parameter Set Comparison
| Parameter Set | Security Level | Public Key | Secret Key | Signature Size | Best for |
|---|---|---|---|---|---|
| ML-DSA-44 | 128-bit | 1312 bytes | 2560 bytes | 2420 bytes | Bandwidth-constrained, IoT |
| ML-DSA-65 | 192-bit | 1952 bytes | 4032 bytes | 3309 bytes | General-purpose (recommended) |
| ML-DSA-87 | 256-bit | 2592 bytes | 4896 bytes | 4627 bytes | Top-secret-grade, maximum security |
Code Examples
Generate ML-DSA key pair and sign with @noble/post-quantum:
// Browser — ML-DSA-65 sign & verify
import { mldsa65 } from '@noble/post-quantum/ml-dsa.js';
// Generate key pair
const seed = crypto.getRandomValues(new Uint8Array(32));
const { publicKey, secretKey } = mldsa65.keygen(seed);
// Sign
const message = new TextEncoder().encode('message to sign');
const signature = mldsa65.sign(secretKey, message);
// Verify
const isValid = mldsa65.verify(publicKey, message, signature);
console.log('Signature valid:', isValid);
console.log('Public key size:', publicKey.length, 'bytes'); // 1952
console.log('Signature size:', signature.length, 'bytes'); // 3309 # Python — ML-DSA-65 with pqcrystals
from pqcrystals.ml_dsa.ref.ml_dsa65 import keygen, sign, verify
# Generate key pair
public_key, secret_key = keygen()
# Sign
message = b"message to sign"
signature = sign(secret_key, message)
# Verify
is_valid = verify(public_key, message, signature)
print(f"Signature valid: {is_valid}") Security Notes
- All computation stays local — key generation and signing run via audited pure-JS code; no key material ever leaves the browser.
- ML-DSA signing is randomized — signing the same message twice produces different signatures; this is by design and does not affect verification.
- Use FIPS 204 validated implementations for production — this tool is designed for education and prototyping; integrate through a validated library for real deployments.
- Never reuse signing keys across protocols — derive protocol-specific keys with HKDF or a similar KDF before use.
- Account for larger key and signature sizes — ML-DSA-65 uses 1.9 KB public keys and 3.3 KB signatures; ensure your network and storage can handle the bandwidth.
Related Tools
Need classical signatures instead? Try the Ed25519 Sign/Verify tool for fast, compact signatures. For post-quantum key encapsulation, see the ML-KEM Key Encapsulation tool. You can also generate classical key pairs with the RSA Key Generator.
Frequently Asked Questions
Which parameter set should I choose?
ML-DSA-44 targets 128-bit security (comparable to AES-128), ML-DSA-65 targets 192 bits, and ML-DSA-87 targets 256 bits. ML-DSA-65 is the practical default for most applications, balancing key size and security margin. Use ML-DSA-44 where bandwidth is extremely constrained, and ML-DSA-87 for top-secret-grade margins or when you want the largest safety buffer against future lattice algorithm improvements.
Is this tool safe to use for real signatures?
All key generation and signing happens locally in your browser using the audited @noble/post-quantum library — no key material ever leaves your device. However, this tool is designed for education, prototyping, and verification. For production use, integrate ML-DSA through a FIPS 204 validated library and proper key management infrastructure. Never reuse signing keys across different protocols without a key derivation step.
What input formats are supported for keys and messages?
Keys and signatures accept both hexadecimal and Base64 encoding — the tool auto-detects which one you paste. Messages can be entered as plain text, hex bytes, or Base64 binary data. Select the input format before signing to ensure the tool hashes the exact bytes you intend.
How do I verify a signature from another tool?
Paste the signer's public key, the original message (in the same format used for signing), and the signature. The tool validates all inputs against exact FIPS 204 byte lengths before verification. If verification fails, check that the parameter set (44/65/87) matches what was used to sign, and that the message encoding is identical.
What should I do if key generation is slow?
ML-DSA key generation involves sampling from lattice distributions, which is computationally heavier than classical ECC. ML-DSA-87 takes noticeably longer than ML-DSA-44. If you experience delays, ensure your browser is up to date — modern JavaScript engines optimize the polynomial arithmetic. For batch key generation, consider using a native library instead of the browser.
Privacy: This tool runs entirely in your browser — nothing is uploaded or stored. · Disclaimer: For educational purposes only. Not professional security advice.
More in Signatures
Digital Signature & Verify
Create and verify digital signatures online with RSA (PSS, PKCS#1 v1.5) or ECDSA (P-256, P-384, P-521, secp256k1). Text/hex/Base64 input.
Ed25519 Sign / Verify
Sign and verify with Ed25519 or Ed25519ph (EdDSA) online. PEM and raw hex keys, built-in key pair generator, public key derivation.
JWT Signer & Verifier
Sign, parse, and verify JWT (JSON Web Token) online. HS/RS/PS/ES algorithms, decode header and payload, claims breakdown, expiration checks.