9 comments

  • obnauticus 59 minutes ago
    Still waiting for HW roots of trust with PQ signature support to become commonly available.

    Unfortunately it will probably be a number of years until that hardware IP finally makes its way into low cost / low power processors.

  • fiberniche491 4 hours ago
    Post quantum signatures are huge, how much boot time does that cost on a pico
    • dpeckett 3 hours ago
      Compact signatures are the selling point of FALCON [1], for fn-dsa-512 (signatures: 666B, keys: 897B).

      Benching fn-dsa-512 (NIST Level 1) on the Pico 2,

      SIGNATURE VERIFICATION: 4.8ms (1.1ms pub key decoding + 3.7ms verification)

      TOTAL SRAM: ~7KiB

      As long as FALCON survives standardization, there's no way it doesn't become popular. Signing is a bit more expensive though so let's see if that holds it back.

      1. https://csrc.nist.gov/csrc/media/Presentations/2024/falcon/i...

      • amluto 44 minutes ago
        For a secure boot implementation, this barely beats SLH-DSA in code size + public key size + signature size. For an application where long-term security is critical, I would strongly prefer a hash-based scheme (SLH) over a lattice-based scheme (Falcon).

        Falcon does, however, win pretty dramatically in verification time, which will be important for some but not all applications. (Plenty of microcontroller applications would be fine with taking an extra second to boot as long as they mostly stay booted, entering a low-power mode instead of being turned off.)

        FWIW, depending on how everything is laid out in ROM/flash and what parts of ROM/flash are covered by which hardware protections, there may be no security benefit to verifying the signature at boot time as opposed to verifying it at update time. If you can get away with storing a simple hash of a next-stage boot slot in a tamper-resistant area, then you can verify a signature in the trusted code that writes a new hash to the boot slot's descriptor.

        In this case, I think Falcon loses basically all its advantages. The highly-secure storage needs to store the hash verifier, a hash per boot slot, and a public key or a public key hash. SLH public keys are already very short. The SLH verifier itself (which does not necessarily need to be stored in flash at all) is very little code beyond the underlying hash. The SLH signature is pretty big, but there is no particular need to store it in flash. The main downside is adding ~1s to the time needed for the actual update operation.

        BUT!

        All of the above assumes a software implementation. Most of Falcon verification is likely to be done as ordinary software. Most of SLH verification's cost is hash function evaluation, and a whole lot of current-gen microcontrollers have SHA-256 in hardware. And I think that also kills the time advantage of Falcon. (There's a bonus factor of 2 for the SHA-256 variants of SLH if the hardware gives a prepared-prefix SHA-256 operation, which is reasonably common - you get it naturally if the exposed operation is the compression function.)

        So I would pretty strongly favor SLH-DSA-SHA2-128s for code signing :)

        • dpeckett 22 minutes ago
          Very good point, prior to settling on FN-DSA I dug into LMS based on the NIST guidelines (LMS is awful). I was under that hash signing schemes were generally stateful so its nice to see SLH-DSA bucks that trend! I'll definitely look into supporting it!

          Verifying at update time can be challenging and there's all sorts of atomicity issues, plus tamper evident storage usually means you are going to be needing some kind of signing or at least AEAD (which actually isn't too bad on hardware).

          For the design of microtun-boot I choose to copy mcuboot architecturally, with modern boot rom and otp roots of trust perhaps its a dated design but I thought it was probably the most foolproof way of shipping something.

          Thanks for the great feedback.

      • rustyhancock 2 hours ago
        Keygen and signing needing FP doesn't sound ideal.

        But I suppose embedded devices are mostly verification (and keygen once if ever).

  • tmarkovski 2 hours ago
    This is quite brilliant, matching MCUboot's format!
  • bodhisattwadas2 4 hours ago
    This is really cool!
  • baq 2 hours ago
    The times are such that you can just ask for things.

    ‘Break P-256 ECC’, somewhere in a frontier lab, probably

    ‘Implement a bootloader with post quantum image signatures’, two days ago, anywhere

  • Palomides 1 hour ago
    LLM generating a source available project then slapping a non-commercial/contact for commercial use license on it is an interesting choice
    • dpeckett 1 hour ago
      The git history was squashed prior to public release, this is a solid couple months of human labor.

      Yes LLMs were used, but also there was a ton of human design input (nothing agentic), lots of hardware-in-loop testing, and a good dash of manual refactoring.

      The way I see it, LLMs just mean the quality bar has been lifted for everyone.

      Vibe coded one-shots probably aren't worthy of copyright protection.

  • trollbridge 4 hours ago
    Talk about a problem that didn’t need solving
    • hak8or 3 hours ago
      Maybe I am misunderstanding what this fixes, but doesn't this project work towards ensuring esp32's have a chain of trust implementation that uses crypto primitives which are considered safer after anthropic crypto releases earlier this week?

      Or are you implying that there isn't a need to move to post quantum crypto on esp32, or that the esp32 shouldn't have chain of trust implementation?

      • dpeckett 3 hours ago
        The general argument is that the ESP32 and RP2350 boot roms implement similar functionality so why build an abstraction when you can just work directly with the vendor tools?

        Quoting from elsewhere:

        > The same could be said about U-Boot, MCUboot or wolfBoot. Microtun boot targets more than just the ESP32. Any chip with signature verification implemented in its boot rom (so that we can establish a trust root) can be targeted.

        > Then there's the portable firmware image format, microtun-boot distributes updates as signed MCUboot TLV images.

        > I'm personally working on an application that targets both the ESP32 and PICO 2W boards.

  • dpeckett 5 hours ago
    I'm working on a zero trust networking solution for the internet of things and needed a cross platform implementation of secure boot. Right now it supports the ESP32 (RISC-V) and Raspberry Pi Pico 2 but support for the STM32H573 (ST-iROT) is planned.

    The ESP32 implementation has probably survived the latest security advisory, Espressif choose to thankfully use RSA 3072 in their trust root. The Raspberry Pi Pico 2 is more ambiguous as its based on secp256k1 (like bitcoin) which is 256-bit ECC.

    FALCON (fn-dsa) is an incredible signature scheme, sadly its only experimental atm and standardization seems to be delayed. I actually ended up saving ~20KiB of flash versus a legacy P-256 implementation. Little more memory hungry but very modest. I am certain fn-dsa will come to dominate in this space.

    If this is the kind of engineering that interests you, whether it's embedded systems, Rust, networking, or making unconventional things work together, I'd love to connect. I'm always looking for like-minded collaborators, especially people interested in building something together in the industrial IoT space, potentially even as co-founders. Feel free to reach out!

  • carsonwhite060 2 hours ago
    [dead]