diff --git a/include/psa/crypto.h b/include/psa/crypto.h index 1d4fc319a..53babd46d 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -3487,13 +3487,13 @@ psa_status_t psa_key_derivation_abort( * \retval #PSA_ERROR_HARDWARE_FAILURE * \retval #PSA_ERROR_TAMPERING_DETECTED */ -psa_status_t psa_key_agreement_raw_shared_secret(psa_algorithm_t alg, - psa_key_handle_t private_key, - const uint8_t *peer_key, - size_t peer_key_length, - uint8_t *output, - size_t output_size, - size_t *output_length); +psa_status_t psa_raw_key_agreement(psa_algorithm_t alg, + psa_key_handle_t private_key, + const uint8_t *peer_key, + size_t peer_key_length, + uint8_t *output, + size_t output_size, + size_t *output_length); /**@}*/ diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 4b6dcf0a5..01ef0f5d5 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5205,13 +5205,13 @@ psa_status_t psa_key_derivation_key_agreement( psa_key_derivation_operation_t *o return( status ); } -psa_status_t psa_key_agreement_raw_shared_secret( psa_algorithm_t alg, - psa_key_handle_t private_key, - const uint8_t *peer_key, - size_t peer_key_length, - uint8_t *output, - size_t output_size, - size_t *output_length ) +psa_status_t psa_raw_key_agreement( psa_algorithm_t alg, + psa_key_handle_t private_key, + const uint8_t *peer_key, + size_t peer_key_length, + uint8_t *output, + size_t output_size, + size_t *output_length ) { psa_key_slot_t *slot; psa_status_t status; diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index e9fd3f612..e695ea568 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -634,10 +634,9 @@ static psa_status_t raw_key_agreement_with_self( psa_algorithm_t alg, public_key, public_key_length, &public_key_length ) ); - status = psa_key_agreement_raw_shared_secret( - alg, handle, - public_key, public_key_length, - output, sizeof( output ), &output_length ); + status = psa_raw_key_agreement( alg, handle, + public_key, public_key_length, + output, sizeof( output ), &output_length ); exit: mbedtls_free( public_key ); psa_reset_key_attributes( &attributes ); @@ -4547,10 +4546,10 @@ void raw_key_agreement( int alg_arg, our_key_data->x, our_key_data->len, &our_key ) ); - PSA_ASSERT( psa_key_agreement_raw_shared_secret( - alg, our_key, - peer_key_data->x, peer_key_data->len, - output, expected_output->len, &output_length ) ); + PSA_ASSERT( psa_raw_key_agreement( alg, our_key, + peer_key_data->x, peer_key_data->len, + output, expected_output->len, + &output_length ) ); ASSERT_COMPARE( output, output_length, expected_output->x, expected_output->len );