Stephanie Anne Timmer

Chapter 8

Constrained and Embedded Device Migration

PQC at the Physical Edge

Most PQC migration guidance assumes enterprise hardware: servers with gigabytes of RAM, modern CPUs with cryptographic acceleration, reliable network connectivity, and the ability to push software updates on demand. A large and growing portion of the federal attack surface does not look like that at all.

IoT sensors, programmable logic controllers, SCADA remote terminal units, embedded navigation systems, and single-board computers operate under severe constraints: kilobytes of RAM rather than gigabytes, microcontrollers running at tens or hundreds of megahertz rather than multicore server CPUs, battery power budgets measured in milliampere-hours, and physical deployment in locations where a firmware update requires a truck roll. These devices face the same quantum cryptographic threat as enterprise servers — but cannot follow the same migration playbook.

This chapter covers what actually works at the constrained edge: which PQC algorithms are feasible on which hardware classes, the gateway architecture pattern that allows severely constrained devices to benefit from PQC-quality key material without running quantum-safe algorithms locally, SCADA and ICS-specific security considerations, and a hands-on lab exercise demonstrating PQC on a Raspberry Pi.

What You Will Learn
RAM, compute, power, and connectivity constraints that govern embedded PQC feasibility.
Which PQC parameter sets are achievable on ARM Cortex-M4, Cortex-A class, and Raspberry Pi hardware.
The gateway architecture pattern for severely constrained devices.
SCADA, ICS, and OT-specific security considerations for PQC migration.
Lab exercise: install liboqs on a Raspberry Pi, benchmark ML-KEM, and establish a hybrid TLS connection.

8.1 The Constrained Hardware Challenge: RAM, Compute, Power

Before selecting a PQC migration approach for any embedded device, you need to know which constraints actually bind. Not all constrained devices are constrained in the same way. A Raspberry Pi 4 with 4 GB of RAM is constrained relative to a server but is fully capable of running all NIST PQC algorithms at acceptable performance. A Cortex-M4 microcontroller with 256 KB of RAM faces fundamentally different constraints. A battery-powered LoRaWAN sensor node with 64 KB of RAM and a sub-mW power budget is in a completely different category again.

The Four Constraint Dimensions

ConstraintImpact on PQCKey Question
RAMML-KEM-768 needs ~3 KB working memory. ML-DSA-65 signing needs ~38 KB. ML-DSA-87 needs ~56 KB. Devices with < 64 KB RAM cannot run ML-DSA signing without careful memory management or algorithm selection.How much RAM is available for cryptographic operations?
ComputeML-KEM-768 key generation takes ~1.2 ms on Cortex-M4 at 168 MHz — acceptable. ML-DSA-65 signing takes ~9.8 ms. For real-time control systems with strict timing requirements, signing latency must be evaluated against the control loop period.What is the maximum acceptable cryptographic operation latency?
PowerML-KEM-768 encapsulation consumes approximately 22 μJ on Cortex-M4 at 3.3V. Battery-powered devices performing frequent key exchange may see measurable battery life reduction. AES-256-GCM encryption of a 1 KB payload uses only 0.8 μJ.What is the device’s power budget for cryptographic operations?
ConnectivityPQC key sizes are larger than classical equivalents. ML-KEM-1024 public keys are 1,568 bytes. On low-bandwidth links (LoRaWAN: 250 bps – 50 kbps; LPWAN; RS-485), key material transmission time may be a bottleneck.What is the available bandwidth on the device’s communication link?

Device Class Reference

Device ClassExample DevicesTypical RAMClock SpeedPQC Feasibility
Class A — Full capabilityRaspberry Pi 4/5, Intel NUC, embedded Linux SBCs1–8 GB1.0–2.0 GHzFull PQC suite. All NIST algorithms at all parameter levels. Run liboqs or OpenSSL 3.5 directly.
Class B — Linux capableRaspberry Pi Zero 2W, BeagleBone, older SBCs256–512 MB400–700 MHzFull PQC suite with performance caveats. ML-DSA signing is slow (~100–300 ms). Suitable for session-establishment operations, not high-frequency signing.
Class C — RTOS / bare metal (capable)STM32H7, NXP i.MX RT, Cortex-M7512 KB – 1 MB RAM100–600 MHzML-KEM-512/768 feasible. ML-DSA-65 feasible with careful RAM management. Gateway pattern recommended for ML-DSA-87.
Class D — Microcontroller (constrained)STM32F4 (Cortex-M4), Nordic nRF5264–256 KB RAM64–168 MHzML-KEM-512/768 feasible. ML-DSA-65 marginal (38 KB RAM). ML-DSA-87 not feasible. FN-DSA-512 preferred for signing. Gateway pattern recommended.
Class E — Ultra-constrainedATmega, MSP430, low-power IoT MCUs2–32 KB RAM8–32 MHzClassical PQC algorithms not feasible. Gateway pattern required. AES-256 symmetric operations are feasible.

