Skip to content
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

nrf_security: Added support for PSA Crypto service #14923

Closed
wants to merge 1 commit into from

Conversation

osaether
Copy link
Contributor

@osaether osaether commented Apr 18, 2024

Added support for PSA Crypto service

-Adding configuration PSA_SSF_CRYPTO_CLIENT for a local domain build
which enables PSA core-less build where ssf_crypto provides the
PSA crypto APIs directly.
-Adding Kconfig in PSA_CORE choice: PSA_CORE_DISABLED when SSF_CLIENT
is enabled which provides PSA crypto built into the SDFW image.
-Enabling MBEDTLS_PSA_CRYPTO_SPM for builds when SSF_SERVER is enabled
(zephyr based build with no TF-M in SDFW).
-Add MBEDTLS_USE_PSA_CRYPTO for legacy build to ensure it is using
PSA APIs based on SSF_CLIENT enabled.
-Add logic to give SSF_CLIENT access to the psa/crypto.h from Oberon
without building the PSA core locally.
-Add logic to consider both BUILD_WITH_TFM or SSF_CLIENT as something that
provides PSA crypto services as a client.

Ref: NCSDK-15632

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Apr 18, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 18, 2024

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-fw-nrfconnect-chip X
test-fw-nrfconnect-nrf_crypto X
test-fw-nrfconnect-tfm X
test-sdk-find-my X
test-sdk-sidewalk X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

psa_status_t psa_crypto_init(void)
{
return ssf_psa_crypto_init();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In TF-M this function looks like this:

image

could we do the same optimization here?

Just return PSA_SUCCESS here. And have SDFW invoke psa_crypto_init before it boots the local domain?

@osaether osaether force-pushed the psa_crypto_service branch from d80f1ed to a90a9ce Compare April 18, 2024 07:35
@osaether osaether changed the title subsys: Added support for PSA Crypto service subsys: nrf_security: Added support for PSA Crypto service Apr 18, 2024
@osaether osaether force-pushed the psa_crypto_service branch from a90a9ce to 93ed582 Compare April 18, 2024 07:54
@hakonfam
Copy link
Contributor

Do you need to rebase on top of #14883 ? Since this is the version secdom is pulling in.

@osaether osaether changed the title subsys: nrf_security: Added support for PSA Crypto service nrf_security: Added support for PSA Crypto service Apr 18, 2024
@osaether osaether force-pushed the psa_crypto_service branch 3 times, most recently from 89a682d to b6a5119 Compare April 18, 2024 10:44
@osaether osaether force-pushed the psa_crypto_service branch 8 times, most recently from d453ad1 to dfe2a6b Compare April 21, 2024 11:50
@osaether osaether force-pushed the psa_crypto_service branch 2 times, most recently from b9d39be to 1574b17 Compare April 22, 2024 06:55
@osaether osaether force-pushed the psa_crypto_service branch 4 times, most recently from 1dbaaf6 to bafef3f Compare April 22, 2024 09:33

config PSA_CORE_DISABLED
bool
prompt "PSA core-less for SSF crypto client support"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this user configurable?
wouldn't it be better to set default y with depends on PSA_SSF_CRYPTO_CLIENT

@osaether osaether added the DNM label Apr 23, 2024
Added support for PSA Crypto service

-Adding configuration PSA_SSF_CRYPTO_CLIENT for a local domain build
 which enables PSA core-less build where ssf_crypto provides the
 PSA crypto APIs directly.
-Adding Kconfig in PSA_CORE choice: PSA_CORE_DISABLED when  SSF_CLIENT
 is enabled which provides PSA crypto built into the SDFW image.
-Enabling MBEDTLS_PSA_CRYPTO_SPM for builds when SSF_SERVER is enabled
 (zephyr based build with no TF-M in SDFW).
-Add MBEDTLS_USE_PSA_CRYPTO for legacy build to ensure it is using
 PSA APIs based on SSF_CLIENT enabled.
-Add logic to give SSF_CLIENT access to the psa/crypto.h from Oberon
 without building the PSA core locally.
-Add logic to consider both BUILD_WITH_TFM or SSF_CLIENT as something
 that provides PSA crypto services as a client.

Ref: NCSDK-15632

Signed-off-by: Ole Sæther <[email protected]>
Signed-off-by: Frank Audun Kvamtrø <[email protected]>
@osaether osaether force-pushed the psa_crypto_service branch from bafef3f to 731ac29 Compare April 23, 2024 12:06
@osaether osaether closed this Apr 29, 2024
@osaether
Copy link
Contributor Author

Superseded by this:
#15054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. DNM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants