Skip to content

Commit

Permalink
samples: wifi: Disable PSA RNG for all samples
Browse files Browse the repository at this point in the history
The PSA RNG will be the default entropy provider for
nrf54h20. This change affects the crypto functionality
in general since it makes the secure domain the sole provider
of crypto through the PSA APIs. This has the sideffect that the
legacy mbecrypto APIs are not currently supported.

Since wifi relies on the mbedTLS legacy crypto functionality
we need to make sure that it continues to work as before.

In this change we disable the PSA RNG as the entropy provider and
we explicitely set it to be the PRNG. This makes sure that the crypto
funcionality is provided by the software implementation which supports
the legacy APIs and not from the secure domain.

This should not change anything functionaly. It only makes sure that the
wifi samples do not inherit enabling the PSA RNG as the entropy provider
by default.

Signed-off-by: Georgios Vasilakis <[email protected]>

	../../subsys/nrf_security/src/drivers/fancy_new_cc3xx
  • Loading branch information
Vge0rge committed Jan 13, 2025
1 parent ceb2112 commit 2a6c56a
Show file tree
Hide file tree
Showing 16 changed files with 448 additions and 0 deletions.
28 changes: 28 additions & 0 deletions samples/wifi/ble_coex/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/monitor/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/promiscuous/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/radio_test/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/scan/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/shell/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/shutdown/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/softap/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/sta/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
28 changes: 28 additions & 0 deletions samples/wifi/thread_coex/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
prng: prng {
compatible = "nordic,entropy-prng";
status = "okay";
};

chosen {
zephyr,entropy = &prng;
};

psa_rng: psa-rng {
status = "disabled";
};
};


&cpusec_cpuapp_ipc {
status = "disabled";
};

&cpusec_bellboard {
status = "disabled";
};
Loading

0 comments on commit 2a6c56a

Please sign in to comment.