8.2 PQC Algorithm Selection for Constrained Devices

Chapter 4 provided the master algorithm decision table for enterprise environments. This section provides the constrained-device overlay: which algorithms are feasible at which device class, and what the engineering tradeoffs are.

Key Exchange on Constrained Hardware

AlgorithmRAM (KB)Time (ms, Cortex-M4)Energy (μJ)Feasible ClassNotes
ML-KEM-512 KeyGen2.50.812C, D, E (marginal)Level 1 security. Not CNSA 2.0. Suitable for low-power IoT where Level 1 is acceptable.
ML-KEM-512 Encaps2.51.015C, D, E (marginal)Smallest PQC key exchange. Public key: 800 bytes.
ML-KEM-768 KeyGen3.01.218C, DLevel 3 security. FCEB standard. Public key: 1,184 bytes.
ML-KEM-768 Encaps3.01.522C, DBest balance of security and size for constrained devices.
ML-KEM-1024 KeyGen4.02.132C, D (marginal)CNSA 2.0 required. Public key: 1,568 bytes. Verify RAM headroom.
ML-KEM-1024 Encaps4.02.639C, D (marginal)Acceptable latency even on constrained hardware for session establishment.
X25519 (classical, reference)< 10.46All classesClassical reference. Faster and smaller but quantum-vulnerable.

Signing on Constrained Hardware

AlgorithmRAM (KB)Sign (ms)Verify (ms)Sig Size (bytes)Feasible ClassNotes
ML-DSA-44286.13.42,420C, D (marginal)Level 2. Not recommended for new deployments. Memory tight on Class D.
ML-DSA-65389.85.23,309C, D (tight)Level 3. FCEB standard. 38 KB RAM requirement excludes many Class D devices.
ML-DSA-875614.27.84,627C onlyCNSA 2.0. 56 KB RAM requirement excludes Class D. Gateway pattern for Class D/E.
FN-DSA-512126.43.2666C, DLevel 1. Compact signatures ideal for bandwidth-constrained links. RAM-efficient.
FN-DSA-10242212.16.01,280C, D (marginal)Level 5. Still smaller signatures than ML-DSA. Good for CNSA 2.0 scope + bandwidth constraint.
SLH-DSA-SHA2-128f88202817,088C, D (verify only)Verify only on constrained devices — signing too slow for real-time use. Large signature size a concern.
ECDSA P-256 (classical reference)< 10.81.264All classesClassical reference. Fast and small but quantum-vulnerable.

Algorithm Selection Decision Guide for Constrained Devices

Use the following decision sequence for each constrained device in your CBOM:

  1. Determine the device class (A through E) using the table in Section 8.1.
  2. For Class A and B: deploy standard PQC (ML-KEM-768 or ML-KEM-1024, ML-DSA-65 or ML-DSA-87) using liboqs or OpenSSL 3.5. No special accommodation required.
  3. For Class C: ML-KEM at all parameter levels is feasible. ML-DSA-65 is feasible. ML-DSA-87 requires careful RAM profiling. FN-DSA-512 is preferred for signing if bandwidth is constrained.
  4. For Class D: ML-KEM-768 for key exchange is the standard choice. For signing, choose between ML-DSA-65 (if 38 KB RAM is available) and FN-DSA-512 (if RAM is tight or bandwidth is constrained). ML-KEM-1024 and ML-DSA-87 require gateway pattern for CNSA 2.0 compliance.
  5. For Class E: Gateway pattern required. The device handles AES-256-GCM symmetric encryption using keys delivered by the gateway. No asymmetric PQC operations run on the device itself.
