Skip to content

Commit cdc5d1c

Browse files
de-nordicnvlsianpu
authored andcommitted
[nrf noup] bootutil: ed25519 psa KMU: Key attempt log
Adding additional LOG_DBG with information of which key validation is attempted. Signed-off-by: Dominik Ermel <[email protected]> Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent 73497f4 commit cdc5d1c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

boot/bootutil/src/ed25519_psa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
3030
psa_key_id_t kid;
3131
int ret = 0; /* Fail by default */
3232

33-
BOOT_LOG_DBG("ED25519_verify: PSA implementation");
33+
BOOT_LOG_DBG("ED25519_verify: PSA implementation, plain kye");
3434

3535
/* Initialize PSA Crypto */
3636
status = psa_crypto_init();

boot/bootutil/src/ed25519_psa_kmu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <assert.h>
77
#include <string.h>
88
#include <stdint.h>
9+
#include <inttypes.h>
910

1011
#include <mcuboot_config/mcuboot_config.h>
1112
#include "bootutil/bootutil_log.h"
@@ -74,10 +75,12 @@ int ED25519_verify(const uint8_t *message, size_t message_len,
7475
}
7576

7677
status = PSA_ERROR_BAD_STATE;
78+
BOOT_LOG_DBG("ED25519_verify: total key count %d", KEY_SLOTS_COUNT);
7779

7880
for (int i = 0; i < KEY_SLOTS_COUNT; ++i) {
7981
psa_key_id_t kid = key_ids[i];
8082

83+
BOOT_LOG_DBG("ED25519_verify: trying key ID 0x%" PRIx32, (uint32_t)kid);
8184
status = psa_verify_message(kid, PSA_ALG_PURE_EDDSA, message,
8285
message_len, signature,
8386
EDDSA_SIGNAGURE_LENGTH);

0 commit comments

Comments
 (0)