Test multipart key agreement with ECDH+HKDF
Basic coverage with one algorithm only and a restricted choice of
output lengths.
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 8d6d6f3..e017364 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -4764,6 +4764,13 @@
PSA_ASSERT( psa_key_agreement( &generator, PSA_KDF_STEP_SECRET,
our_key,
peer_key_data->x, peer_key_data->len ) );
+ if( PSA_ALG_IS_HKDF( PSA_ALG_KEY_AGREEMENT_GET_KDF( alg ) ) )
+ {
+ /* The test data is for info="" */
+ PSA_ASSERT( psa_key_derivation_input_bytes( &generator,
+ PSA_KDF_STEP_INFO,
+ NULL, 0 ) );
+ }
/* Test the advertized capacity. */
PSA_ASSERT( psa_get_generator_capacity(
@@ -4818,6 +4825,13 @@
PSA_ASSERT( psa_key_agreement( &generator, PSA_KDF_STEP_SECRET,
our_key,
peer_key_data->x, peer_key_data->len ) );
+ if( PSA_ALG_IS_HKDF( PSA_ALG_KEY_AGREEMENT_GET_KDF( alg ) ) )
+ {
+ /* The test data is for info="" */
+ PSA_ASSERT( psa_key_derivation_input_bytes( &generator,
+ PSA_KDF_STEP_INFO,
+ NULL, 0 ) );
+ }
PSA_ASSERT( psa_generator_read( &generator,
actual_output,