The Symmetric Key Bridge
For Class E devices that cannot run any PQC asymmetric operations, the migration path is: (1) establish PQC-secured communication between the gateway and the backend, (2) deliver AES-256 session keys to the edge device over a physically secured or short-range link, (3) the device uses AES-256-GCM for all payload encryption. The PQC security guarantee applies to the key delivery chain, not the device itself. This is an acceptable interim architecture for the most severely constrained devices.

8.3 The Gateway Architecture Pattern

The gateway architecture pattern is the practical solution for deploying PQC-quality security across a mixed estate of capable and constrained devices. The core insight is simple: not every device needs to run PQC algorithms locally. Every device needs to be protected by PQC-quality key material. Those are different requirements.

Architecture Overview

A PQC-capable gateway node sits at the boundary between the enterprise network and the constrained device population. The gateway:

Key Delivery Protocol

The key delivery from gateway to constrained device follows a simple request-response pattern:

  1. The edge device sends a key request to the gateway over the local link, authenticated with its pre-shared device key (HMAC-SHA256 minimum).
  2. The gateway verifies the device identity and authorization.
  3. The gateway retrieves a fresh AES-256 session key from its local key pool (derived from PQC-secured backend key material).
  4. The gateway encrypts the session key for the requesting device using the device’s pre-shared key (AES-256-GCM key wrap).
  5. The edge device decrypts and uses the session key for AES-256-GCM payload encryption.
  6. Session keys are rotated on a schedule appropriate to the application — daily for moderate sensitivity, per-session for high sensitivity.

Gateway Sizing and Redundancy

Deployment ScaleRecommended Gateway HardwareKey Pool SizeRedundancy
< 50 edge devicesRaspberry Pi 4 (4 GB) or industrial SBC1,000 pre-derived keysSingle gateway with manual failover procedure
50–500 edge devicesIndustrial PC or small server (i5/i7 class)10,000 pre-derived keysActive-passive gateway pair; automated failover
500–5,000 edge devicesRack server or VM cluster100,000 pre-derived keysActive-active cluster with load balancing
> 5,000 edge devicesDistributed gateway hierarchyHierarchical key managementMulti-tier gateway architecture; consult vendor

Security Properties of the Gateway Pattern

What the gateway pattern provides:

What the gateway pattern does not provide:

⚠ Gateway Physical Security
The gateway is the cryptographic trust anchor for all devices it serves. A compromised gateway compromises all device communications. Apply physical security controls (locked enclosures, tamper-evident seals, physical access logging) proportional to the sensitivity of the devices served. For CNSA 2.0-scope edge deployments, gateway key storage must use an HSM.

8.4 SCADA and ICS-Specific Considerations

Supervisory Control and Data Acquisition (SCADA) systems and Industrial Control Systems (ICS) present the most challenging PQC migration environment in the federal and critical infrastructure portfolio. These systems combine the constraints of embedded hardware with real-time control requirements, operational technology (OT) protocol stacks that predate modern cryptography, and operational continuity requirements that make downtime for migration extremely costly.

The OT/IT Convergence Challenge

Modern SCADA environments increasingly connect operational technology networks — historically air-gapped or lightly connected — to IT enterprise networks. This convergence creates new pathways for cyber threats but also creates the connectivity infrastructure through which PQC migration can be implemented. The challenge is that OT and IT operate under fundamentally different security assumptions:

DimensionIT EnvironmentOT / ICS Environment
Availability priorityHigh — but downtime recoverableExtreme — downtime may affect safety
Patching cadenceWeekly to monthlyQuarterly to annual (or never)
Cryptographic protocolTLS 1.3, SSH, modern PKIDNP3, Modbus, IEC 61850, ICCP — often no encryption
Device lifecycle3–5 years typical10–30 years common
Change managementAgile / continuous deploymentFormal change control; factory acceptance testing
Safety implicationsData loss / service disruptionPotential physical consequences
Remote accessStandard — VPN, jump hostsLimited — strict network segmentation

IEC 62443 Alignment

IEC 62443 is the international standard series for industrial cybersecurity. Security levels SL1–SL4 define the required cryptographic strength for IACS (Industrial Automation and Control Systems) components. PQC migration in ICS environments should align with IEC 62443 security level requirements:

Protocol-Level PQC for ICS

