The Internet of Things runs on microcontrollers. ESP32 in smart plugs, STM32 in industrial sensors, nRF52 in BLE peripherals, MSP430 in battery-powered field gear, RP2040 in hobbyist designs. These devices typically have a few hundred kilobytes of RAM, a few megabytes of flash, and clock speeds in the tens to low hundreds of megahertz. They are connected: WiFi, BLE, LoRaWAN, Zigbee, Thread, and so on. And they need cryptography for TLS handshakes, secure boot, firmware updates, and device authentication.
When you map post-quantum cryptography onto this hardware, you find a mixed picture. ML-KEM and ML-DSA fit on most modern IoT MCUs. SLH-DSA is mostly impractical except for occasional offline operations. The details vary by chip family and by the specific algorithm parameters. This article walks through what actually fits where, focusing on the most popular IoT MCU families.
ESP32: WiFi-Connected Workhorse
The Espressif ESP32 family is the most popular IoT MCU in the world by volume. The original ESP32 has dual Xtensa LX6 cores at 240 MHz, 520 KB of SRAM, and external flash via SPI (typically 4 MB). The ESP32-S3 has dual LX7 cores at similar speeds, with SIMD extensions. The ESP32-C3 and C6 use single RISC-V cores. The newer ESP32-P4 has dual RISC-V cores at 400 MHz with FPU and vector extensions.
For PQC, the ESP32-S3 and P4 are the strongest contenders. Their SIMD or vector extensions speed up lattice arithmetic, and the chips have enough RAM to hold ML-DSA-44 or ML-DSA-65 keys and signatures comfortably.
Approximate ML-KEM-768 timings on ESP32-S3 at 240 MHz with optimized assembly:
- Keygen: ~2-3 ms
- Encapsulate: ~2-3 ms
- Decapsulate: ~2-3 ms
ML-DSA-44 on the same chip:
- Keygen: ~5-8 ms
- Sign: ~15-25 ms (median, with rejection sampling variance)
- Verify: ~5-8 ms
These are fast enough for typical IoT workloads. A device that does one TLS handshake per minute can comfortably afford 30 ms per handshake for the PQC parts.
The ESP-IDF (Espressif's official SDK) has been adding mbedTLS support that includes experimental ML-KEM. As of 2025-2026, ML-KEM-768 hybrid TLS is available with some flag-flipping, with broader integration coming as upstream mbedTLS adopts the FIPS 203 changes.
For background on ML-KEM, see our ML-KEM explained article.
STM32: The Industrial Standard
STMicroelectronics' STM32 family covers everything from tiny F0 series (Cortex-M0 at 48 MHz, 32 KB flash, 4 KB RAM) up through the H7 series (Cortex-M7 at 480 MHz, 2 MB flash, 1 MB RAM). For IoT, the most common parts are F4, L4 (low-power), and H7 series.
STM32F4 series at 168 MHz is the canonical pqm4 benchmark target. ML-KEM-768 takes about 6 ms per operation; ML-DSA-44 takes about 25 ms median for signing. STM32H7 at 480 MHz is roughly 3x faster.
STM32L4 series targets low-power applications. The same algorithms run there but at lower clock speeds (typically 80 MHz max), so timings are 2-3x slower than F4. For battery-powered devices that wake infrequently, this is acceptable: the device sleeps most of the time, wakes for a quick crypto operation, and goes back to sleep. The total energy spent on PQC is small.
STM32U5 series, with Cortex-M33 and TrustZone, is interesting for security-critical IoT. PQC running in the secure world (with keys never leaving the secure side) gives strong attestation guarantees. STMicroelectronics has been adding PQC support to its STM32Cube cryptographic library.
For more on memory budgets, see our PQC stack memory analysis article.
nRF52 and nRF53: Bluetooth Specialists
Nordic Semiconductor's nRF52 and nRF53 chips dominate the BLE space. They are Cortex-M4 (nRF52) or Cortex-M33 (nRF53) at 64 MHz, with 256-1024 KB of flash and 32-256 KB of RAM. The nRF53 is dual-core: an application core for the user code and a network core for the BLE stack.
PQC on nRF52 is workable but tight. ML-KEM-512 takes about 16 ms per operation at 64 MHz. ML-DSA-44 signing takes about 60 ms median. Stack RAM (about 10 KB for ML-DSA-44) is a real constraint when you also need to run the BLE stack and an application.
For BLE pairing, PQC over BLE is being explored in the LE Audio and security extensions. Bluetooth SIG has not yet standardized PQC for BLE, so any PQC use today requires application-level cryptography on top of the BLE link.
For low-frequency operations (firmware update verification, occasional device authentication), PQC on nRF52 works fine. For per-packet authentication on a high-rate BLE connection, the timing is too slow.
RP2040: Cheap and Cheerful
Raspberry Pi's RP2040 is a dual Cortex-M0+ at 133 MHz, with 264 KB of RAM and external QSPI flash (usually 2 MB on the Pico). It is cheap (~$1) and capable enough for many IoT applications, but the M0+ core lacks the DSP extensions of M4, which slows lattice PQC significantly.
ML-KEM-512 on RP2040 takes around 30-40 ms per operation. ML-DSA-44 signing takes around 100-150 ms median. These are bearable for occasional operations but not for frequent ones.
The RP2040's PIO (programmable I/O) blocks are not useful for accelerating PQC arithmetic, since PIO is designed for I/O state machines, not number crunching. Some research has explored using one core to do crypto while the other handles application logic, achieving roughly 2x throughput for parallel operations.
The next-generation RP2350 (Cortex-M33 with FPU, optionally TrustZone) is much more PQC-friendly. Early benchmarks suggest 5-10x faster lattice PQC than RP2040. RP2350 is the right RP-family target for new PQC-enabled designs.
Pico, ESP32, and the Hobby Reality
A lot of IoT projects are not professional products. They are hobby projects, art installations, home automation gadgets, and one-off prototypes. The cryptography on these projects is often whatever the framework provides: TLS via the platform library, no special PQC support.
For these projects, the PQC story is what the platform vendor ships. Once Espressif's IDF integrates ML-KEM-768 hybrid TLS by default, hobby ESP32 projects get post-quantum security automatically. Once Adafruit's CircuitPython adds PQC primitives, MicroPython and CircuitPython users get them. Once mbedTLS upstream stabilizes ML-KEM, all the platforms that depend on mbedTLS inherit the support.
The good news is that the integration work is happening. The bad news is that it takes years. Most existing IoT deployments will not get a PQC update; they will keep running ECC TLS until the device is replaced.
For background on the broader IoT context, see our PQC IoT smart home devices article.
Power Constraints
Power matters for battery-powered IoT. PQC operations cost more energy than ECC because the algorithms do more arithmetic and use more memory.
A rough comparison on a Cortex-M4 at 100 MHz:
- X25519 key agreement: ~5 mJ per operation
- ML-KEM-768 encapsulate: ~10-15 mJ per operation
- ML-DSA-44 sign: ~20-40 mJ per operation
- SLH-DSA-128s sign: ~10-20 J per operation (note: joules, not millijoules)
For a coin-cell battery with 600 mWh of total energy, doing one ML-DSA-44 sign per minute uses about 0.1 percent of the battery's lifetime energy per signature. For a device that signs once per hour or less, the impact is negligible. For a device that signs continuously, PQC limits battery life noticeably compared to ECC.
The right architecture for battery-powered IoT is to do PQC sparingly. Use a long-lived session key from a one-time PQC handshake to authenticate many subsequent symmetric-cipher operations. Keep PQC for handshakes, key rotation, and firmware updates; use AEAD ciphers for per-message protection.
SLH-DSA on IoT: Mostly Don't
Hash-based signatures (SLH-DSA, FIPS 205) are conceptually simple and have very strong security guarantees. The trade-off is performance and signature size.
On a Cortex-M4 at 168 MHz, SLH-DSA-128s signing takes about 56 seconds. SLH-DSA-128f takes about 18 seconds (with a much larger signature). These times are too slow for any realistic IoT workload. A device that needs to sign once per minute cannot use SLH-DSA, and a device that needs to sign less often probably has time but the user experience would be terrible.
SLH-DSA is acceptable for verification (about 9 seconds on M4 for SLH-DSA-128s verify), which is occasionally useful for checking firmware update signatures at boot. The boot delay is noticeable but tolerable for occasional updates.
The right pattern for IoT firmware update is:
- Build server signs firmware images with SLH-DSA (build server has unlimited time)
- Devices verify firmware updates with SLH-DSA at install time
- Per-message authentication uses ML-DSA, AEAD ciphers, or HMAC
For more on the SLH-DSA versus ML-DSA trade-off, see our ML-DSA versus SLH-DSA article.
Memory Pressure and the Stack
The biggest constraint on small IoT MCUs is RAM. A 32 KB SRAM chip cannot hold an ML-DSA-65 working set (about 14 KB stack) plus a TLS session state plus an application. For these chips, ML-KEM-512 and ML-DSA-44 are the only viable parameter sets, and even those leave little room.
Some implementations use external SRAM or QSPI memory for working set, paging in polynomial coefficients as needed. This works but is slow because external memory access adds tens of cycles per access.
For new IoT designs, plan for a chip with at least 64 KB of internal SRAM. 128-256 KB is much more comfortable and gives room for full TLS plus application code plus PQC.
For details on stack memory across schemes, see our PQC stack memory analysis article.
What This Means for QNSQY and IoT
QNSQY does not run on IoT microcontrollers. It runs on x86-64 computers with Linux or Windows. But the pattern QNSQY uses (ML-KEM plus X25519 with AES-256-GCM to encrypt, up to ML-KEM-1024, and ML-DSA to sign, up to ML-DSA-87 on paid plans) maps directly onto what IoT systems need for protecting firmware images and configuration data.
What QNSQY can do today is the build-server side: encrypt and sign firmware images, configuration and logs for storage and for transfer between your own systems. QNSQY files are decrypted and verified with QNSQY, so a device that must decrypt or verify an update itself needs a PQC library on the device and a format that library reads. On a Cortex-M4, that device-side work is light: AES-256-GCM decryption, ML-KEM decapsulation and ML-DSA verification each take milliseconds.
For background on hybrid encryption, see our hybrid encryption explainer.
FAQ
Can I run ML-KEM on an Arduino Uno? The classic Arduino Uno is an ATmega328P, an 8-bit AVR microcontroller. ML-KEM is technically possible but extremely slow (hundreds of milliseconds per operation, if it fits at all). For modern IoT, use a 32-bit MCU like ESP32, STM32, or RP2040.
Is ML-DSA fast enough for BLE? For occasional pairing or device authentication, yes. For per-packet authentication on a continuous BLE connection, no. Use a session key and AEAD cipher for per-packet protection.
Should I use SLH-DSA on IoT? Generally no, except for verification of long-term signed objects (firmware updates). The signing time is too long for runtime use. For runtime signatures, use ML-DSA.
Do I need PQC for my home automation project? For a project that talks to local devices over a private network, the threat model usually does not include nation-state quantum adversaries harvesting traffic. ECC TLS is fine. For projects that talk to cloud services or transmit sensitive data over the internet, plan to migrate to PQC TLS once your platform supports it.
Will my existing ESP32 project get a PQC update? If you are using the ESP-IDF and you can rebuild and reflash, yes. Once IDF integrates ML-KEM hybrid TLS by default, you can rebuild against the new SDK and your project gets PQC. Devices in the field that cannot be reflashed will stay on ECC TLS forever.
Sources
- NIST FIPS 203 (ML-KEM): https://csrc.nist.gov/pubs/fips/203/final
- NIST FIPS 204 (ML-DSA): https://csrc.nist.gov/pubs/fips/204/final
- NIST FIPS 205 (SLH-DSA): https://csrc.nist.gov/pubs/fips/205/final
- ARM Cortex-M Series Documentation: https://developer.arm.com/Processors/Cortex-M
- RISC-V International Specifications: https://riscv.org/technical/specifications/
- NIST SP 800-208 (Stateful Hash-Based Signatures): https://csrc.nist.gov/pubs/sp/800/208/final
Related Articles
- What is Post-Quantum Cryptography
- ML-KEM Explained
- Hybrid Encryption
- PQC IoT Smart Home Devices
- PQC Automotive V2X CAN Bus
- 6G Research and PQC: ITU-T and 3GPP Direction
- PQC on FPGA: Hardware Acceleration Patterns
- ACH Transfers and Post-Quantum Cryptography
- PQC on ASIC: Custom Silicon Trade-offs
Protect Your Data Before Q-Day Arrives
QNSQY's NIST-standardized post-quantum encryption protects files against both current and quantum-era threats.