Skip to content

zephyr: Enable building ECDSA PSA variant #2392

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

Merged
merged 1 commit into from
Jul 22, 2025
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
5 changes: 4 additions & 1 deletion boot/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ else()
endif()

if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
if(MBEDTLS_ASN1_DIR)
# When ECDSA PSA is used, do not pull in additional ASN.1 include
# directories or sources, as it would cause incorrect header files
# to be included.
if(MBEDTLS_ASN1_DIR AND NOT CONFIG_BOOT_ECDSA_PSA)
zephyr_library_include_directories(
${MBEDTLS_ASN1_DIR}/include
)
Expand Down
18 changes: 18 additions & 0 deletions boot/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ config BOOT_X25519_PSA_DEPENDENCIES

endif # BOOT_ENCRYPT_IMAGE

config BOOT_ECDSA_PSA_DEPENDENCIES
bool
select PSA_WANT_ALG_ECDSA
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
select PSA_WANT_ECC_SECP_R1_256
help
Dependencies for ECDSA signature

if MBEDTLS_ENABLE_HEAP

config MBEDTLS_HEAP_SIZE
Expand Down Expand Up @@ -282,6 +290,16 @@ config BOOT_ECDSA_CC310
select NRF_CC310_BL
select NRFXLIB_CRYPTO
select BOOT_USE_CC310

config BOOT_ECDSA_PSA
bool "Use psa cryptoo"
select BOOT_USE_PSA_CRYPTO
select PSA_CRYPTO_CLIENT
select PSA_CRYPTO_C
select BOOT_IMG_HASH_ALG_SHA256_ALLOW
select BOOT_IMG_HASH_ALG_SHA512_ALLOW
select BOOT_ECDSA_PSA_DEPENDENCIES

endchoice # Ecdsa implementation
endif

Expand Down
Loading