commit | ba829049eac9fd3be72b526d96c4bf4d75bb691d | [log] [tgz] |
---|---|---|
author | Fabio Utzig <utzig@apache.org> | Tue Sep 18 08:29:34 2018 -0300 |
committer | Fabio Utzig <utzig@utzig.org> | Fri Oct 12 13:36:13 2018 -0300 |
tree | c7306086614184bfed07cdd5b5b01a3ee80da92e | |
parent | 9d306d20dc3f5840cc2a8c8cf281c53bbef020cc [diff] |
Add bootutil support for encrypted images This allows storing encrypted images in slot1, that are automatically decrypted when copying to slot0 and re-encrypted when copying from slot0 to slot1. The encryption works by applying AES-CTR-128 on the image blocks (excluding the header and TLVs) using a random key. This random key is itself encrypted using either RSA-OAEP-2048 or AES-KW-128 (AES keywrap as defined by RFC3394), and appended to the image as newly defined TLVs. AES-CTR-128 was chosen primarily for having stream cipher proporties, which basically means that any block being encrypted/decrypted does not depend on any other previous blocks results. The TLV adds about 256 bytes to the image in RSA-OAEP-2048 mode, and 24 bytes in AES-KW-128 mode. Resulting sizes for a Mynewt generated mcuboot (frdm-k64f): - swap mode and no signing: 12KB - adding encryption with RSA-OAEP-2048: 28KB - adding encryption with AES-KW-128: 20KB Some extra comments: - AES-KW-128 requires a fairly new mbedtls with nist_kw support. - An alternative methods which could be added later are ECIES. - Key-wrapping seems easy enough to implement using just standard AES-ECB mode that it should be straight-forward to also add support to tinycrypt. Signed-off-by: Fabio Utzig <utzig@apache.org>
This is mcuboot, version 1.2.0
MCUboot is a secure bootloader for 32-bit MCUs. The goal of MCUboot is to define a common infrastructure for the bootloader, system flash layout on microcontroller systems, and to provide a secure bootloader that enables easy software upgrade.
MCUboot is operating system and hardware independent, and relies on hardware porting layers from the operating system it works with. Currently mcuboot works with both the Apache Mynewt, and Zephyr operating systems, but more ports are planned in the future. RIOT is currently supported as a boot target with a complete port planned.
Instructions for different operating systems can be found here:
The issues being planned and worked on are tracked on Jira. To participate please visit:
https://runtimeco.atlassian.net/projects/MCUB/summary
Information and documentation on the bootloader is stored within the source, and on confluence:
https://runtimeco.atlassian.net/wiki/discover/all-updates
For more information in the source, here are some pointers:
Developers welcome!