Skip to content

Commit 0a62db2

Browse files
committed
nrf_security: auto-enable PSA_WANT_ALG_ECB_NO_PADDING
Auto-enable PSA_WANT_ALG_ECB_NO_PADDING when MBEDTLS_BUILTIN and CCM or GCM is enabled and !MBEDTLS_FORCE_LEGACY_CIPHER. ECB is needed by the block_cipher module in Mbed TLS when MBEDTLS_BLOCK_CIPHER_SOME_PSA. Because of a noup we have to enable that in our Mbed TLS fork, ECB ends up needing to be enabled when using Mbed TLS' PSA API to encrypt/decrypt data with CCM/GCM because the code goes to block_cipher. Rather than having to enable that dependency everywhere it's needed, auto-enable it in those conditions. Also, move the PSA_WANT_ALG Kconfig options that were separate from the others. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
1 parent cf483fb commit 0a62db2

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

subsys/nrf_security/Kconfig.psa.nordic

+14-8
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,20 @@ config PSA_WANT_ALG_XTS
219219
bool "PSA XTS block cipher mode support" if !PSA_PROMPTLESS
220220
default y if PSA_CRYPTO_ENABLE_ALL
221221

222+
config PSA_WANT_ALG_CHACHA20
223+
bool "PSA CHACHA20 stream cipher support" if !PSA_PROMPTLESS
224+
default y if PSA_CRYPTO_ENABLE_ALL
225+
226+
config PSA_WANT_ALG_SHAKE256_512
227+
bool "PSA SHAKE256 512 bits support" if !PSA_PROMPTLESS
228+
default y if PSA_CRYPTO_ENABLE_ALL
229+
230+
config PSA_WANT_ALG_ECB_NO_PADDING
231+
bool "PSA ECB support" if !PSA_PROMPTLESS
232+
default y if PSA_CRYPTO_ENABLE_ALL
233+
default y if MBEDTLS_BUILTIN && !MBEDTLS_FORCE_LEGACY_CIPHER && \
234+
PSA_WANT_KEY_TYPE_AES && (PSA_WANT_ALG_GCM || PSA_WANT_ALG_CCM)
235+
222236
comment "Nordic added ECC curve types"
223237

224238
config PSA_WANT_ECC_BRAINPOOL_P_R1_160
@@ -298,14 +312,6 @@ config PSA_WANT_ECC_SECT_R2_163
298312
config PSA_WANT_ECC_FRP_V1_256
299313
bool "PSA ECC FRP256v1 support" if !PSA_PROMPTLESS
300314

301-
config PSA_WANT_ALG_CHACHA20
302-
bool "PSA CHACHA20 stream cipher support" if !PSA_PROMPTLESS
303-
default y if PSA_CRYPTO_ENABLE_ALL
304-
305-
config PSA_WANT_ALG_SHAKE256_512
306-
bool "PSA SHAKE256 512 bits support" if !PSA_PROMPTLESS
307-
default y if PSA_CRYPTO_ENABLE_ALL
308-
309315
comment "Nordic addded RNG configuration"
310316

311317
config PSA_WANT_GENERATE_RANDOM

0 commit comments

Comments
 (0)