Skip to content

FIPS 203

ML-KEM: Module-Lattice-Based Key-Encapsulation Mechanism Standard.

ML-KEM is the NIST-standardized key encapsulation mechanism used to establish shared secrets over a public channel.

Workflow

ML-KEM.KeyGen
RandomnessGenerate randomnessd, z
ConstructionGenerate PKE keysK-PKE.KeyGen
ConstructionAssemble KEM keysek, dk
Public outputPublic keyek
Private outputPrivate keydk
  • Generate randomness to Generate PKE keys: d
  • Generate randomness to Assemble KEM keys: z
  • Generate PKE keys to Assemble KEM keys: ek_PKE, dk_PKE
  • Assemble KEM keys to Public key: ek
  • Assemble KEM keys to Private key: dk

Interactive Algorithm Trace

FIPS 203 algorithm trace

ML-KEM Encapsulation & Decapsulation
1 / 4
Algorithm 20ML-KEM.Encaps(ek)\mathrm{ML\text{-}KEM.Encaps}(\mathrm{ek})
InputsekGeneratem (32 bytes)CallEncaps_internal

ML-KEM.Encaps (Algorithm 20) supplies checked ek and internally generated m.

Algorithm 17

FIPS 203
Input
ek, m (32 bytes)
Established valuesValues remain available after their defining step
ekInput
mInput
Algorithm 17 / InputsInitialize encapsulation · 1 / 4

The public interface samples m internally. It is encapsulation randomness, not an application message.

ML-KEM Operations

Run key generation, encapsulation, and decapsulation locally in the browser.
Key GenerationInput: parameter set. Output: public key and private key.

Key generation uses the selected parameter set and does not require external input.

Operation OutputInitializing
Public key
not generated
Private key
not generated
Ciphertext
not generated
Shared secret
not generated
Cryptographic implementation:@noble/post-quantumMIT License

Quick Parameters

Primary References