From 637d0a0290cab9308cc67db00aa9a7344070a911 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 25 May 2022 11:28:22 +0200 Subject: [PATCH] Enable buildin PSA PAKE implementation when ECJPAKE_C is selected Signed-off-by: Neil Armstrong --- include/mbedtls/config_psa.h | 16 ++++++++++++++++ include/psa/crypto_config.h | 1 + 2 files changed, 17 insertions(+) diff --git a/include/mbedtls/config_psa.h b/include/mbedtls/config_psa.h index fbfcdc3d2..80b11951f 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -146,6 +146,16 @@ extern "C" { #define MBEDTLS_MD5_C #endif +#if defined(PSA_WANT_ALG_ECJPAKE) +#define MBEDTLS_PSA_BUILTIN_PAKE 1 +#define MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE 1 +#define MBEDTLS_ECP_DP_SECP192R1_ENABLED +#define MBEDTLS_BIGNUM_C +#define MBEDTLS_ECP_C +#define MBEDTLS_MD_C +#define MBEDTLS_ECJPAKE_C +#endif /* PSA_WANT_ALG_ECJPAKE */ + #if defined(PSA_WANT_ALG_RIPEMD160) && !defined(MBEDTLS_PSA_ACCEL_ALG_RIPEMD160) #define MBEDTLS_PSA_BUILTIN_ALG_RIPEMD160 1 #define MBEDTLS_RIPEMD160_C @@ -635,6 +645,12 @@ extern "C" { #define PSA_WANT_ALG_MD5 1 #endif +#if defined(MBEDTLS_ECJPAKE_C) +#define MBEDTLS_PSA_BUILTIN_PAKE 1 +#define MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE 1 +#define PSA_WANT_ALG_ECJPAKE 1 +#endif + #if defined(MBEDTLS_RIPEMD160_C) #define MBEDTLS_PSA_BUILTIN_ALG_RIPEMD160 1 #define PSA_WANT_ALG_RIPEMD160 1 diff --git a/include/psa/crypto_config.h b/include/psa/crypto_config.h index 991be96ef..58fb3b119 100644 --- a/include/psa/crypto_config.h +++ b/include/psa/crypto_config.h @@ -65,6 +65,7 @@ #define PSA_WANT_ALG_ECB_NO_PADDING 1 #define PSA_WANT_ALG_ECDH 1 #define PSA_WANT_ALG_ECDSA 1 +#define PSA_WANT_ALG_ECJPAKE 1 #define PSA_WANT_ALG_GCM 1 #define PSA_WANT_ALG_HKDF 1 #define PSA_WANT_ALG_HKDF_EXTRACT 1