boot:crypto Add custom crypto support#2680
boot:crypto Add custom crypto support#2680OleksandrShkurchenko wants to merge 1 commit intomcu-tools:mainfrom
Conversation
d3zd3z
left a comment
There was a problem hiding this comment.
Looks good. A minor textual change, and adding CI support.
In addition, can you please format the commit text to be less than 72 columns.
| # Custom Crypto Backend | ||
|
|
||
| MCUboot's crypto abstraction layer supports several open source backends like | ||
| `MCUBOOT_USE_MBED_TLS`, `MCUBOOT_USE_TINYCRYPT`, etc. The `MCUBOOT_USE_CUSTOM_CRYPTO` option allows to implement a custom backend that lets users plug in any crypto library — |
There was a problem hiding this comment.
This line can be wrapped at < 78 or so solumns, which will help when reading these files directly.
| max-align-32 = ["mcuboot-sys/max-align-32"] | ||
| hw-rollback-protection = ["mcuboot-sys/hw-rollback-protection"] | ||
| check-load-addr = ["mcuboot-sys/check-load-addr"] | ||
| custom-crypto = ["mcuboot-sys/custom-crypto"] |
There was a problem hiding this comment.
If we add a custom-crypto configuration, we should also add to .github/workflows/sim.yaml to the build matrix to include testing of this configuration.
171fb82 to
e21234d
Compare
e21234d to
598d882
Compare
| * Copyright (c) 2026 Infineon Technologies AG, or an affiliate of Infineon | ||
| * Technologies AG |
There was a problem hiding this comment.
| * Copyright (c) 2026 Infineon Technologies AG, or an affiliate of Infineon | |
| * Technologies AG |
let's not add copyrights for 2 line #ifdef changes
| * Copyright (c) 2026 Infineon Technologies AG, or an affiliate of Infineon | ||
| * Technologies AG |
There was a problem hiding this comment.
| * Copyright (c) 2026 Infineon Technologies AG, or an affiliate of Infineon | |
| * Technologies AG |
| * Copyright (c) 2026 Infineon Technologies AG, or an affiliate of Infineon | ||
| * Technologies AG |
There was a problem hiding this comment.
| * Copyright (c) 2026 Infineon Technologies AG, or an affiliate of Infineon | |
| * Technologies AG |
| const struct flash_area *fap, | ||
| struct boot_status *bs); | ||
| bool boot_enc_valid(struct enc_key_data *enc_state, uint8_t slot); | ||
| void boot_enc_encrypt(struct enc_key_data *enc_state, uint8_t slot, |
There was a problem hiding this comment.
The code for this function doesn't have a slot argument.
There was a problem hiding this comment.
Fixed. Also reviewed whole .md for such issues in other sections
| - "ram-load enc-aes256-kw multiimage" | ||
| - "ram-load enc-aes256-kw sig-ecdsa-mbedtls multiimage" | ||
| - "custom-crypto,custom-crypto overwrite-only,custom-crypto validate-primary-slot" | ||
| - "custom-enc-crypto,custom-enc-crypto overwrite-only,custom-enc-crypto validate-primary-slot,custom-enc-crypto max-align-32" |
There was a problem hiding this comment.
Should we be testing custom crypto with at least swap-offset, as that is the mode we are generally encouraging people to use.
The `MCUBOOT_USE_CUSTOM_CRYPTO` option allows to implement a custom backend that lets users plug in any crypto library, hardware accelerator, proprietary SDK, or another software implementation without modifying MCUboot's own source. Signed-off-by: Oleksandr Shkurchenko <Oleksandr.Shkurchenko@infineon.com>
598d882 to
e409790
Compare
The
MCUBOOT_USE_CUSTOM_CRYPTOoption allows to implement a custombackend that lets users plug in any crypto library, hardware
accelerator, proprietary SDK, or another software implementation
without modifying MCUboot's own source.