Skip to content

Commit 17180ec

Browse files
committed
Revert "[nrf noup] boot: bootutil: Allow configuring number of KMU keys"
This reverts commit 373038b. Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent a9f6e14 commit 17180ec

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
@@ -398,18 +398,6 @@ config BOOT_SIGNATURE_USING_KMU
398398
MCUboot will use keys provisioned to the device key management unit for signature
399399
verification instead of compiling in key data from a file.
400400

401-
if BOOT_SIGNATURE_USING_KMU
402-
403-
config BOOT_SIGNATURE_KMU_SLOTS
404-
int "KMU key slots"
405-
range 1 3
406-
default 1
407-
help
408-
Selects the number of KMU key slots (also known as generations) to use when verifying
409-
an image.
410-
411-
endif
412-
413401
if !BOOT_SIGNATURE_USING_KMU
414402

415403
config BOOT_SIGNATURE_KEY_FILE

0 commit comments

Comments
 (0)