Skip to content

Commit 14b68f5

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 fe07af0 commit 14b68f5

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

subsys/nrf_security/Kconfig.psa.nordic

+36-30
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,42 @@ 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_ECB_NO_PADDING
223+
bool "PSA ECB support" if !PSA_PROMPTLESS
224+
default y if PSA_CRYPTO_ENABLE_ALL
225+
default y if MBEDTLS_BUILTIN && !MBEDTLS_FORCE_LEGACY_CIPHER && \
226+
PSA_WANT_KEY_TYPE_AES && (PSA_WANT_ALG_GCM || PSA_WANT_ALG_CCM)
227+
228+
config PSA_WANT_ALG_CHACHA20
229+
bool "PSA CHACHA20 stream cipher support" if !PSA_PROMPTLESS
230+
default y if PSA_CRYPTO_ENABLE_ALL
231+
232+
config PSA_WANT_ALG_SHAKE256_512
233+
bool "PSA SHAKE256 512 bits support" if !PSA_PROMPTLESS
234+
default y if PSA_CRYPTO_ENABLE_ALL
235+
236+
config PSA_WANT_ALG_AES_KW
237+
bool "AES key wrap support (NIST-SP-800-38F and RFC3394)" if !MBEDTLS_PROMPTLESS
238+
select EXPERIMENTAL
239+
240+
config PSA_WANT_ALG_AES_KWP
241+
bool "AES key wrap support (NIST-SP-800-38F and RFC5649)" if !MBEDTLS_PROMPTLESS
242+
select EXPERIMENTAL
243+
244+
config PSA_WANT_ALG_WPA3_SAE_PT
245+
bool "WPA3-SAE-PT support" if !MBEDTLS_PROMPTLESS
246+
select EXPERIMENTAL
247+
248+
config PSA_WANT_ALG_WPA3_SAE
249+
bool "WPA3-SAE support" if !MBEDTLS_PROMPTLESS
250+
select EXPERIMENTAL
251+
252+
config PSA_WANT_ALG_SP800_108_COUNTER_CMAC
253+
bool "NIST SP 800-108 conformant CMAC based KDF" if !MBEDTLS_PROMPTLESS
254+
255+
config PSA_WANT_ALG_SP800_108_COUNTER_HMAC
256+
bool "NIST SP 800-108 conformant HMAC based KDF" if !MBEDTLS_PROMPTLESS
257+
222258
comment "Nordic added ECC curve types"
223259

224260
config PSA_WANT_ECC_BRAINPOOL_P_R1_160
@@ -298,36 +334,6 @@ config PSA_WANT_ECC_SECT_R2_163
298334
config PSA_WANT_ECC_FRP_V1_256
299335
bool "PSA ECC FRP256v1 support" if !PSA_PROMPTLESS
300336

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-
309-
config PSA_WANT_ALG_AES_KW
310-
bool "AES key wrap support (NIST-SP-800-38F and RFC3394)" if !MBEDTLS_PROMPTLESS
311-
select EXPERIMENTAL
312-
313-
config PSA_WANT_ALG_AES_KWP
314-
bool "AES key wrap support (NIST-SP-800-38F and RFC5649)" if !MBEDTLS_PROMPTLESS
315-
select EXPERIMENTAL
316-
317-
config PSA_WANT_ALG_WPA3_SAE_PT
318-
bool "WPA3-SAE-PT support" if !MBEDTLS_PROMPTLESS
319-
select EXPERIMENTAL
320-
321-
config PSA_WANT_ALG_WPA3_SAE
322-
bool "WPA3-SAE support" if !MBEDTLS_PROMPTLESS
323-
select EXPERIMENTAL
324-
325-
config PSA_WANT_ALG_SP800_108_COUNTER_CMAC
326-
bool "NIST SP 800-108 conformant CMAC based KDF" if !MBEDTLS_PROMPTLESS
327-
328-
config PSA_WANT_ALG_SP800_108_COUNTER_HMAC
329-
bool "NIST SP 800-108 conformant HMAC based KDF" if !MBEDTLS_PROMPTLESS
330-
331337
comment "Nordic addded RNG configuration"
332338

333339
config PSA_WANT_GENERATE_RANDOM

0 commit comments

Comments
 (0)