ML-KEM key exchange
Run an ML-KEM-512, 768 or 1024 key exchange in your browser and see both sides arrive at the same shared secret.
1. Alice makes a key pair
She keeps the decapsulation key ( bytes) and publishes the encapsulation key.
2. Bob encapsulates a secret to it
He gets a 32-byte shared secret and a ciphertext to send back.
3. Alice decapsulates the ciphertext
With her private key she recovers the same secret. Nobody else can.
About this tool
ML-KEM is the post-quantum key encapsulation mechanism standardized by NIST in FIPS 203, based on CRYSTALS-Kyber. It lets two parties agree on a shared secret in a way that is believed to resist attacks by quantum computers.
Pick ML-KEM-512, 768 or 1024 and run one exchange: Alice makes a key pair, Bob encapsulates a 32-byte secret to her public key, and Alice decapsulates it. The page shows every key and ciphertext, so you can see their sizes and check that both secrets match.
Questions
- Which parameter set should I use?
- ML-KEM-768 is the general-purpose choice and the one most deployments use. ML-KEM-512 is smaller and faster, and ML-KEM-1024 gives the highest security margin.
- Does ML-KEM encrypt my data?
- No. It only agrees on a 32-byte shared secret. That secret is then used as the key for a symmetric cipher such as AES-GCM.
- Is my input sent to a server?
- No. The page loads a compiled Dart engine into a Web Worker and does all the work in your browser tab. Nothing you type or drop in is uploaded, and the tools keep working offline once the page has loaded.