Skip to content

Commit 323e327

Browse files
michalek-nonordicjm
authored andcommitted
Revert "[nrf noup] boot: bootutil: Allow configuring number of KMU keys"
This reverts commit 324aed8.
1 parent dcec607 commit 323e327

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

boot/bootutil/src/ed25519_psa.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include <psa/crypto.h>
1414
#include <psa/crypto_types.h>
15-
#include <zephyr/sys/util.h>
1615
#if defined(CONFIG_BOOT_SIGNATURE_USING_KMU)
1716
#include <cracen_psa_kmu.h>
1817
#endif
@@ -31,9 +30,7 @@ static psa_key_id_t kmu_key_ids[3] = {
3130
MAKE_PSA_KMU_KEY_ID(228),
3231
MAKE_PSA_KMU_KEY_ID(230)
3332
};
34-
35-
BUILD_ASSERT(CONFIG_BOOT_SIGNATURE_KMU_SLOTS <= ARRAY_SIZE(kmu_key_ids),
36-
"Invalid number of KMU slots, up to 3 are supported on nRF54L15");
33+
#define KMU_KEY_COUNT (sizeof(kmu_key_ids)/sizeof(kmu_key_ids[0]))
3734
#endif
3835

3936
#if !defined(CONFIG_BOOT_SIGNATURE_USING_KMU)
@@ -108,7 +105,7 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
108105

109106
status = PSA_ERROR_BAD_STATE;
110107

111-
for (int i = 0; i < CONFIG_BOOT_SIGNATURE_KMU_SLOTS; ++i) {
108+
for (int i = 0; i < KMU_KEY_COUNT; ++i) {
112109
psa_key_id_t kid = kmu_key_ids[i];
113110

114111
status = psa_verify_message(kid, PSA_ALG_PURE_EDDSA, message,

boot/zephyr/Kconfig

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -346,18 +346,6 @@ config BOOT_SIGNATURE_USING_KMU
346346
MCUboot will use keys provisioned to the device key management unit for signature
347347
verification instead of compiling in key data from a file.
348348

349-
if BOOT_SIGNATURE_USING_KMU
350-
351-
config BOOT_SIGNATURE_KMU_SLOTS
352-
int "KMU key slots"
353-
range 1 3
354-
default 1
355-
help
356-
Selects the number of KMU key slots (also known as generations) to use when verifying
357-
an image.
358-
359-
endif
360-
361349
if !BOOT_SIGNATURE_USING_KMU
362350

363351
config BOOT_SIGNATURE_KEY_FILE

0 commit comments

Comments
 (0)