Developing a cryptographically secure bootloader for RISC-V in Rust

It seems to be bootloader season, because we’ve got another one – this time, a research project with very limited application for most people.

SentinelBoot is a cryptographically secure bootloader aimed at enhancing boot flow safety of RISC-V through memory-safe principles, predominantly leveraging the Rust programming language with its ownership, borrowing, and lifetime constraints. Additionally, SentinelBoot employs public-key cryptography to verify the integrity of a booted kernel (digital signature), by the use of the RISC-V Vector Cryptography extension, establishing secure boot functionality. SentinelBoot achieves these objectives with a 20.1% hashing overhead (approximately 0.27s additional runtime) when compared to an example U-Boot binary (mainline at time of development), and produces a resulting binary one-tenth the size of an example U-Boot binary with half the memory footprint.

↫ Lawrence Hunter

SentinelBoot is a project undertaken at the University of Manchester, and its goal is probably clear from the description: to develop a more secure bootloader for RISC V devices. An additional element is that they looked specifically at devices that receive updates over-the-air, like smartphones. In addition, scenarios where an attacker has physical access to the device in question were not considered, for obvious reasons – in such cases, the attacker can just replace the bootloader altogether anyway, and no amount of fancy Rust code is going to save you there.

The details of the implementation as described in the article are definitely a little bit over my head, but the gist seems to be that the project’s been able to achieve a much more secure boot process without giving up much in performance. This being a research project with an intentionally limited scope does mean it’s most just something that’ll immediately benefit all of us, but it’s these kinds of projects that can really push the state of the art and try out the viability of new ideas.

14 Comments

  1. 2024-08-07 12:07 pm
    • 2024-08-07 12:42 pm
      • 2024-08-07 12:54 pm
        • 2024-08-07 2:37 pm
          • 2024-08-07 6:27 pm
          • 2024-08-07 6:50 pm
          • 2024-08-08 12:14 am
          • 2024-08-09 5:13 pm
          • 2024-08-09 6:58 pm
          • 2024-08-10 4:58 pm
          • 2024-08-10 11:26 pm
          • 2024-08-11 8:50 am
  2. 2024-08-07 7:21 pm
    • 2024-08-08 12:25 am