Skip to content

Commit 1f691da

Browse files
committed
[nrf fromtree] 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 Signed-off-by: Artur Hadasz <[email protected]> (cherry picked from commit 268968f)
1 parent 9904262 commit 1f691da

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
@@ -724,6 +724,22 @@ config BOOT_ENCRYPT_X25519
724724
help
725725
Hidden option selecting x25519 encryption.
726726

727+
if BOOT_ENCRYPT_IMAGE
728+
729+
choice BOOT_ENCRYPT_ALG
730+
prompt "Algorithm used for image encryption"
731+
default BOOT_ENCRYPT_ALG_AES_128
732+
733+
config BOOT_ENCRYPT_ALG_AES_128
734+
bool "Use AES-128 for image encryption"
735+
736+
config BOOT_ENCRYPT_ALG_AES_256
737+
bool "Use AES-256 for image encryption"
738+
739+
endchoice # BOOT_ENCRYPT_ALG
740+
741+
endif # BOOT_ENCRYPT_IMAGE
742+
727743
if BOOT_ENCRYPT_X25519 && BOOT_USE_PSA_CRYPTO
728744

729745
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
@@ -163,6 +163,14 @@
163163
#define MCUBOOT_ENCRYPT_X25519
164164
#endif
165165

166+
#ifdef CONFIG_BOOT_ENCRYPT_ALG_AES_128
167+
#define MCUBOOT_AES_128
168+
#endif
169+
170+
#ifdef CONFIG_BOOT_ENCRYPT_ALG_AES_256
171+
#define MCUBOOT_AES_256
172+
#endif
173+
166174
/* Support for HMAC/HKDF using SHA512; this is used in key exchange where
167175
* HKDF is used for key expansion and HMAC is used for key verification.
168176
*/

0 commit comments

Comments
 (0)