Learn
Why post-quantum
A large enough quantum computer could break RSA and elliptic-curve cryptography, which protect most key exchanges and signatures today. Data captured now could be decrypted later. ML-KEM and ML-DSA are built on lattice problems that are not known to be vulnerable to quantum computers, and NIST standardized them in 2024.
Key exchange with ML-KEM
ML-KEM is a key-encapsulation mechanism. The recipient publishes a public key. The sender runs encapsulate with it and gets two things: a ciphertext to send, and a 32-byte shared secret to keep. The recipient runs decapsulate on the ciphertext with their private key and gets the same secret. Both sides can then use it to derive encryption keys.
If the ciphertext was changed, or made for someone else's key, decapsulation still returns 32 bytes, just not the sender's secret. This is called implicit rejection. It stops an attacker from learning anything by sending modified ciphertexts and watching for errors.
ML-KEM on its own does not tell the recipient who sent the ciphertext. Combine it with a signature or another form of authentication for that.
Signatures with ML-DSA
A signature shows that the holder of a private key approved some exact bytes. Verification checks the signature against the public key and those bytes. Change one byte of the message and verification fails.
PQCSmith signs text as its exact UTF-8 bytes. It does not normalize accents, line endings or spaces, so text copied through different systems may need care. Files are signed byte for byte.
Signing is hedged: each signature mixes in fresh randomness, so signing the same message twice gives two different signatures. Both verify. This protects against some fault and side-channel attacks.
A valid signature proves the bytes match the key. It does not prove who owns the key. Decide that separately, for example by getting the public key from its owner through a channel you trust.
Seeds and expanded private keys
An ML-DSA private key can be stored as a 32-byte seed or as a 4,032-byte expanded key for ML-DSA-65. The seed regenerates the full key exactly; the expanded key cannot be turned back into a seed. PQCSmith exports seeds by default, as RFC 9881 and RFC 9935 recommend, and offers expanded keys for tools that need them.
A worked example: sign offline, verify anywhere
- Open PQCSmith once while online so it can install itself for offline use.
- Disconnect from the network.
- In the key generator, create an ML-DSA-65 key pair.
- In Sign, choose that key and a file, then sign it.
- Download the signature and the public key.
- On another device or in another implementation, verify the signature against the public key and the same file. PQCSmith's own Verify tool works too.