Commit 268968f8 authored by Artur Hadasz's avatar Artur Hadasz Committed by Dominik Ermel
Browse files

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: default avatarArtur Hadasz <artur.hadasz@nordicsemi.no>
parent a5c48f3c
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -691,6 +691,22 @@ config BOOT_ENCRYPT_X25519
	help
	  Hidden option selecting x25519 encryption.

if BOOT_ENCRYPT_IMAGE

choice BOOT_ENCRYPT_ALG
	prompt "Algorithm used for image encryption"
	default BOOT_ENCRYPT_ALG_AES_128

config BOOT_ENCRYPT_ALG_AES_128
	bool "Use AES-128 for image encryption"

config BOOT_ENCRYPT_ALG_AES_256
	bool "Use AES-256 for image encryption"

endchoice # BOOT_ENCRYPT_ALG

endif # BOOT_ENCRYPT_IMAGE

if BOOT_ENCRYPT_X25519 && BOOT_USE_PSA_CRYPTO

choice BOOT_HMAC_SHA
+8 −0
Original line number Diff line number Diff line
@@ -165,6 +165,14 @@
#define MCUBOOT_ENCRYPT_X25519
#endif

#ifdef CONFIG_BOOT_ENCRYPT_ALG_AES_128
#define MCUBOOT_AES_128
#endif

#ifdef CONFIG_BOOT_ENCRYPT_ALG_AES_256
#define MCUBOOT_AES_256
#endif

/* Support for HMAC/HKDF using SHA512; this is used in key exchange where
 * HKDF is used for key expansion and HMAC is used for key verification.
 */