diff --git a/include/mbedtls/config_psa.h b/include/mbedtls/config_psa.h index 80b11951f..7518e187f 100644 --- a/include/mbedtls/config_psa.h +++ b/include/mbedtls/config_psa.h @@ -146,15 +146,15 @@ extern "C" { #define MBEDTLS_MD5_C #endif -#if defined(PSA_WANT_ALG_ECJPAKE) +#if defined(PSA_WANT_ALG_JPAKE) #define MBEDTLS_PSA_BUILTIN_PAKE 1 -#define MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE 1 +#define MBEDTLS_PSA_BUILTIN_ALG_JPAKE 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 */ +#endif /* PSA_WANT_ALG_JPAKE */ #if defined(PSA_WANT_ALG_RIPEMD160) && !defined(MBEDTLS_PSA_ACCEL_ALG_RIPEMD160) #define MBEDTLS_PSA_BUILTIN_ALG_RIPEMD160 1 @@ -647,8 +647,8 @@ extern "C" { #if defined(MBEDTLS_ECJPAKE_C) #define MBEDTLS_PSA_BUILTIN_PAKE 1 -#define MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE 1 -#define PSA_WANT_ALG_ECJPAKE 1 +#define MBEDTLS_PSA_BUILTIN_ALG_JPAKE 1 +#define PSA_WANT_ALG_JPAKE 1 #endif #if defined(MBEDTLS_RIPEMD160_C) diff --git a/include/psa/crypto_config.h b/include/psa/crypto_config.h index 58fb3b119..9011a5596 100644 --- a/include/psa/crypto_config.h +++ b/include/psa/crypto_config.h @@ -65,7 +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_JPAKE 1 #define PSA_WANT_ALG_GCM 1 #define PSA_WANT_ALG_HKDF 1 #define PSA_WANT_ALG_HKDF_EXTRACT 1 diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h index 32bb358c2..e625f0d98 100644 --- a/include/psa/crypto_extra.h +++ b/include/psa/crypto_extra.h @@ -1903,7 +1903,7 @@ static inline void psa_pake_cs_set_hash( psa_pake_cipher_suite_t *cipher_suite, cipher_suite->hash = hash; } -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) #include #endif @@ -1923,7 +1923,7 @@ struct psa_pake_operation_s #endif union { -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) mbedtls_ecjpake_context ecjpake; #endif /* Make the union non-empty even with no supported algorithms. */ diff --git a/library/psa_crypto_pake.c b/library/psa_crypto_pake.c index 48995dd0d..1aa8a72d8 100644 --- a/library/psa_crypto_pake.c +++ b/library/psa_crypto_pake.c @@ -33,7 +33,7 @@ #include #include -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) #define PSA_PAKE_BUFFER_SIZE ( ( 69 + 66 + 33 ) * 2 ) #endif @@ -130,7 +130,7 @@ psa_status_t psa_pake_setup( psa_pake_operation_t *operation, return( PSA_ERROR_INVALID_ARGUMENT ); } -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( cipher_suite->algorithm == PSA_ALG_JPAKE ) { if( cipher_suite->type != PSA_PAKE_PRIMITIVE_TYPE_ECC || @@ -248,7 +248,7 @@ psa_status_t psa_pake_set_role( psa_pake_operation_t *operation, return PSA_ERROR_INVALID_ARGUMENT; } -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( operation->alg == PSA_ALG_JPAKE ) { if( role != PSA_PAKE_ROLE_CLIENT && @@ -264,7 +264,7 @@ psa_status_t psa_pake_set_role( psa_pake_operation_t *operation, return( PSA_ERROR_NOT_SUPPORTED ); } -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) static psa_status_t psa_pake_ecjpake_setup( psa_pake_operation_t *operation ) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; @@ -331,7 +331,7 @@ psa_status_t psa_pake_output( psa_pake_operation_t *operation, if( output == NULL || output_size == 0 || output_length == NULL ) return( PSA_ERROR_INVALID_ARGUMENT ); -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( operation->alg == PSA_ALG_JPAKE ) { if( operation->state == PSA_PAKE_STATE_SETUP ) { @@ -514,7 +514,7 @@ psa_status_t psa_pake_input( psa_pake_operation_t *operation, if( input == NULL || input_length == 0 ) return( PSA_ERROR_INVALID_ARGUMENT ); -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( operation->alg == PSA_ALG_JPAKE ) { if( operation->state == PSA_PAKE_STATE_SETUP ) { @@ -664,7 +664,7 @@ psa_status_t psa_pake_get_implicit_key(psa_pake_operation_t *operation, operation->output_step != PSA_PAKE_STEP_DERIVE ) ) return( PSA_ERROR_BAD_STATE ); -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( operation->alg == PSA_ALG_JPAKE ) { ret = mbedtls_ecjpake_derive_secret( &operation->ctx.ecjpake, @@ -702,7 +702,7 @@ psa_status_t psa_pake_abort(psa_pake_operation_t * operation) return( PSA_SUCCESS ); } -#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( operation->alg == PSA_ALG_JPAKE ) { operation->input_step = 0; diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index e091ad405..727784f4a 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -8092,7 +8092,7 @@ exit: } /* END_CASE */ -/* BEGIN_CASE depends_on:PSA_WANT_ALG_ECJPAKE */ +/* BEGIN_CASE depends_on:PSA_WANT_ALG_JPAKE */ void ecjpake_setup( int alg_arg, int primitive_arg, int hash_arg, int role_arg, int input_first, data_t *pw_data, int expected_status_arg ) @@ -8265,7 +8265,7 @@ exit: } /* END_CASE */ -/* BEGIN_CASE depends_on:PSA_WANT_ALG_ECJPAKE */ +/* BEGIN_CASE depends_on:PSA_WANT_ALG_JPAKE */ void ecjpake_rounds( int alg_arg, int primitive_arg, int hash_arg, int derive_alg_arg, data_t *pw_data ) {