Explore the KiviPQC-KEM IP Core
Compare Tiny and Fast, review FPGA implementation results, and see how the core connects to your host software.
Learn how ML-KEM establishes a shared secret and what it takes to implement it in embedded systems.
Content
1. Why do embedded systems need post-quantum key exchange?
When an embedded device sends data to the cloud, another device, or connects to a network, it needs to protect the information it exchanges by setting up an encrypted connection. Both parties first establish a shared secret which is used to derive encryption keys. These keys turn readable data (plaintext) into unreadable data (ciphertext) and allow the receiving side to turn it back into plaintext. This keeps the exchanged data confidential, since only someone with the right key can read it.
ML-KEM is the Module-Lattice-Based Key Encapsulation Mechanism which lets two endpoints establish a shared secret over a public network. Derived from CRYSTALS-Kyber and standardized by NIST in FIPS 203, ML-KEM provides a post-quantum option for key establishment.
This article explains how it works, where it is used, and what developers need to consider when implementing it in software or on an FPGA-based system.
Many systems today use Elliptic Curve Diffie–Hellman (ECDH) to establish a shared secret. Each endpoint combines its own private key with the other endpoint’s public key to compute the same secret. With suitable parameters, recovering that secret from the public information is considered computationally infeasible for classical computers. A sufficiently capable quantum computer running Shor’s algorithm would change that assumption.
An attacker can record encrypted traffic and public handshake values today and attempt to recover the session keys later. This is known as the harvest now, decrypt later scenario. For a long-lived embedded system, two timelines matter: how long the device will be deployed and how long the data it transmits must remain confidential. If you want to learn more about this, read about why post-quantum cryptography matters for embedded systems.
ML-KEM is a public-key mechanism that lets two endpoints establish the same secret without transmitting the secret itself. One endpoint uses a public encapsulation key to produce a shared secret and a ciphertext. The endpoint holding the corresponding private decapsulation key processes the ciphertext to obtain the same secret.
The shared secret is the starting point for deriving session keys. A communication protocol can feed the shared secret into a key derivation function so that both endpoints can independently derive the keys that protect their traffic. For example, the protocol can derive one key for messages from the device to the server and another for messages in the opposite direction. These keys can be used to encrypt application data and detect tampering in transit.
The protocol also defines how each endpoint verifies who it is communicating with. In a deployment that uses a public key infrastructure (PKI), certificates can support peer authentication. Digital signatures such as ML-DSA can be used where the protocol and its configuration support them.
Read how ML-DSA digital signatures work.
ML-KEM is based on the third-round CRYSTALS-Kyber submission to NIST’s post-quantum cryptography standardization project. CRYSTALS-Kyber is the name of the original submission, while ML-KEM is the name of the standardized algorithm defined in FIPS 203. This is why you’ll often see “Kyber” in earlier papers and documentation and “ML-KEM” in references to the final standard.
FIPS 203 specifies a 32-byte shared secret for all three ML-KEM parameter sets. It also changes how the algorithm validates inputs and derives the shared secret compared with the earlier Kyber submission. If you’re evaluating a library or a hardware IP core, check whether it implements the final FIPS 203 specification or an earlier version of Kyber.
FIPS 203 defines three operations. The communication protocol determines which endpoint performs each one.
FIPS 203 defines three operations (Key Generation, Encapsulation and Decapsulation). The parties exchange an encapsulation key and a ciphertext. Each obtains the same shared secret locally.
The three ML-KEM parameter sets differ in NIST security category and in the sizes of their keys and ciphertexts. FIPS 203 recommends ML-KEM-768 as the default. For a particular deployment, the protocol profile and security requirements guide the choice.
| Parameter set | ML-KEM-512 | ML-KEM-768 | ML-KEM-1024 |
|---|---|---|---|
| NIST security category | 1 | 3 | 5 |
| Encapsulation key | 800 bytes | 1,184 bytes | 1,568 bytes |
| Decapsulation key | 1,632 bytes | 2,400 bytes | 3,168 bytes |
| Ciphertext | 768 bytes | 1,088 bytes | 1,568 bytes |
| Shared secret | 32 bytes | 32 bytes | 32 bytes |
With ML-KEM-768, the encapsulation key and ciphertext together account for 2,272 bytes when both are transmitted. The complete handshake can also include protocol headers, authentication data, and a classical key exchange component in a hybrid design. On the device, the private key and intermediate values contribute to local memory requirements. The amount of working memory depends on how ML-KEM is implemented.
Start with the expected connection rate and the time budget for each handshake. Software may be sufficient if the processor meets both requirements within the available memory budget. If ML-KEM takes up too much CPU time or delays connection setup, FPGA offload is worth evaluating. Compare CPU load and end-to-end handshake latency on the target system, and account for the logic and memory resources the core would use.
In a host-controlled FPGA design, the protocol stack runs on the processor and calls the IP core for the cryptographic operations. KiviPQC-KEM IP Core supports KeyGen, Encaps, and Decaps for all three FIPS 203 parameter sets. The host accesses the core over AMBA AXI4-Lite. KiviCore provides platform-independent C code, a hardware abstraction layer, drivers, and integration examples.
| KiviPQC-KEM variant | Design priority | What to check on the target system |
|---|---|---|
| Tiny | Lower logic utilization | Whether the core fits alongside the existing FPGA design and meets the connection setup requirements |
| Fast | Faster ML-KEM processing | Whether shorter operation times improve handshake latency or connection capacity within the available FPGA resources |
Both variants support all three parameter sets. The protocol and security requirements guide the choice of parameter set. The resource and performance budgets guide the choice of core variant.
Compare Tiny and Fast, review FPGA implementation results, and see how the core connects to your host software.
ML-KEM establishes a shared secret that a communication protocol can use to derive the keys that protect traffic. For an embedded system, start with the parameter set that meets the protocol and security requirements. Then evaluate how that choice affects handshake size, working memory, and CPU load. On an FPGA-based SoC, measurements of the full connection setup help determine whether hardware offload fits the design.