ML-KEM KeyGen (FIPS 203)
Post-Quantum Lattice-based Key Encapsulation Mechanism keypair generator
Overview
Generates a post-quantum lattice-based Key Encapsulation Mechanism (KEM) keypair using ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism, derived from CRYSTALS-Kyber) as standardized in NIST FIPS 203.
Supports all three FIPS 203 parameter sets:
ML-KEM-512(NIST Security Level 1, equivalent to AES-128): 800-byte encapsulation public key, 1,632-byte decapsulation secret key.ML-KEM-768(NIST Security Level 3, equivalent to AES-192, default): 1,184-byte public key, 2,400-byte secret key.ML-KEM-1024(NIST Security Level 5, equivalent to AES-256): 1,568-byte public key, 3,168-byte secret key.
When to Use
- Generating quantum-resistant encapsulation/decapsulation keypairs for ML-KEM Encapsulate and ML-KEM Decapsulate.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
Security Levelvariant |
selectDefault: 768 |
Always visible | Selects the FIPS 203 security parameter set: 512 (Level 1), 768 (Level 3, recommended default), or 1024 (Level 5).
|
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
This node has no input ports.
Output Ports
Port Nature: Fixed Output Ports (2 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Public Key |
publicKey |
Bytes |
Always visible | ML-KEM encapsulation public key (800B for 512, 1184B for 768, 1568B for 1024) distributed to senders. |
Secret Key |
secretKey |
Bytes |
Always visible | ML-KEM decapsulation secret key (1632B for 512, 2400B for 768, 3168B for 1024) kept private by the recipient. |
Error Cases
This node has no runtime failure cases (errorProfile: none) and always succeeds for any valid typed input.
Examples
Generating an ML-KEM-768 Keypair
Create a NIST Level 3 post-quantum KEM keypair.
- Leave Security Level set to
ML-KEM-768 (NIST Level 3). - Wire
Public Keyto ML-KEM Encapsulate andSecret Keyto ML-KEM Decapsulate.