Skip to content
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
9 changes: 0 additions & 9 deletions modules/mbedtls/Kconfig.mbedtls
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,14 @@ comment "Supported key exchange modes"

config MBEDTLS_RSA_C
bool "RSA base support"
default y if UOSCORE || UEDHOC

if MBEDTLS_RSA_C

config MBEDTLS_PKCS1_V15
bool "RSA PKCS1 v1.5"
default y if UOSCORE || UEDHOC

config MBEDTLS_PKCS1_V21
bool "RSA PKCS1 v2.1"
default y if UOSCORE || UEDHOC

config MBEDTLS_GENPRIME_ENABLED
bool "Prime number generation code"
Expand Down Expand Up @@ -104,7 +101,6 @@ config MBEDTLS_PSK_MAX_LEN

config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
bool "RSA-only based ciphersuite modes"
default y if UOSCORE || UEDHOC
depends on MBEDTLS_MD
depends on PSA_CRYPTO_CLIENT || MBEDTLS_PKCS1_V15 || MBEDTLS_PKCS1_V21
select PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY if PSA_CRYPTO_CLIENT
Expand Down Expand Up @@ -173,7 +169,6 @@ config MBEDTLS_ECJPAKE_C

config MBEDTLS_ECP_C
bool "Elliptic curve over GF(p) library"
default y if UOSCORE || UEDHOC

if MBEDTLS_ECP_C

Expand Down Expand Up @@ -205,7 +200,6 @@ config MBEDTLS_ECP_DP_SECP224R1_ENABLED

config MBEDTLS_ECP_DP_SECP256R1_ENABLED
bool "SECP256R1 elliptic curve"
default y if UOSCORE || UEDHOC

config MBEDTLS_ECP_DP_SECP384R1_ENABLED
bool "SECP384R1 elliptic curve"
Expand Down Expand Up @@ -309,7 +303,6 @@ if MBEDTLS_SOME_AEAD_CIPHER_ENABLED

config MBEDTLS_CIPHER_CCM_ENABLED
bool "Counter with CBC-MAC (CCM) mode for 128-bit block cipher"
default y if UOSCORE || UEDHOC

config MBEDTLS_CIPHER_GCM_ENABLED
bool "Galois/Counter Mode (GCM) for symmetric ciphers"
Expand Down Expand Up @@ -398,7 +391,6 @@ config MBEDTLS_CIPHER

config MBEDTLS_MD
bool "generic message digest layer."
default y if UOSCORE || UEDHOC

config MBEDTLS_ASN1_PARSE_C
bool "Support for ASN1 parser functions"
Expand Down Expand Up @@ -594,7 +586,6 @@ config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG
config MBEDTLS_PSA_CRYPTO_C
bool "Platform Security Architecture cryptography API"
depends on !BUILD_WITH_TFM
default y if UOSCORE || UEDHOC

config MBEDTLS_USE_PSA_CRYPTO
bool "Use PSA APIs instead of legacy MbedTLS when possible"
Expand Down
23 changes: 23 additions & 0 deletions modules/uoscore-uedhoc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ menuconfig UOSCORE
depends on ZCBOR
depends on ZCBOR_CANONICAL
depends on MBEDTLS
select UOSCORE_UEDHOC_CRYPTO_COMMON

help
This option enables the UOSCORE library.

Expand All @@ -21,6 +23,7 @@ menuconfig UEDHOC
depends on ZCBOR
depends on ZCBOR_CANONICAL
depends on MBEDTLS
select UOSCORE_UEDHOC_CRYPTO_COMMON
help
This option enables the UEDHOC library.

Expand All @@ -30,3 +33,23 @@ config UEDHOC_DEBUG
bool "Debug logs in the uedhoc library"

endif # UEDHOC

if UOSCORE || UEDHOC

config UOSCORE_UEDHOC_CRYPTO_COMMON
bool
imply MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
select PSA_WANT_ALG_ECDH
select PSA_WANT_ALG_ECDSA
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE
select PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY
select PSA_WANT_ECC_SECP_R1_256
select PSA_WANT_KEY_TYPE_AES
select PSA_WANT_ALG_CCM
select PSA_WANT_KEY_TYPE_HMAC
select PSA_WANT_ALG_HMAC
select PSA_WANT_ALG_SHA_256

endif # UOSCORE || UEDHOC
11 changes: 0 additions & 11 deletions tests/modules/uoscore/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,3 @@ CONFIG_UOSCORE=y
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=2048
CONFIG_MBEDTLS_ENTROPY_C=y

# PSA Crypto options

CONFIG_PSA_WANT_ALG_CCM=y
CONFIG_PSA_WANT_ALG_HMAC=y

CONFIG_PSA_WANT_KEY_TYPE_HMAC=y
CONFIG_PSA_WANT_KEY_TYPE_AES=y
CONFIG_PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY=y
CONFIG_PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY=y