Skip to content

Commit e119e71

Browse files
committed
softdevice_handler: Use TRNG from Cracen
Use the entropy directly from the TRNG peripheral of Cracen for Softdevice. This is done because softdevice needs true RNG data and internally calculates the PRNG data needed for its operation. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 97734f1 commit e119e71

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/nrf-bm/release_notes/release_notes_changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SoftDevice Handler
2828
==================
2929

3030
* Updated the system initialization to initialize on application level.
31+
* Updated the entropy source to use the Cracen true random number generator instead of the Cracen pseudorandom number generator.
3132

3233
Boards
3334
======

subsys/softdevice_handler/nrf_sdh_soc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <nrf_sdh_soc.h>
1111
#include <nrf_soc.h>
1212
#include <psa/crypto.h>
13+
#include <cracen_psa.h>
1314
#include <zephyr/logging/log.h>
1415

1516
LOG_MODULE_DECLARE(nrf_sdh, CONFIG_NRF_SDH_LOG_LEVEL);
@@ -48,7 +49,7 @@ static void softdevice_rng_seed(void)
4849
psa_status_t status;
4950
uint8_t seed[SD_RAND_SEED_SIZE];
5051

51-
status = psa_generate_random(seed, sizeof(seed));
52+
status = cracen_get_trng(seed, sizeof(seed));
5253
if (status == PSA_SUCCESS) {
5354
err = sd_rand_seed_set(seed);
5455
memset(seed, 0, sizeof(seed));

0 commit comments

Comments
 (0)