Shorten the name of psa_key_agreement_raw_shared_secret
There is less of a risk of confusion with the KA+KDF function now.
diff --git a/include/psa/crypto.h b/include/psa/crypto.h
index 1d4fc31..53babd4 100644
--- a/include/psa/crypto.h
+++ b/include/psa/crypto.h
@@ -3487,13 +3487,13 @@
* \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 4b6dcf0..01ef0f5 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -5205,13 +5205,13 @@
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 e9fd3f6..e695ea5 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -634,10 +634,9 @@
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 @@
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 );