Skip to content

Commit 576a3b0

Browse files
Vge0rgeeivindj-nordic
authored andcommitted
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 c6e3115 commit 576a3b0

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
@@ -29,6 +29,7 @@ SoftDevice Handler
2929

3030
* Added the :c:func:`nrf_sdh_ble_conn_handle_get` function.
3131
* Updated the system initialization to initialize on application level.
32+
* Updated the entropy source to use the CRACEN true random number generator instead of the CRACEN pseudorandom number generator.
3233

3334
Boards
3435
======

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)