DNP3 over TLS: DNP3 Secure Authentication Version 5 (SAv5) supports TLS transport. The TLS layer can be migrated to hybrid PQC (X25519MLKEM768) using the standard Chapter 5 TLS recipe. DNP3 application-layer authentication uses HMAC-SHA256 which is already quantum-safe at this key length.

Modbus over TLS: Standard Modbus does not include cryptographic protection. Modbus TCP deployments tunneled over TLS can have the TLS layer migrated to hybrid PQC. For Modbus RS-485 (serial), the gateway pattern is required — the gateway terminates PQC-secured connections from the enterprise and bridges to Modbus serial devices.

IEC 61850 (MMS and GOOSE): IEC 61850 over MMS (Manufacturing Message Specification) uses TCP transport that can be TLS-wrapped with hybrid PQC. GOOSE (Generic Object Oriented Substation Event) messages are typically multicast without TLS — authentication uses IEC 62351-6, which is being updated to include PQC. Monitor IEC TC57 WG15 publications for GOOSE PQC guidance.

OPC UA: OPC UA has an active PQC working group and is expected to publish PQC security policy profiles in 2026–2027. Monitor OPC Foundation publications. OPC UA's security model is TLS-based at the transport layer and can use hybrid PQC TLS as an interim measure today.

The Migration Approach for Long-Lifecycle ICS Devices

For ICS devices with 15–30 year lifecycles that cannot be replaced on a PQC migration timeline, the pragmatic approach is:

  1. Deploy a PQC-capable gateway at the boundary between the ICS network and the enterprise network. All enterprise-facing connections use hybrid PQC TLS.
  2. Apply AES-256 encryption at the application layer for device-to-gateway communication wherever the device supports it.
  3. For devices that support no cryptography: apply physical and network security controls (air gap where possible, strict network segmentation, anomaly detection).
  4. Include PQC requirements in all future ICS procurement specifications. The device you buy today should be the last classically-signed device you deploy.
  5. Track IEC 62443 and protocol-specific PQC updates and plan protocol-layer migration during scheduled maintenance windows.

8.5 Lab Exercise: PQC on a Raspberry Pi with liboqs

Lab Prerequisites
Raspberry Pi 4 (2 GB RAM or more) or Raspberry Pi 5, running Raspberry Pi OS (64-bit, Bookworm).
Internet connectivity for package installation.
A second device (laptop or another Pi) to act as the TLS client.
Basic Linux command-line familiarity.
Estimated time: 60–90 minutes.
This lab demonstrates that PQC is achievable on affordable, widely available hardware — bridging the gap between enterprise deployment and the constrained edge.

Step 1: Update the System and Install Dependencies

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y \
  build-essential cmake ninja-build \
  libssl-dev python3 python3-pip \
  git curl wget

Step 2: Build and Install liboqs

liboqs is the Open Quantum Safe project’s C library implementing all NIST PQC algorithms. We build it from source to ensure we have the latest version with ARM optimizations:

cd ~
git clone --depth 1 https://github.com/open-quantum-safe/liboqs.git
cd liboqs
mkdir build && cd build
cmake -GNinja \
  -DOQS_USE_OPENSSL=ON \
  -DBUILD_SHARED_LIBS=ON \
  -DCMAKE_BUILD_TYPE=Release \
  ..
ninja -j$(nproc)
sudo ninja install
sudo ldconfig

# Verify liboqs installed correctly
ls /usr/local/lib/liboqs*
# Expected: liboqs.so and liboqs.a

Step 3: Install OpenSSL 3.5 with oqs-provider

The oqs-provider plugin connects liboqs to OpenSSL, making all PQC algorithms available through the standard OpenSSL API:

cd ~
git clone --depth 1 https://github.com/open-quantum-safe/oqs-provider.git
cd oqs-provider
mkdir build && cd build
cmake -GNinja \
  -Dliboqs_DIR=/usr/local/lib/cmake/liboqs \
  -DOPENSSL_ROOT_DIR=/usr \
  ..
ninja -j$(nproc)
sudo ninja install

# Configure OpenSSL to load oqs-provider
sudo tee -a /etc/ssl/openssl.cnf > /dev/null << 'EOF'
[provider_sect]
default = default_sect
oqsprovider = oqs_sect

[oqs_sect]
module = /usr/local/lib/ossl-modules/oqsprovider.so
activate = 1
EOF

