Implement post-quantum cryptography on Arm Cortex-M4
Introduction
Understand pqm4 and post-quantum cryptography
Set up the pqm4 development environment
Run pqm4 tests and benchmarks
Add a KEM implementation to pqm4
Next Steps
Implement post-quantum cryptography on Arm Cortex-M4
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Use a physical board if you have supported hardware and a flashing tool (
stlink or OpenOCD). Choose QEMU to simulate a Cortex-M4 using the mps2-an386 platform when hardware isn’t available.You’ll see binaries under
bin/ for each scheme you built. The filenames follow a pattern such as bin/crypto_kem_ml-kem-768_<impl>_<type>.bin, indicating the scheme and implementation variant.The
<impl> field identifies each scheme’s variant. For example, m4fspeed is optimized for speed and is used by ML-KEM, while m4fstack is another Cortex-M4F variant. The exact suffix depends on the scheme.The test harness validates correctness against known test vectors. Benchmarks report standardized metrics, including cycle counts, stack usage, and code size.
Place the new scheme in its own directory under
crypto_kem/. pqm4’s build system automatically discovers and compiles it. Verify by checking for generated binaries for the new scheme and running the tests and benchmarks.