Skip to content

Commit a8a3bf3

Browse files
committed
[nrf fromlist] zephyr: Add support for AES256
This commit adds the parts in the tooling allowing AES256 to work with MCUBoot in zephyr. Currently only in combination PSA + ED25519 Upstream PR #: 2406 Signed-off-by: Artur Hadasz <[email protected]>
1 parent 9c9daec commit a8a3bf3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

boot/zephyr/Kconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,22 @@ config BOOT_ENCRYPT_X25519
717717
help
718718
Hidden option selecting x25519 encryption.
719719

720+
if BOOT_ENCRYPT_IMAGE
721+
722+
choice BOOT_ENCRYPT_ALG
723+
prompt "Algorithm used for image encryption"
724+
default BOOT_ENCRYPT_ALG_AES_128
725+
726+
config BOOT_ENCRYPT_ALG_AES_128
727+
bool "Use AES-128 for image encryption"
728+
729+
config BOOT_ENCRYPT_ALG_AES_256
730+
bool "Use AES-256 for image encryption"
731+
732+
endchoice # BOOT_ENCRYPT_ALG
733+
734+
endif # BOOT_ENCRYPT_IMAGE
735+
720736
if BOOT_ENCRYPT_X25519 && BOOT_USE_PSA_CRYPTO
721737

722738
choice BOOT_HMAC_SHA

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@
159159
#define MCUBOOT_ENCRYPT_X25519
160160
#endif
161161

162+
#ifdef CONFIG_BOOT_ENCRYPT_ALG_AES_128
163+
#define MCUBOOT_AES_128
164+
#endif
165+
166+
#ifdef CONFIG_BOOT_ENCRYPT_ALG_AES_256
167+
#define MCUBOOT_AES_256
168+
#endif
169+
162170
/* Support for HMAC/HKDF using SHA512; this is used in key exchange where
163171
* HKDF is used for key expansion and HMAC is used for key verification.
164172
*/

0 commit comments

Comments
 (0)