A secure boot bootloader written in Rust, using MCUboot's on-flash formats (image header, TLVs, trailer) with a post-quantum signature. On every boot it authenticates the application before starting it, carries out any pending upgrade, and never boots an image that fails verification.
- Signatures: FN-DSA-512 over SHA-256 only, using microtun-signer's
experimental
fn-dsa-512-expprofile (pre-standard FIPS 206 draft). Images are built byimgtooland signed by the board tools through microtun-signer. Encrypted and compressed images are rejected. - Upgrade strategies: swap-using-scratch (test/permanent, revert, power-fail resume), overwrite-only, direct-XIP with or without revert.
- Policy: downgrade prevention, minimum version, hardware security counter
(anti-rollback), imgtool
--vid/--cid. - Boards: ESP32-C3, ESP32-C5, ESP32-C6, RP2350 Pico 2 / Pico 2 W and QEMU (tests only); see the board index.
microtun boot is an experimental prototype and an independent project, not affiliated with MCUboot. Read SECURITY.md and THREAT-MODEL.md before using it in a product.
- Run an application on a released bootloader: follow a blinky example.
- Build and flash your own bootloader: follow the board index.
- Try it without hardware: use the QEMU board.
You need Rust 1.95+, imgtool and the
microtun-signer CLI (0.16+) on
your PATH. Each board README lists its Rust target and any extra tools.
python3 -m pip install imgtool cargo test # host-side tests; no hardware needed
All signing goes through microtun-signer, using development keys on your
machine by default or a signer service for release keys. See
SIGNING.md.
Build embedded images from inside a board or example directory, which selects
the right target. cargo run --release there builds, signs and flashes;
NO_FLASH=1 stops after signing:
cd boards/esp32-c3-mini-1/firmware
NO_FLASH=1 cargo run --releaseNever use cargo build --workspace for embedded images: it mixes incompatible
targets.
| Path | Contents |
|---|---|
microtun-boot-core |
Platform-independent boot logic and the application-side updater |
microtun-boot-esp, microtun-boot-rp, microtun-boot-qemu |
Platform crates for bootloaders and applications, each with its host tool in its own tools/ subdirectory |
microtun-boot-build |
build.rs helpers and shared signing code |
chips/ |
Per-chip constants |
boards/ |
Bootloader, test firmware and flash layout per board |
examples/ |
Standalone application examples |
testing/ |
Hardware-in-the-loop and QEMU tests |
microtun-boot-hil flashes complete boot
chains and checks the boot output. The full regression suite runs under QEMU;
physical boards run a smoke suite and need an expendable board.
Contributions are welcome. Before a contribution can be merged, the contributor
must complete the applicable Contributor License Agreement (CLA). Contributions
made on behalf of an employer or other organization may also require an entity
CLA or equivalent authorization. See CONTRIBUTING.md, the
Individual CLA, and the Entity CLA
for details.
microtun boot is dual-licensed:
- Noncommercial license: the PolyForm Noncommercial License 1.0.0, including its provisions for qualifying noncommercial organizations. This is a source-available license, not an open-source license.
- Commercial license: a separate written agreement, available on request. Commercial rights come only from that agreement, not from the PolyForm Noncommercial License and not merely from making a request.
