AIFeed

Show HN: Post-quantum secure boot for the ESP32 and Pico 2

Original text(via Hacker News)

microtun boot

microtun boot mascot: a microchip superhero with a security shield climbing toward an upgrade arrow
microtun boot mascot: a microchip superhero with a security shield climbing toward an upgrade arrow

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-exp profile (pre-standard FIPS 206 draft). Images are built by imgtool and signed by the board tools through microtun-signer; imgtool and stock MCUboot cannot sign or verify them. 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; temporarily disabled on ESP32-C5), 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.

Where to start

  • 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.

Requirements

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.

Building

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 --release
      

Never use cargo build --workspace for embedded images: it mixes incompatible targets.

Repository layout

PathContents
microtun-boot-corePlatform-independent boot logic and the application-side updater
microtun-boot-esp , microtun-boot-rp , microtun-boot-qemuPlatform crates for bootloaders and applications, each with its host tool in its own tools/ subdirectory
microtun-boot-buildbuild.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

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.

Contributing

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.

License

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.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Hacker News
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