mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
feat(auth): ecdsa p384 key support
Use KEY_SIZE 384 to enable ECDSA P384 key support by setting MBEDTLS_ECP_DP_SECP384R1_ENABLED. Selected by setting KEY_ALG=ecdsa and KEY_SIZE=384. Change-Id: I382f34fc4da98f166a2aada5d16fdf44632b47f5 Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
This commit is contained in:
parent
c512c89cde
commit
557f7d806a
2 changed files with 17 additions and 3 deletions
|
@ -107,11 +107,21 @@ endif
|
|||
|
||||
ifeq (${TF_MBEDTLS_KEY_SIZE},)
|
||||
ifneq ($(findstring rsa,${TF_MBEDTLS_KEY_ALG}),)
|
||||
ifeq (${KEY_SIZE},)
|
||||
ifeq (${KEY_SIZE},)
|
||||
TF_MBEDTLS_KEY_SIZE := 2048
|
||||
else
|
||||
else ifneq ($(filter $(KEY_SIZE), 1024 2048 3072 4096),)
|
||||
TF_MBEDTLS_KEY_SIZE := ${KEY_SIZE}
|
||||
endif
|
||||
else
|
||||
$(error "Invalid value for KEY_SIZE: ${KEY_SIZE}")
|
||||
endif
|
||||
else ifneq ($(findstring ecdsa,${TF_MBEDTLS_KEY_ALG}),)
|
||||
ifeq (${KEY_SIZE},)
|
||||
TF_MBEDTLS_KEY_SIZE := 256
|
||||
else ifneq ($(filter $(KEY_SIZE), 256 384),)
|
||||
TF_MBEDTLS_KEY_SIZE := ${KEY_SIZE}
|
||||
else
|
||||
$(error "Invalid value for KEY_SIZE: ${KEY_SIZE}")
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -62,8 +62,12 @@
|
|||
#if TF_MBEDTLS_USE_ECDSA
|
||||
#define MBEDTLS_ECDSA_C
|
||||
#define MBEDTLS_ECP_C
|
||||
#if TF_MBEDTLS_KEY_SIZE == 384
|
||||
#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
|
||||
#else
|
||||
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
#if TF_MBEDTLS_USE_RSA
|
||||
#define MBEDTLS_RSA_C
|
||||
#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
|
||||
|
|
Loading…
Add table
Reference in a new issue