# Verify oqs-provider loads and PQC algorithms are available
openssl list -kem-algorithms -provider oqsprovider | grep -i mlkem
# Expected: ML-KEM-512, ML-KEM-768, ML-KEM-1024
openssl list -signature-algorithms -provider oqsprovider | grep -i mldsa
# Expected: ML-DSA-44, ML-DSA-65, ML-DSA-87

Step 4: Benchmark ML-KEM on the Raspberry Pi

Run the liboqs benchmark tool to measure PQC performance on the Pi’s ARM Cortex-A72 (Pi 4) or Cortex-A76 (Pi 5):

cd ~/liboqs/build
./tests/speed_kem 2>&1 | grep -E 'ML-KEM|keygen|encaps|decaps'

Record the output. You should see results significantly faster than the Cortex-M4 figures in Section 8.2, because the Pi’s Cortex-A-class CPU has hardware acceleration features not available on microcontrollers. Compare your results to the following reference values:

OperationPi 4 (Cortex-A72, 1.8 GHz)Pi 5 (Cortex-A76, 2.4 GHz)Notes
ML-KEM-768 KeyGen~0.08 ms~0.05 msExtremely fast on Cortex-A class
ML-KEM-768 Encaps~0.10 ms~0.07 msNegligible overhead vs. classical
ML-KEM-768 Decaps~0.09 ms~0.06 ms 
ML-KEM-1024 KeyGen~0.14 ms~0.09 msCNSA 2.0 level; still fast
ML-DSA-65 Sign~0.30 ms~0.20 ms100x faster than Cortex-M4
ML-DSA-87 Sign~0.45 ms~0.30 msFully feasible for all use cases

Step 5: Generate a PQC Key Pair and Certificate on the Pi

mkdir ~/pqc-pi-demo && cd ~/pqc-pi-demo

# Generate ML-KEM-768 key pair
openssl genpkey -algorithm ML-KEM-768 \
  -provider oqsprovider -provider default \
  -out mlkem768-key.pem
openssl pkey -in mlkem768-key.pem -pubout -out mlkem768-pub.pem

# Generate ML-DSA-65 signing key and self-signed certificate
openssl genpkey -algorithm ML-DSA-65 \
  -provider oqsprovider -provider default \
  -out mldsa65-key.pem

openssl req -new -x509 \
  -key mldsa65-key.pem \
  -out mldsa65-cert.pem \
  -days 365 \
  -provider oqsprovider -provider default \
  -subj "/CN=PQC Pi Demo/O=Lab/C=US"

# Verify the certificate uses ML-DSA
openssl x509 -in mldsa65-cert.pem -noout -text \
  | grep 'Signature Algorithm'
# Expected: Signature Algorithm: id-ML-DSA-65

Step 6: Run a PQC TLS Server on the Pi

cd ~/pqc-pi-demo

# Start a TLS 1.3 server with ML-DSA certificate and hybrid PQC key exchange
openssl s_server \
  -cert mldsa65-cert.pem \
  -key mldsa65-key.pem \
  -port 4433 \
  -tls1_3 \
  -groups X25519MLKEM768 \
  -provider oqsprovider -provider default \
  -www &

# From the Pi itself (or another device), connect as a client
openssl s_client \
  -connect localhost:4433 \
  -tls1_3 \
  -groups X25519MLKEM768 \
  -provider oqsprovider -provider default \
  -CAfile mldsa65-cert.pem 2>&1 \
  | grep -E 'Server Temp Key|Cipher|Verify'
# Expected:
#   Server Temp Key: X25519MLKEM768, 1216 bits
#   Cipher    : TLS_AES_256_GCM_SHA384
#   Verify return code: 0 (ok)

Step 7: Measure End-to-End TLS Handshake Performance

# Time 100 TLS handshakes to measure real-world hybrid PQC overhead
time for i in $(seq 1 100); do
  openssl s_client \
    -connect localhost:4433 \
    -tls1_3 -groups X25519MLKEM768 \
    -provider oqsprovider -provider default \
    -CAfile mldsa65-cert.pem \
    -quiet < /dev/null 2>/dev/null
done
# Expected: 100 handshakes in approximately 3-5 seconds on Pi 4
# (30-50 ms per handshake including TCP setup)

