-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSA implementation of ed25519 image verification and x25519 random key encryption/decryption #323
Commits on Sep 26, 2024
-
[nrf fromtree] boot: Fix ASN.1 for mbedtls >= 3.1
In Mbed TLS 3.1, the private fields in the ASN.1 structure were made private. This breaks code that accesses these private macros. Fix this by changing the ASN.1 specific code to use a new field accessor `ASN1_CONTEXT_MEMBER` that will be conditionally defined based on the version of Mbed TLS that is present. Signed-off-by: David Brown <david.brown@linaro.org> (cherry picked from commit 1d79ef3) Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Configuration menu - View commit details
-
Copy full SHA for c2cc2ab - Browse repository at this point
Copy the full SHA c2cc2abView commit details -
[nrf fromtree] bootutil: Keep image encrypted in scratch area
Currently, when swap using scratch is used with encrypted images, MCUboot is decrypting the images during the copy from the secondary slot to the scratch area. This means the scratch area contains plaintext image data and therefore that the scratch area must be placed in the MCU's internal flash memory. This commit makes the necessary changes to perform the decryption when copying from the scratch area to the primary slot instead, making possible to place the scratch area in an external flash memory since the scratch area is now encrypted. Note that BOOT_SWAP_SAVE_ENCTLV must be enabled if the scratch area is placed in external flash memory. Signed-off-by: Thomas Altenbach <thomas.altenbach@legrand.com> (cherry picked from commit 08d2d94) Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Configuration menu - View commit details
-
Copy full SHA for acf52b0 - Browse repository at this point
Copy the full SHA acf52b0View commit details -
[nrf fromtree] boot: Remove pointless slot identification
In the boot_image_validate_encrypted there was call to flash_area_id_to_multi_image_slot, which tries to figure out slot index from flash area and image index, and the result of the call was not used for anything as slot index is hardcoded in the next call to be 1 (secondary). Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 4da4a72)
Configuration menu - View commit details
-
Copy full SHA for 543a630 - Browse repository at this point
Copy the full SHA 543a630View commit details -
[nrf fromtree] boot: Rename boot_enc_decrypt to boot_decrypt_key
All of boot_enc_ function follow the same pattern where they take encryption context as the first parameter, and the boot_enc_decrypt stands out here as it does not work around the encryption context, but is rather single-part decryption function only used for decrypting of the image encryption key. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 2371c0a)
Configuration menu - View commit details
-
Copy full SHA for 257125e - Browse repository at this point
Copy the full SHA 257125eView commit details -
[nrf fromtree] boot: Move encryption context invalidation to boot_enc…
…_drop. The enc_key_data.valid had been set to true when key has been added to the encryption context, but in case when boot_enc_drop was called, on the same context, the flag remained true, even though the context may no longer hold any valid context nor key. The commit moves the enc_key_data invalidation to enc_key_drop. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 3355735)
Configuration menu - View commit details
-
Copy full SHA for 774813a - Browse repository at this point
Copy the full SHA 774813aView commit details -
[nrf fromtree] boot: Change boot_enc_load to take slot number instead…
… of image In all cases where boot_enc_load is called it is known what slot is addressed, so it is better to just pass the slot number instead of making the boot_enc_load figure out slot number from image index and provided flash area object. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 7f9ac97)
Configuration menu - View commit details
-
Copy full SHA for 5507a5e - Browse repository at this point
Copy the full SHA 5507a5eView commit details -
[nrf fromtree] boot: Reduce repeating code in boot_decrypt_and_copy_i…
…mage_to_sram There was not really needed repetition of code in if-else block; common code has been moved out and the block has been reduced. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit d09112a)
Configuration menu - View commit details
-
Copy full SHA for 728d056 - Browse repository at this point
Copy the full SHA 728d056View commit details -
[nrf fromtree] Fix style issues
Convert tab to spaces; fix opening brace position. Signed-off-by: Fabio Utzig <utzig@apache.org> (cherry picked from commit d5e0e89)
Configuration menu - View commit details
-
Copy full SHA for 0bd46d6 - Browse repository at this point
Copy the full SHA 0bd46d6View commit details -
[nrf fromtree] boot: Remove image_index from boot_encrypt
boot_encrypt required the image_index paired with flash area pointer to be able to figure out which slot it will operate on. Since in most calls the slot is known in advance it can be just passed to the function directly. The commit replaces both parameters with slot number. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 3f11286)
Configuration menu - View commit details
-
Copy full SHA for 9c75592 - Browse repository at this point
Copy the full SHA 9c75592View commit details -
[nrf fromtree] boot: Simplify copy loop in boot_copy_region
Move checking of conditions, which remain the same for the whole loop run, outside of the loop. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 6fe259b)
Configuration menu - View commit details
-
Copy full SHA for 2023198 - Browse repository at this point
Copy the full SHA 2023198View commit details -
[nrf fromtree] boot: Make boot_enc_valid take slot instead of image i…
…ndex There is no point for boot_enc_valid to take image index and flash area and use these to figure out slot number. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit 956311d)
Configuration menu - View commit details
-
Copy full SHA for e02b962 - Browse repository at this point
Copy the full SHA e02b962View commit details -
[nrf fromlist] boot: Replace boot_encrypt by boot_enc_encrypt and boo…
…t_enc_decrypt To be able to implement encryption with API that requires different calls for encryption and encryption, the boot_encrypt needs to be replaced with encryption/decryption specific functions. Upstream PR: mcu-tools/mcuboot#2017 Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Configuration menu - View commit details
-
Copy full SHA for 34f51df - Browse repository at this point
Copy the full SHA 34f51dfView commit details -
[nrf noup] PSA configuration required changes
Set of changes to Kconfig, CMakeLists.txt and some of headers that are required for the PSA support to compile. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Configuration menu - View commit details
-
Copy full SHA for 691d763 - Browse repository at this point
Copy the full SHA 691d763View commit details -
[nrf noup] PSA implementation of x25519 and ed25519 verification
The commit provides implementation of image verification with ed25519 and encryption/decryption support where random key is encrypted using x25519. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Configuration menu - View commit details
-
Copy full SHA for 0d4c91e - Browse repository at this point
Copy the full SHA 0d4c91eView commit details