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

fix block_cipher configuration #41

Merged
merged 8 commits into from
Mar 24, 2025

Conversation

tomi-font
Copy link
Contributor

@tomi-font tomi-font commented Mar 17, 2025

See commit messages.

…MD/CIPHER"

This reverts commit 98603a8.

Temporary revert to rework some conflicting commits.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
tomi-font and others added 7 commits March 20, 2025 11:00
This reverts commit 2cc273b.

Reverting this noup to split it into its different logical parts.

Part of the changes in this noup is re-applied from upstream commits
now that PR 9562 is merged upstream.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This reverts commit d75b3f6.

This duplicated what was done in config_adjust_legacy_crypto.h
by 2cc273b.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
…abled

Instead of allowing PSA dispatching only when CRYPTO_C is set and
some MBEDTLS_PSA_ACCEL_ALG_xxx is set, we enable dispatching
when CRYPTO_CLIENT and PSA_WANT_ALG_xxx are set. This makes
the feature more useful in cases where the PSA support is
provided externally, like for example TF-M in Zephyr.

This commit also add proper guards for tests trying to use MD+PSA
dispatch.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
(cherry picked from commit c516307ad90d24de7f6f83e6b2fd825329ce5824)
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This change is re-applied from commit
2cc273b that was reverted
to split it into separate noups.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Make definitions from md.h available in psa_util.h.

This change is re-applied from commit
2cc273b that was reverted
to split it into separate noups.

This is needed otherwise we get errors regarding missing definitions,
e.g. of mbedtls_md_type_t in mbedtls_md_type_from_psa_alg().

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Make block_cipher call into PSA.
This allows code calling legacy CCM/GCM to end up calling
PSA Crypto, especially useful from NS when TF-M is in use.

This change is re-applied from commit
2cc273b that was reverted
to split it into separate noups.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
-This allows TF-M minimal configuration to stil dispatch using legacy
 while we are waiting for more apps/samples to be ported to use
 PSA crypto APIs

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
(edited cherry pick of 98603a8)
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
@tomi-font tomi-font force-pushed the fix_block-cipher_configuration branch from 309e5bf to 918f858 Compare March 20, 2025 11:10
Copy link
Contributor

@frkv frkv left a comment

Choose a reason for hiding this comment

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

LGTM

@Vge0rge Vge0rge self-requested a review March 20, 2025 12:08
@nordicjm nordicjm merged commit f109c9b into nrfconnect:main Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants