Skip to content

Commit ebfa915

Browse files
committed
mcuboot: Make ED25519 signature default for nrf54l series
MCUboot for nRF54l15 will be built with support for ED25519 by default and application images will be signed with ED25519 signature. The MCUboot partition size, for this configuration, is set to 0xd000. Signed-off-by: Dominik Ermel <[email protected]>
1 parent b930c59 commit ebfa915

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

modules/mcuboot/boot/zephyr/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ config PM_PARTITION_SIZE_MCUBOOT
3939
hex "Flash space allocated for the MCUboot partition" if !BOOT_USE_MIN_PARTITION_SIZE
4040
default 0xb800 if MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1 && SOC_SERIES_NRF54LX
4141
default 0xbe00 if MCUBOOT_MCUBOOT_IMAGE_NUMBER != -1 && !SOC_SERIES_NRF54LX
42+
default 0xd000 if SOC_SERIES_NRF54LX && BOOT_SIGNATURE_TYPE_ED25519 && !BOOT_SIGNATURE_USING_KMU
4243
default 0xc000
4344
help
4445
Flash space set aside for the MCUboot partition.

sysbuild/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,15 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
229229
# The NRF54LX goes with PSA crypto by default
230230
if(SB_CONFIG_SOC_SERIES_NRF54LX AND SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519)
231231
set_config_bool(mcuboot CONFIG_NRF_SECURITY y)
232-
set_config_bool(mcuboot CONFIG_BOOT_IMG_HASH_ALG_SHA512 y)
233232
set_config_bool(${DEFAULT_IMAGE} CONFIG_MCUBOOT_BOOTLOADER_SIGNATURE_TYPE_ED25519 y)
234233
set_config_bool(${DEFAULT_IMAGE} CONFIG_MCUBOOT_BOOTLOADER_USES_SHA512 y)
234+
# We are sure that ED25519 signature on MCUboot does not need these
235+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_CIPHER_DRIVER n)
236+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_AEAD_DRIVER n)
237+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_MAC_DRIVER n)
238+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_KEY_AGREEMENT_DRIVER n)
239+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_PAKE_DRIVER n)
240+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_KEY_DERIVATION_DRIVER n)
235241

236242
if(SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU)
237243
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_USING_KMU y)
@@ -241,13 +247,15 @@ function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
241247

242248
if(SB_CONFIG_BOOT_SIGNATURE_TYPE_PURE)
243249
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_TYPE_PURE y)
250+
set_config_bool(mcuboot CONFIG_BOOT_IMG_HASH_ALG_SHA512 n)
251+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_HASH_DRIVER n)
244252
set_config_bool(${DEFAULT_IMAGE} CONFIG_MCUBOOT_BOOTLOADER_SIGNATURE_TYPE_PURE y)
245253
else()
246254
set_config_bool(mcuboot CONFIG_BOOT_SIGNATURE_TYPE_PURE n)
255+
set_config_bool(mcuboot CONFIG_BOOT_IMG_HASH_ALG_SHA512 y)
256+
set_config_bool(mcuboot CONFIG_PSA_USE_CRACEN_HASH_DRIVER y)
247257
set_config_bool(${DEFAULT_IMAGE} CONFIG_MCUBOOT_BOOTLOADER_SIGNATURE_TYPE_PURE n)
248258
endif()
249-
else()
250-
set_config_bool(${DEFAULT_IMAGE} CONFIG_MCUBOOT_BOOTLOADER_USES_SHA512 n)
251259
endif()
252260

253261
# A v1 board doesn't define board qualifiers, thus below test will just test the pure board

sysbuild/Kconfig.mcuboot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ choice BOOT_SIGNATURE_TYPE
139139
default BOOT_SIGNATURE_TYPE_RSA if THINGY91_STATIC_PARTITIONS_FACTORY
140140
default BOOT_SIGNATURE_TYPE_ECDSA_P256 if ((SOC_NRF52840 || SOC_SERIES_NRF91X) && !BOARD_THINGY91_NRF9160 && !BOARD_THINGY91_NRF52840)
141141
default BOOT_SIGNATURE_TYPE_ECDSA_P256 if SECURE_BOOT_APPCORE
142+
default BOOT_SIGNATURE_TYPE_ED25519 if SOC_SERIES_NRF54LX
142143

143144
endchoice
144145

0 commit comments

Comments
 (0)