mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 20:42:44 +00:00
Use the mbedtls_ecjpake_write_shared_key() to input raw shared key material as derivation secret
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
12663092bc
commit
f19a3cb613
@ -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 defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE)
|
||||||
if( operation->alg == PSA_ALG_JPAKE )
|
if( operation->alg == PSA_ALG_JPAKE )
|
||||||
{
|
{
|
||||||
ret = mbedtls_ecjpake_derive_secret( &operation->ctx.ecjpake,
|
ret = mbedtls_ecjpake_write_shared_key( &operation->ctx.ecjpake,
|
||||||
operation->buffer,
|
operation->buffer,
|
||||||
PSA_PAKE_BUFFER_SIZE,
|
PSA_PAKE_BUFFER_SIZE,
|
||||||
&operation->buffer_length,
|
&operation->buffer_length,
|
||||||
mbedtls_psa_get_random,
|
mbedtls_psa_get_random,
|
||||||
MBEDTLS_PSA_RANDOM_STATE );
|
MBEDTLS_PSA_RANDOM_STATE );
|
||||||
if( ret != 0)
|
if( ret != 0)
|
||||||
{
|
{
|
||||||
psa_pake_abort( operation );
|
psa_pake_abort( operation );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user