Skip to content

Commit 9595288

Browse files
committed
bootloader: mcuboot: Changes needed to support AES256
This commit adds changes which are necessary to support the AES256 encryption algorithm in mcuboot. Signed-off-by: Artur Hadasz <[email protected]>
1 parent 3216ae0 commit 9595288

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

cmake/sysbuild/image_signing.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ function(zephyr_mcuboot_tasks)
158158
set(confirmed_args)
159159
set(encrypted_args)
160160

161+
if(NOT "${keyfile_enc}" STREQUAL "")
162+
if(CONFIG_MCUBOOT_ENCRYPTION_ALG_AES_256)
163+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
164+
endif()
165+
endif()
166+
161167
# Set up .bin outputs.
162168
if(CONFIG_BUILD_OUTPUT_BIN)
163169
if(CONFIG_BUILD_WITH_TFM)

cmake/sysbuild/image_signing_firmware_loader.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ function(zephyr_mcuboot_tasks)
110110
set(confirmed_args)
111111
set(encrypted_args)
112112

113+
if(NOT "${keyfile_enc}" STREQUAL "")
114+
if(CONFIG_MCUBOOT_ENCRYPTION_ALG_AES_256)
115+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
116+
endif()
117+
endif()
118+
113119
# Set up .bin outputs.
114120
if(CONFIG_BUILD_OUTPUT_BIN)
115121
if(CONFIG_BUILD_WITH_TFM)

cmake/sysbuild/image_signing_split.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ function(zephyr_mcuboot_tasks)
157157
set(confirmed_args)
158158
set(encrypted_args)
159159

160+
if(NOT "${keyfile_enc}" STREQUAL "")
161+
if(CONFIG_MCUBOOT_ENCRYPTION_ALG_AES_256)
162+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
163+
endif()
164+
endif()
165+
160166
# Split files apart
161167
split(
162168
ELF_FILE_IN ${ZEPHYR_BINARY_DIR}/${KERNEL_ELF_NAME}

cmake/sysbuild/sign_nrf54h20.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,12 @@ function(mcuboot_sign_merged_nrf54h20 merged_hex main_image)
200200
set(imgtool_args --sha 512 ${imgtool_args})
201201
endif()
202202

203+
if(NOT "${keyfile_enc}" STREQUAL "")
204+
if(SB_CONFIG_BOOT_ENCRYPTION_ALG_AES_256)
205+
set(imgtool_args ${imgtool_args} --encrypt-keylen 256)
206+
endif()
207+
endif()
208+
203209
# Set up .hex outputs.
204210
if(SB_CONFIG_BUILD_OUTPUT_HEX)
205211
list(APPEND byproducts ${output}.signed.hex)

west.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ manifest:
6565
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
6666
- name: zephyr
6767
repo-path: sdk-zephyr
68-
revision: 2cc69ef97a5ce7871628b29a2eaf2a7b4a628388
68+
revision: 51f0b2c5c449b08826faef7cea0df23e9856ceed
6969
import:
7070
# In addition to the zephyr repository itself, NCS also
7171
# imports the contents of zephyr/west.yml at the above
@@ -128,7 +128,7 @@ manifest:
128128
compare-by-default: true
129129
- name: mcuboot
130130
repo-path: sdk-mcuboot
131-
revision: 0fadab126d9ba51365b3db1cdb6d55ed892c62b4
131+
revision: 3b20ec38019dc0841062ba0622b4d7b6792193e5
132132
path: bootloader/mcuboot
133133
- name: qcbor
134134
url: https://github.com/laurencelundblade/QCBOR

0 commit comments

Comments
 (0)