← Back to section · Industry Applications

Post-Quantum Cryptography on Constrained Devices: Memory, Bandwidth and Firmware Signing

On Cortex-M4-class microcontrollers, ML-KEM is proven feasible by the pqm4 benchmarks. The real constraints are memory and bandwidth budgets, the firmware-signing trade-off, and what to do with devices that can never be upgraded.

Published 22 November 2026 · 5 min read · PQ Frontier

Post-Quantum Cryptography on Constrained Devices: Memory, Bandwidth and Firmware Signing
AI-generated illustration by PQ Frontier
Video explainer · IoT Security: hash-based signatures on constrained devices

First, a Misconception: Compute Is Usually Not the Problem

The instinctive reaction to post-quantum algorithms on a microcontroller is “it won’t have the cycles”. The community benchmark project pqm4 — dedicated to evaluating post-quantum schemes on the ARM Cortex-M4 — shows the opposite for the algorithms that matter most: lattice KEMs such as ML-KEM are dominated by integer polynomial arithmetic and run in the millisecond range on mainstream IoT MCUs. Compute is rarely the scarce resource. Three other things are.

Three Budgets to Count

Budget Typical pressure point Mitigations
Memory ML-KEM working memory is measured in kilobytes competing with the protocol stack and RTOS for the same RAM; peak usage depends on whether the implementation is memory-optimized Choose the memory-optimized implementation variants catalogued by pqm4; allocate statically and avoid runtime heap use
Bandwidth An ML-KEM-768 public key is 1,184 bytes and the ciphertext 1,088 bytes — on LoRa or NB-IoT class links that means more fragmentation and longer airtime Perform key establishment where link conditions are good (e.g. at the gateway); use session resumption and key caching to cut full handshakes
Flash and signature size SLH-DSA signatures start at 7.8 KB — a real increment for firmware image size and the OTA channel Pick the signature scheme per scenario (next section); budget OTA fragmentation and resume for large signatures

The engineering conclusion: PQC on constrained devices is a resource-orchestration problem, not an algorithm-feasibility problem. Measure each device class’s three budgets first, then choose algorithms and parameter sets.

Firmware Signing: The First Thing to Migrate

If key exchange defends against store-now-decrypt-later, firmware signing defends against something more direct: in the quantum era, a forged signature means an attacker can push arbitrary firmware to an entire device fleet. Signature verification runs at every update across the device’s life, and once the root of trust is burned into ROM or one-time fuses, replacing it later is extremely costly. The industry consensus follows: on newly designed devices, firmware signing should migrate before anything else. The candidate trade-off:

  • LMS / XMSS (stateful hash-based signatures, RFC 8554 / RFC 8391): small signatures and fast verification, endorsed by NIST SP 800-208. The cost is strict one-time-key state management on the signing side — state reuse is catastrophic. That fits firmware signing well, because signing is centralized at the vendor under controlled processes.
  • SLH-DSA (FIPS 205): stateless and simple to manage, with security resting only on the hash function. The cost is size (7.8–49.9 KB signatures) and slow signing — both tolerable for infrequent firmware releases, since devices only pay the verification and storage side.

Rule of thumb: choose LMS/XMSS for small signatures when the signer’s state management is trustworthy; choose SLH-DSA when deployment simplicity and long-term conservatism matter more.

Choosing the Key-Establishment Algorithm

Within the KEM itself, the constrained setting also discriminates between algorithm families. ML-KEM’s combination of kilobyte-scale keys and fast polynomial arithmetic is what makes it the default choice at this tier. By contrast, code-based Classic McEliece offers very small ciphertexts but public keys measured in the hundreds of kilobytes — a poor fit for devices that must store or transmit keys over narrowband links, though it can still suit a powerful gateway talking to many simple endpoints. Hash-based and stateful schemes do not compete here at all, since they solve the signature problem rather than key establishment. The practical shortlist for a Cortex-M-class device is therefore short — usually ML-KEM at the 512 or 768 parameter set, chosen by the security category the deployment targets — and pqm4’s per-scheme speed and stack-usage tables are the right place to confirm the choice against your exact part. Exact figures vary by implementation and clock speed, so treat published numbers as planning inputs and re-measure on your own hardware before committing a design.

Devices That Can Never Be Upgraded: An Isolation Strategy

Every real fleet contains devices with neither the headroom nor the update channel to migrate. For these, the honest strategy is to accept that they will not migrate and cap the risk instead:

  1. Network isolation. Place non-upgradable devices in dedicated segments that may only talk to designated gateways, with no lateral access.
  2. Gateway compensation. Terminate the classical protocol at the gateway and use post-quantum-protected channels outward, converging the exposure onto upgradable gateways.
  3. Scheduled retirement. Record a cryptographic expiry date for each such device in the asset register, align it with the depreciation cycle, and retire on schedule rather than extending indefinitely.

Manufacturing: The Root of Trust Is Fixed on the Production Line

A constrained device’s cryptographic posture is largely decided on the production line. Where each device’s identity keys are generated, who injects them, and in what form the root certificate is written determine whether any migration room remains later: a root of trust fixed in mask ROM locks the algorithm choice at tape-out, while a root held in an updatable bootloader region at least preserves a path to replacing the verification algorithm. Provisioning also carries a security and cost ledger of its own. Generating keys centrally in a line-side HSM and injecting them into devices is controllable, but the injection channel itself becomes an attack target; having each device generate its key pair on first power-up and export only the public key distributes the trust anchor across the fleet, but demands a manufacturing process that reliably registers public-key fingerprints. For device classes expected to serve a decade or more, this accounting belongs at design time: reserving an updatable channel for the root of trust and larger storage partitions for key material costs very little at manufacture, and it is precisely what decides whether migration is possible at all.

References

  1. pqm4 project (post-quantum benchmarks on Cortex-M4). https://github.com/mupq/pqm4
  2. NIST, FIPS 203 (ML-KEM) and FIPS 205 (SLH-DSA), 2024-08-13. https://csrc.nist.gov/publications/fips
  3. NIST, SP 800-208 (recommendation for stateful hash-based signature schemes). https://doi.org/10.6028/NIST.SP.800-208
  4. RFC 8554 (LMS) and RFC 8391 (XMSS). https://www.rfc-editor.org

Tags: IoTCortex-M4firmware signingML-KEM