microtun-boot Brings Post-Quantum Firmware Signing to ESP32 and Pico 2. Check the Link It Can't Fix
A small Rust bootloader shows what post-quantum secure boot looks like on hobby chips, and its own threat model names the part that stays classical.
Every connected gadget makes the same promise when it powers on: it will only run code its maker signed. That promise rests on a chain of signature checks, and the weakest link sets the strength of the whole chain.
This week that weak link got harder to ignore. The NSA's December 2 advisory on speeding up the move to post-quantum cryptography singled out "firmware signatures and hardware roots of trust" because their algorithms "may be difficult to update throughout a device's operational lifetime" (NSA). Three days later, Anthropic and OpenAI said their models had found weaknesses in some deployed cryptography and declined to say which (Anthropic).
Into that week came microtun-boot, a Rust bootloader that checks firmware with a post-quantum signature on ESP32 chips and the Raspberry Pi Pico 2. It reached Hacker News as a Show HN on December 5 and tagged v0.7.0 the same day.
The interesting part is not that it works. It is what its own documentation admits: the signature on your application is post-quantum, but the chip still checks the bootloader with classical cryptography burned into silicon. That one admission is the most useful lesson in the repo, and it applies to every "post-quantum firmware" pitch you will hear in 2027.
What a bootloader does, in plain terms
A bootloader is the small program a microcontroller runs before your actual firmware. Its job is gatekeeping. It reads the firmware image from flash, checks the signature, and only then hands over control. If the signature is wrong, the device refuses to boot that image.
Secure boot is the name for doing this as a chain. The chip's mask ROM (code fixed in the silicon at the factory) checks the bootloader. The bootloader checks the application. Each step only trusts what the previous step verified.
microtun-boot plays the middle role. It reuses the on-flash formats of MCUboot, a widely used open-source bootloader, meaning the image header and metadata layout stay familiar. What it swaps out is the signature. Instead of the usual ECDSA P-256, RSA or Ed25519, it verifies only FN-DSA-512, a post-quantum signature scheme from the draft FIPS 206 standard, derived from the Falcon algorithm. The README is clear that it uses "FN-DSA-512 over SHA-256 only" and rejects encrypted and compressed images (README at v0.7.0).
Supported hardware is small and specific: ESP32-C3, ESP32-C5, ESP32-C6, and the RP2350 chip on the Pico 2 and Pico 2 W, plus a QEMU emulator target for tests.
The chain, and the link that stays classical
The project's threat model lays out the full boot chain stage by stage, and it is worth reading slowly.
On the ESP32 chips, the mask ROM verifies Espressif's second-stage loader with Secure Boot V2 using RSA-3072, and that loader verifies microtun-boot with the same key. On the RP2350, the mask ROM verifies microtun-boot directly using secp256k1, with the key's hash burned into one-time-programmable memory (storage that can be written once and never changed) on first boot. Only after that does microtun-boot check your application with FN-DSA-512.
Then comes the sentence that matters. Under "Out of scope," the threat model says: "Only the application signature is post-quantum. The ESP32 ROM (RSA-3072) and RP2350 ROM (secp256k1) signatures, and therefore the bootloader that holds the FN-DSA key ring, are not" (THREAT-MODEL.md, line 74).
Read that twice. The post-quantum keys that protect your firmware live inside the bootloader. The bootloader is protected by a classical signature the chip checks in ROM. If someone can forge that ROM-level signature, they can load their own bootloader with their own key ring (the list of public keys it accepts), and the post-quantum check never happens.
On the RP2350 that ROM-level check uses secp256k1, a 256-bit elliptic curve. This week's public hints, including Google's plan to stop accepting long-lived P-256 certificates, point at 256-bit curves (Seth Larson). Nobody has said secp256k1 is affected, and secp256k1 is a different curve from P-256. But it is in the same size class, and the RP2350's choice is fixed in silicon. No bootloader can change it.
This is not a flaw in microtun-boot. The project cannot rewrite a chip's ROM. It is the honest shape of post-quantum firmware on today's hardware: you can upgrade every link except the first one.
What it gets right
The design shows care in places a weekend project usually skips.
It checks twice at the moment that counts. The threat model says microtun-boot hardens "the jump into the application and each security-counter burn," authenticating the image a second time at those steps, independently of the first decision. Those are the two steps you cannot undo.
It refuses to trust a key just because a server sent one. Bootloader builds embed public keys from a local store or from MICROTUN_BOOT_PUBKEYS, and if you point the build at a signing service without pinning that service's public key, the build stops. In the project's words, "a build never trusts a key just because a service returned it" (SIGNING.md).
It plans for rotation, and prices it. MICROTUN_BOOT_PUBKEYS takes a comma-separated list of FN-DSA public keys, and each one adds 897 bytes to the bootloader (SIGNING.md, line 130). Each signature is 666 bytes. On a chip with a few megabytes of flash that is cheap, but it is a real cost you decide at build time, because a device can only boot images signed by a key already in its bootloader.
It writes down what it does not do. No encryption of images, no protection against someone with a flash interposer (a device wired between the chip and its flash memory that can swap data mid-read), no runtime isolation after handoff. The threat model lists its known limitations, numbered L1 through L11 with sub-items, alongside the board each one applies to. Most commercial firmware vendors do not publish anything this candid.
Try it without a board
The fastest way to see the boot chain is the QEMU target, which runs the full regression suite on a patched emulated Cortex-M3 machine. You need Rust 1.95 or newer, imgtool, and the microtun-signer CLI, version 0.16 or later, on your PATH.
From the repository root, the QEMU board README gives this setup (install the microtun-signer CLI first, from its own repository):
rustup target add thumbv7m-none-eabi
python3 -m pip install imgtool
cargo install --path microtun-boot-qemu/tools --locked
microtun-signer local init --key-id microtun-boot-local-fn-dsa-512 --algorithm fn-dsa-512-exp
The last line creates a local development signing key. You also build the patched QEMU once, following the instructions linked from that README, and point the tools at it with MICROTUN_BOOT_QEMU_BIN. Then:
cd boards/qemu/microtun-boot
cargo run --release # flash the bootloader
cd ../firmware
IMAGE_VERSION=1.0.0 cargo run --release # sign and flash the application
cd ../../..
microtun-boot-tools-qemu run # serial on stdio, Ctrl+C to stop
"Flashing" here writes to a virtual flash file, target/qemu/flash.bin, so nothing touches real hardware. A good first experiment: change one byte of the signed image and watch the bootloader refuse it. Then sign with a key the bootloader does not know and watch it refuse again.
If you have a Pico 2 or an ESP32-C3 board, the board READMEs cover real flashing. The project says physical boards run a smoke suite and "need an expendable board." Take that literally on the RP2350, where enrollment burns one-time-programmable memory.
Three questions to ask any post-quantum firmware pitch
microtun-boot gives you a checklist you can reuse on vendors who will soon promise "quantum-safe boot."
Which stage is post-quantum, and which is not? Ask for the full chain, ROM to application, with the algorithm at each step. If the answer stops at the bootloader, the ROM link is still classical.
Can the root of trust change after the device ships? If the ROM key or algorithm is burned in, the answer is no, and the only full fix is new hardware. That is the NSA's point about hardware roots of trust.
Is the post-quantum scheme final and audited? FN-DSA is still a draft standard. Anything shipping it today is shipping a draft.
The honest limits
Be clear-eyed before you put this near a product.
The license is noncommercial. microtun-boot is under the PolyForm Noncommercial License 1.0.0, which the README calls "a source-available license, not an open-source license." Commercial use needs a separate written agreement.
The signature scheme is a draft, and unaudited. The fn-dsa-512-exp profile follows the fn-dsa Rust crate's reading of "the unpublished FIPS 206 draft," with a provisional key identifier, and the threat model states "the implementation has not been independently audited" (THREAT-MODEL.md, line 118). If the final standard changes, signed images may need re-signing and bootloaders may need replacing.
Updates arrive unauthenticated unless you fix that. The threat model lists transport security as out of scope and says "the upload session API has no authentication of its own," so the application you write must authenticate, encrypt and rate-limit the update channel. Its integrator checklist also says to build release bootloaders with MICROTUN_BOOT_PUBKEYS set to approved production keys, not a locally generated development key.
Stock MCUboot cannot boot these images. The formats look like MCUboot's, but the FN-DSA signature sits in a vendor-reserved metadata field that upstream MCUboot and imgtool verify do not understand.
Some boards have gaps. The ESP32-C5's hardware anti-rollback counter (the one-way version floor that blocks reinstalling old, vulnerable firmware) is disabled for now, so older signed images can be reflashed there (line 114). On the RP2350, enrollment trusts whatever key signed the running bootloader the first time it runs (line 116).
It is tiny and new. About 40 stars on its GitHub page when checked on December 5, eight releases, and an "experimental prototype" label in its own README.
What to take from it
microtun-boot is worth an afternoon even if you never ship it, because it makes an abstract warning concrete. Post-quantum firmware is not a library you add. It is a chain, and on current chips the first link was chosen at the factory.
So before you trust any boot chain this year, yours included, write down the algorithm at every stage. Which link in your devices would you have to replace with a soldering iron?
Sources: microtun-boot README, THREAT-MODEL.md, SIGNING.md and QEMU README at tag v0.7.0 (commit 250685e, reviewed December 5, 2026), NSA advisory, December 2, 2026, Anthropic and OpenAI joint statement, Seth Larson's key guide, MCUboot.