Step 8: Simulate the Gateway Key Delivery Pattern

This step demonstrates the gateway pattern from Section 8.3 — a PQC-capable gateway deriving a symmetric key and delivering it to a simulated constrained device:

# On the gateway (Pi running the PQC TLS server):
# Derive a 256-bit session key from a PQC-established shared secret
SHARED_SECRET=$(openssl rand -hex 32)
SESSION_KEY=$(echo -n "$SHARED_SECRET:device-001:$(date +%s)" \
  | openssl dgst -sha384 -binary | xxd -p -c 64 | head -c 64)
echo "Session key for device-001: $SESSION_KEY"

# Encrypt a sensor payload using the derived session key
echo 'temperature=23.4,humidity=61.2,timestamp=1720000000' > sensor_payload.txt
openssl enc -aes-256-gcm \
  -K $SESSION_KEY \
  -iv $(openssl rand -hex 12) \
  -in sensor_payload.txt \
  -out sensor_encrypted.bin
echo "Encrypted payload size: $(wc -c < sensor_encrypted.bin) bytes"
# The key material is PQC-derived; the encryption is AES-256-GCM
# A Class E device with no PQC capability can decrypt this using only AES
Lab Takeaway
This lab demonstrates three things:
1. PQC algorithms run on a $35–$80 Raspberry Pi at latencies indistinguishable from classical algorithms for most applications.
2. A full hybrid TLS connection with ML-DSA certificates and X25519MLKEM768 key exchange is functional on Class A/B embedded hardware today, with no special accommodation.
3. The gateway pattern provides PQC-quality key material to AES-256-only edge devices without requiring PQC library support on those devices.
Quantum computing is not just for expensive aircraft and laboratory systems. It is engineering work that runs on hardware that costs less than a textbook.

Chapter 8 Summary

Before moving to Chapter 9, you should be able to answer these questions:

Constrained Device Migration Is a Decade-Long Program
Many embedded devices in federal and critical infrastructure environments have 10–30 year operational lifetimes. The devices being deployed today will be operating in 2040. Include PQC requirements in every embedded device procurement starting now. The cheapest PQC migration is the one you design in from the beginning.

What’s Next

Chapter 9 covers cloud and managed service migration — quantum-safe migration patterns for AWS GovCloud, Azure Government, and hybrid cloud environments. Cloud services touch every other migration in the program: TLS termination at load balancers, key management services, certificate issuance, and API gateways all have PQC migration paths that are largely provider-managed but require engineer configuration and verification.

References

[1] Open Quantum Safe Project. liboqs — Open Quantum Safe C Library. Linux Foundation Post-Quantum Cryptography Alliance. Available at: github.com/open-quantum-safe/liboqs. [ARM Cortex-A and Cortex-M performance benchmarks available at openquantumsafe.org/benchmarking.]

[2] Banegas, G. et al. (2023). “ML-KEM and ML-DSA on Cortex-M4.” IACR ePrint Archive. [Cortex-M4 performance benchmarks referenced in Sections 8.1 and 8.2.]

[3] IEC 62443. (2018–2022). Industrial Automation and Control Systems Security. International Electrotechnical Commission. [Security level definitions referenced in Section 8.4.]

[4] CISA. (2022). ICS-CERT Advisory: Post-Quantum Cryptography Considerations for Industrial Control Systems. Cybersecurity and Infrastructure Security Agency. Available at: cisa.gov/ics-cert.

[5] OPC Foundation. (2025). OPC UA Security for Post-Quantum Cryptography — Working Group Interim Report. Available at: opcfoundation.org. [OPC UA PQC policy profile development timeline.]

[6] IEC TC57 WG15. (2025). IEC 62351-6 Amendment: Post-Quantum Cryptography for GOOSE and Sampled Values. International Electrotechnical Commission. [GOOSE PQC authentication update in development.]

[7] Raspberry Pi Foundation. (2024). Raspberry Pi 4 and 5 Technical Specifications. Available at: raspberrypi.com/products. [ARM Cortex-A72/A76 specifications referenced in lab exercise.]

[8] Open Quantum Safe Project. oqs-provider — OpenSSL 3.x Provider for liboqs. Available at: github.com/open-quantum-safe/oqs-provider. [Lab exercise installation and configuration reference.]