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

manifest: Remove cryptocell usable configs and use HAS_HW instead #10863

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/entropy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

config ENTROPY_CC3XX
bool "Arm CC3XX RNG driver for Nordic devices"
depends on (CRYPTOCELL_USABLE && !BUILD_WITH_TFM)
depends on HAS_HW_NRF_CC3XX && !BUILD_WITH_TFM
depends on ENTROPY_GENERATOR
select ENTROPY_HAS_DRIVER
default y
Expand Down
18 changes: 9 additions & 9 deletions subsys/nrf_security/Kconfig.legacy
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ config MBEDTLS_CCM_ALT
config MBEDTLS_GCM_ALT
bool
depends on CC312_BACKEND || \
(PSA_CRYPTO_DRIVER_CC3XX && CRYPTOCELL_CC312_USABLE)
(PSA_CRYPTO_DRIVER_CC3XX && HAS_HW_NRF_CC312)
default y

config MBEDTLS_CHACHA20_ALT
Expand Down Expand Up @@ -220,12 +220,12 @@ config NRF_SECURITY_ADVANCED
config CC310_ONLY_PSA_ENABLED
bool
default y
depends on CRYPTOCELL_CC310_USABLE && !PSA_CRYPTO_DRIVER_OBERON
depends on HAS_HW_NRF_CC310 && !PSA_CRYPTO_DRIVER_OBERON

config CC312_ONLY_PSA_ENABLED
bool
default y
depends on CRYPTOCELL_CC312_USABLE && !PSA_CRYPTO_DRIVER_OBERON
depends on HAS_HW_NRF_CC312 && !PSA_CRYPTO_DRIVER_OBERON

config CC310_ONLY_ENABLED
bool
Expand Down Expand Up @@ -284,15 +284,15 @@ if MBEDTLS_LEGACY_CRYPTO_C

config CC310_BACKEND
bool
depends on CRYPTOCELL_CC310_USABLE && !BUILD_WITH_TFM && \
depends on HAS_HW_NRF_CC310 && !BUILD_WITH_TFM && \
(PSA_CRYPTO_DRIVER_CC3XX || CC3XX_BACKEND)
default y
help
Convenience configuration to state explicitly that CryptoCell CC310 is enabled.

config CC312_BACKEND
bool
depends on CRYPTOCELL_CC312_USABLE && !BUILD_WITH_TFM && \
depends on HAS_HW_NRF_CC312 && !BUILD_WITH_TFM && \
(PSA_CRYPTO_DRIVER_CC3XX || CC3XX_BACKEND)
default y
help
Expand All @@ -306,7 +306,7 @@ config OBERON_BACKEND_FORCED

config CC3XX_BACKEND
bool
depends on CRYPTOCELL_USABLE && !OBERON_BACKEND_FORCED
depends on HAS_HW_NRF_CC3XX && !OBERON_BACKEND_FORCED
prompt "Configuration to enable CryptoCell CC3XX for legacy mbed TLS APIs"
help
This configuration enables legacy mbed TLS APIs using cc3xx.
Expand All @@ -327,14 +327,14 @@ config MBEDTLS_CTR_DRBG_C
bool
prompt "PRNG using CTR_DRBG"
select MBEDTLS_AES_C
default y if !CRYPTOCELL_USABLE
default y if !HAS_HW_NRF_CC3XX
help
This setting will enable CTR_DRBG APIs in mbed TLS.
Corresponds to MBEDTLS_CTR_DRBG_C setting in mbed TLS config file.

config MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
bool
default y if CRYPTOCELL_CC310_USABLE
default y if HAS_HW_NRF_CC310
help
Use 128 bit AES instead of 256 bit for CTR_DRBG.

Expand All @@ -355,7 +355,7 @@ config MBEDTLS_ENTROPY_C
bool
prompt "Entropy gathering"
depends on !MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
default y if !CRYPTOCELL_USABLE
default y if !HAS_HW_NRF_CC3XX
help
Enable this setting to build entropy APIs usable to gather entropy
form external sources. Only in use for devices that doesn't have
Expand Down
3 changes: 1 addition & 2 deletions subsys/nrf_security/src/drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ config PSA_CRYPTO_DRIVER_OBERON
config PSA_CRYPTO_DRIVER_CC3XX
prompt "CryptoCell PSA driver"
bool
depends on HAS_HW_NRF_CC3XX
help
This configuration enables the usage of CryptoCell for the supported operations.
Disabling this option will result in all crypto operations being handled by
Expand Down Expand Up @@ -128,14 +129,12 @@ config PSA_USE_CC3XX_CTR_DRBG_DRIVER
bool
default y
depends on PSA_USE_CTR_DRBG_DRIVER
depends on CRYPTOCELL_USABLE
depends on BUILD_WITH_TFM || NRF_CC3XX_PLATFORM

config PSA_USE_CC3XX_HMAC_DRBG_DRIVER
bool
default y
depends on PSA_USE_HMAC_DRBG_DRIVER
depends on CRYPTOCELL_USABLE
depends on BUILD_WITH_TFM || NRF_CC3XX_PLATFORM

endmenu
Expand Down
2 changes: 1 addition & 1 deletion subsys/nrf_security/src/legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(CONFIG_MBEDTLS_LEGACY_CRYPTO_C OR
)
endif()

if(CONFIG_CRYPTOCELL_CC310_USABLE)
if(CONFIG_HAS_HW_NRF_CC310)
append_with_prefix(src_crypto_legacy ${ARM_MBEDTLS_PATH}/library
gcm.c
)
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ manifest:
- name: nrfxlib
repo-path: sdk-nrfxlib
path: nrfxlib
revision: 89d19c9b364ddd6cb54c1926649769246d1138a4
revision: ccf385bbdf7d8be61c3a96134f014f05fbd801d6
- name: trusted-firmware-m
repo-path: sdk-trusted-firmware-m
path: modules/tee/tf-m/trusted-firmware-m
Expand Down
Loading