Shorten the name of psa_key_agreement_raw_shared_secret

There is less of a risk of confusion with the KA+KDF function now.
This commit is contained in:
Gilles Peskine 2019-05-16 18:00:41 +02:00
parent 1cb9a08d6a
commit be697d8324
3 changed files with 21 additions and 22 deletions

View File

@ -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);
/**@}*/

View File

@ -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;

View File

@ -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 );