Memory-Efficient HQC Implementations on Cortex-M3 and Cortex-M7
Reduces RAM for HQC KEM on Cortex-M3/M7 by sharing workspace, reusing output buffers, and regenerating supports; cuts stack 38.9% vs Zero-Buffer for HQC-256.
Schemes: HQC, Zero-Buffer multiplication, support-form multiplication
Findings (quotes checked against the source text)
-
Combined representation and lifetime changes reduced Cortex-M3 HQC-256 stack by 38.9% relative to a Zero-Buffer configuration using component-wise ciphertext comparison.
In a cumulative Cortex-M3 HQC-256 comparison, combined representation and lifetime changes reduced the stack by 38.9% relative to a Zero-Buffer configuration that already uses component-wise ciphertext comparison.
-
Decapsulation footprints measured at 36,858 bytes on Cortex-M3 and 36,850 bytes on Cortex-M7, including peak stack and serialized input/output storage.
Using a separate configuration, we measured decapsulation footprints of 36,858 bytes on Cortex-M3 and 36,850 bytes on Cortex-M7, including peak operation stack and serialized input/output storage.
-
Relative cycle increase from direct to compact implementation is larger on Cortex-M7 than Cortex-M3; retaining supports reduces cycles when memory permits.
In the evaluated configurations, the relative increase in decapsulation cycles from the direct to the compact implementation is larger on Cortex-M7 than on Cortex-M3.
-
Constant-time execution and physical side-channel resistance were not established for the complete KEM.
we did not establish complete-KEM constant-time execution or physical side-channel resistance.
Numbers (as extracted, not quote-checked)
- Stack reduction, HQC-256 Cortex-M3 vs Zero-Buffer: 38.9%
- Decapsulation footprint, Cortex-M3: 36,858 bytes
- Decapsulation footprint, Cortex-M7: 36,850 bytes
For builders
If a PQ chain runs HQC on constrained devices, the buffer-lifetime and in-place reuse techniques here are worth borrowing, but HQC is a KEM, not a signature, so it fits key exchange rather than transaction signing.
Limits
Evaluated only on two ARM Cortex-M cores under the August 2025 HQC spec; no complete-KEM constant-time or side-channel claim; abstract only, full text not read.
Topics: kem implementation-sidechannel benchmarks