Skip to content

Commit c54dc45

Browse files
committed
bootutil: ed25519 psa: define bootutil_crypto_backend_init
ED25519 PSA now provides own backend initialization function. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 7bb1152 commit c54dc45

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

boot/bootutil/src/ed25519_psa.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ BOOT_LOG_MODULE_REGISTER(ed25519_psa);
1919
#define EDDSA_KEY_LENGTH 32
2020
#define EDDSA_SIGNAGURE_LENGTH 64
2121

22+
int bootutil_crypto_backend_init(void)
23+
{
24+
psa_status_t status = psa_crypto_init();
25+
if (status != PSA_SUCCESS) {
26+
BOOT_LOG_ERR("PSA crypto init failed %d\n", status);
27+
return false;
28+
}
29+
return true;
30+
}
31+
2232
int ED25519_verify(const uint8_t *message, size_t message_len,
2333
const uint8_t signature[EDDSA_SIGNAGURE_LENGTH],
2434
const uint8_t public_key[EDDSA_KEY_LENGTH])

0 commit comments

Comments
 (0)