Fixing XXX_ALG_ECJPAKE to XXX_ALG_JPAKE to match specification
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
fbc4b4aa8e
commit
a557cb8c8b
5 changed files with 18 additions and 18 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <mbedtls/ecjpake.h>
|
||||
#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. */
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <mbedtls/error.h>
|
||||
#include <string.h>
|
||||
|
||||
#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;
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue