← Back to section · Open Source Projects

Mbed TLS and the Embedded Road to Post-Quantum: ML-KEM in the 3.6 LTS and the Constraints of Small Devices

While servers are still debating migration roadmaps, the cryptographic libraries baked into routers, gateways and industrial devices already have to decide. This article looks at how Mbed TLS brought ML-KEM into its 3.6 LTS long-term support line, and how the constraints of small devices — RAM, flash and key sizes — shape what embedded PQC realistically looks like.

Published 22 November 2026 · 6 min read · PQ Frontier

Mbed TLS and the Embedded Road to Post-Quantum: ML-KEM in the 3.6 LTS and the Constraints of Small Devices
AI-generated site artwork
Video explainer · Cryptography Libraries: key exchange, maintained in public

Server-side post-quantum migration is debated with great enthusiasm, but the devices truly backed into a corner are embedded ones: an industrial gateway shipping today may run in the field for fifteen years. It has no option to “wait until the standard settles” — which cryptographic library it uses, and which algorithms it leaves the factory with, are decisions that must be made now. Mbed TLS is one of the most consequential open-source libraries in exactly this scenario.

Meet Mbed TLS

Mbed TLS is a TLS and cryptography library for embedded and IoT devices, written in C and designed from the start for small footprint, low memory usage and configurability. It began life as PolarSSL, was long led by Arm, and is now a TrustedFirmware.org community project, open-sourced under the Apache-2.0 licence (repository: github.com/Mbed-TLS/mbedtls). It provides TLS/DTLS protocol implementations plus a set of low-level cryptographic primitives, accessed from above through the PSA Crypto API — PSA being part of the Platform Security Architecture, whose aim is to offer cryptographic capability to applications and firmware through a stable interface with a replaceable implementation underneath.

For PQC, this background implies two things: whichever algorithms Mbed TLS carries directly determine the cryptographic foundation of a large population of long-lived devices for the next decade and more; and any new algorithm it adopts must first pass the “small device test” — size questions that desktop libraries can afford to ignore are veto items here.

What 3.6 LTS Brought: ML-KEM

Mbed TLS carries stable deployments on LTS (long-term support) branches, and 3.6 is the current LTS line. Version 3.6 introduced support for ML-KEM (FIPS 203, the standardised form of Kyber), offered through the PSA Crypto API and initially flagged as an experimental feature. The step matters more symbolically than as a feature list: a NIST-standard KEM entered a mainstream embedded LTS library for the first time, and device vendors no longer need to integrate research-grade testbed libraries to get PQC.

At the same time, note the difference in pace: the signature side is visibly slower than the KEM side. Mbed TLS had already added PSA support for LMS — a hash-based signature scheme aimed at firmware-signing scenarios — but ML-DSA’s arrival in the LTS line does not follow the same timetable as the KEM. The practical meaning for device vendors: key exchange can be swapped first, while signature and certificate-chain migration needs its own plan — which in fact matches the industry-wide rhythm of “hybrid KEM first, signatures later” on the server side as well.

The Real Constraints on Small Devices

Put ML-KEM into a microcontroller context and the constraints become concrete immediately (the following are the fixed parameters of FIPS 203):

Metric ML-KEM-512 ML-KEM-768 For comparison: X25519
Encapsulation key 800 bytes 1184 bytes 32 bytes
Ciphertext 768 bytes 1088 bytes 32 bytes
Shared secret 32 bytes 32 bytes 32 bytes

Public keys and ciphertexts grow from a few dozen bytes to over a thousand, and the knock-on effects are everywhere: TLS handshake messages get bigger and the fixed buffers of legacy protocol stacks need rework; once certificates eventually move to PQC signatures, their size inflation is more pronounced still; on chips with only a few dozen KB of RAM, the stack usage and temporary buffers of the computation must be accounted line by line (these are precisely the numbers that projects such as pqm4 and PQClean measure systematically on Cortex-M platforms — see the related articles on this site). Compute, by contrast, is not the main contradiction — the cycle counts of lattice arithmetic on Cortex-M parts are perfectly serviceable; what actually blocks deployment is memory and size.

Trimming and Agility: Mbed TLS’s Answer

Mbed TLS’s traditional strengths happen to be the right medicine here:

  • Compile-time configurability: algorithms, parameter sets and protocol features mostly have independent configuration switches, so a vendor can keep only ML-KEM-768, switch off unneeded parameter sets and algorithms, and press flash usage down to what the product can accept;
  • A uniform PSA API: applications call key exchange through the PSA interface, so when the layer underneath moves from a classical algorithm to ML-KEM — or to another parameter set later — application-layer changes are confined to configuration and policy. For firmware, a form of software that is very hard to recall in full once shipped, this kind of cryptographic agility is a hard requirement;
  • Configuration as documentation: the shipped capability set is determined by the build configuration, so an audit only needs to check the configuration to confirm what a device actually has enabled.

From the Crypto Layer to the TLS Layer: One Integration Step Remains

Two layers must be distinguished: ML-KEM entering PSA Crypto as a primitive, and a TLS handshake actually using PQC key exchange, still have a layer of protocol integration between them. Key exchange in TLS 1.3 is negotiated via named groups, and hybrid key exchange (classical ECDH combined with ML-KEM) is still advancing in draft form at the IETF; group identifiers and combination methods across ecosystems await convergence of standards and interoperability practice. Mbed TLS’s path is to lay the foundation first — algorithm implementation, PSA interface and configuration trimming in place — with TLS-layer group support following upstream releases step by step. For device vendors this means: today, ML-KEM at the PSA layer can already be used in controlled scenarios such as proprietary protocols and firmware update channels, while public TLS interoperability remains a watch item.

A second practical question is the update channel: server software can be updated at any time, while firmware updates are constrained by vendor release cadence and field conditions. This is exactly where an LTS branch earns its keep — the 3.6 line continues to receive security maintenance, so a vendor that locks onto this baseline can follow PQC-related fixes and refinements through minor updates over a period of years instead of migrating major versions every time. Judging Mbed TLS’s PQC status should therefore look at the continuing evolution of this LTS line, not at a feature snapshot at a single point in time.

Status and Limits

To state it fully: ML-KEM in 3.6 LTS is a “usable but handle with care” first step — the experimental flag means interfaces and implementation may still change, and before production, interoperability and side-channel behaviour should be verified item by item, with an eye on subsequent maintenance releases of the LTS branch. Vendors evaluating it should do three more pieces of homework: measure RAM and flash usage on their own target chip (official figures correspond to reference configurations); confirm that the chosen parameter set matches their own security goals and regulatory requirements rather than defaulting to a lower grade to save space; and write “replacing the signature algorithm later” into the product roadmap, so that after key exchange moves first, certificates and firmware signing are not left scrambling. The full picture of embedded PQC — PQC certificates, PQC signatures, firmware implementations of hybrid handshakes — is still being assembled. But the direction is beyond doubt: when even the most size-obsessed niche has begun the switchover, the migration clock is the same for everyone.

References

  1. The Mbed TLS repository. https://github.com/Mbed-TLS/mbedtls
  2. TrustedFirmware.org. https://www.trustedfirmware.org
  3. NIST, FIPS 203 (ML-KEM), 2024-08-13. https://csrc.nist.gov/publications/fips
  4. The pqm4 project. https://github.com/mupq/pqm4
  5. The PQClean project. https://github.com/PQClean/PQClean

Tags: Mbed TLSML-KEMembedded