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
Who is this for?
This is an advanced topic for software developers and cryptography enthusiasts interested in implementing and testing post-quantum cryptographic algorithms on Arm Cortex-M4 microcontrollers.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Describe the design goals and supported algorithms of the pqm4 library.
- Set up the development environment for Arm Cortex-M4.
- Implement and test post-quantum cryptographic algorithms.
- Benchmark and profile cryptographic implementations.
- Integrate new cryptographic schemes into the pqm4 framework.
Prerequisites
Before starting, you will need the following:
- Computer with Python 3.8 or higher
- Arm GNU Toolchain installed
- An Arm Cortex-M4 development board such as NUCLEO-L4R5ZI, NUCLEO-L476RG, or STM32F4 Discovery, with stlink or OpenOCD for flashing. Alternatively, install QEMU to simulate the hardware without a physical board.
Summary
This summary was 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.
pqm4 to test and benchmark post-quantum cryptography on Arm Cortex-M4. First, you’ll set up hardware or QEMU, build scheme binaries, and validate implementations against test vectors. Then, you’ll measure cycles, stack usage, and code size. You’ll add a key encapsulation mechanism under crypto_kem/ so the build system discovers and compiles it.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.
stlink or OpenOCD). Choose QEMU to simulate a Cortex-M4 using the mps2-an386 platform when hardware isn’t available.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.<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.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.