From f19a3cb61333150650067e51de4242f6305000a0 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 15 Jun 2022 16:00:29 +0200 Subject: [PATCH] Use the mbedtls_ecjpake_write_shared_key() to input raw shared key material as derivation secret Signed-off-by: Neil Armstrong --- library/psa_crypto_pake.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/psa_crypto_pake.c b/library/psa_crypto_pake.c index 556acd99b7..dd1a91e5a4 100644 --- a/library/psa_crypto_pake.c +++ b/library/psa_crypto_pake.c @@ -690,12 +690,12 @@ psa_status_t psa_pake_get_implicit_key(psa_pake_operation_t *operation, #if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) if( operation->alg == PSA_ALG_JPAKE ) { - ret = mbedtls_ecjpake_derive_secret( &operation->ctx.ecjpake, - operation->buffer, - PSA_PAKE_BUFFER_SIZE, - &operation->buffer_length, - mbedtls_psa_get_random, - MBEDTLS_PSA_RANDOM_STATE ); + ret = mbedtls_ecjpake_write_shared_key( &operation->ctx.ecjpake, + operation->buffer, + PSA_PAKE_BUFFER_SIZE, + &operation->buffer_length, + mbedtls_psa_get_random, + MBEDTLS_PSA_RANDOM_STATE ); if( ret != 0) { psa_pake_abort( operation );