-
Notifications
You must be signed in to change notification settings - Fork 1.4k
nrf_ironside: Move Ironside outside of nrf_security #24862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -4,6 +4,8 @@ | |||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||||
# | ||||
|
||||
if(CONFIG_PSA_SSF_CRYPTO_CLIENT) | ||||
|
||||
zephyr_library() | ||||
zephyr_library_sources( | ||||
# ironside_psa_ns_api.c provides psa_call, which sends a message over IPC. | ||||
|
@@ -16,13 +18,30 @@ zephyr_library_sources( | |||
) | ||||
|
||||
zephyr_library_include_directories( | ||||
. | ||||
${NRF_DIR}/include/tfm | ||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include | ||||
. | ||||
# Oberon PSA headers | ||||
${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR}/include | ||||
${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR}/library | ||||
) | ||||
|
||||
if(CONFIG_PSA_SSF_CRYPTO_CLIENT_OUT_BOUNCE_BUFFERS) | ||||
zephyr_library_sources( | ||||
${CMAKE_CURRENT_LIST_DIR}/bounce_buffers.c | ||||
) | ||||
endif() | ||||
|
||||
zephyr_include_directories( | ||||
. | ||||
${NRF_DIR}/include/tfm | ||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include | ||||
# Oberon PSA headers | ||||
${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR}/include | ||||
${ZEPHYR_OBERON_PSA_CRYPTO_MODULE_DIR}/library | ||||
) | ||||
|
||||
zephyr_compile_definitions(MBEDTLS_PSA_CRYPTO_CONFIG_FILE="ironside_config.h") | ||||
zephyr_compile_definitions(MBEDTLS_CONFIG_FILE="ironside_config.h") | ||||
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't this a Kconfig? |
||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,17 @@ config PSA_SSF_CRYPTO_CLIENT | |
bool | ||
prompt "PSA crypto provided through SSF" | ||
default y | ||
depends on SOC_NRF54H20 || SOC_SERIES_NRF92X | ||
depends on SOC_NRF54H20_CPUAPP || SOC_NRF54H20_CPURAD || SOC_SERIES_NRF92X | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presumably 92X should also be split up into CPUAPP and CPUCELL? |
||
select NRF_IRONSIDE_CALL | ||
select PSA_CRYPTO_CLIENT | ||
select PSA_CRYPTO | ||
|
||
if PSA_SSF_CRYPTO_CLIENT | ||
|
||
choice PSA_CRYPTO_PROVIDER | ||
default PSA_CRYPTO_PROVIDER_CUSTOM | ||
endchoice | ||
|
||
config PSA_SSF_CRYPTO_CLIENT_OUT_BOUNCE_BUFFERS | ||
bool "Support PSA crypto with output buffers that are not cache-safe" | ||
default y | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#define MBEDTLS_PSA_CRYPTO_CLIENT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#ifndef PSA_CRYPTO_DRIVER_CONFIG_H | ||
#define PSA_CRYPTO_DRIVER_CONFIG_H | ||
|
||
#if defined(MBEDTLS_PSA_CRYPTO_CONFIG_FILE) | ||
#include MBEDTLS_PSA_CRYPTO_CONFIG_FILE | ||
#else | ||
#include "psa/crypto_config.h" | ||
#endif | ||
|
||
#endif /* PSA_CRYPTO_DRIVER_CONFIG_H */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ config NRF_SECURITY | |
bool | ||
prompt "nRF Security" if !PSA_PROMPTLESS | ||
depends on SOC_FAMILY_NORDIC_NRF | ||
depends on !NRF_IRONSIDE_CALL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this break if someone wants to use some software crypto on nrf54h20? You aren't really incompatible with NRF_IRONSIDE_CALL I'd say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. software crypto on nrf54h20 is not supported. So if it does break, then that is intended behaviour :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If they want to use it along with the hardware crypto yes. But it should break because at the moment no-one worked on this use case. If it worked by accident before it is better to break so that someone can think how to properly support this use case. Edit: Sebastians comment didn't show up before I sent this. But we are saying the exact same thing basically :) |
||
default y if BUILD_WITH_TFM | ||
# entropy is provided by PSA and NRF_SECURITY on NRF54LX and NRF71X | ||
default y if DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED && SOC_SERIES_NRF54LX && !IS_BOOTLOADER_IMG && GEN_ISR_TABLES | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and missing indent