diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 07f3151214..f0c3d5adfc 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -5735,7 +5735,6 @@ psa_status_t psa_key_derivation_input_key( /****************************************************************/ /* Key agreement */ /****************************************************************/ -#define PSA_KEY_AGREEMENT_MAX_SHARED_SECRET_SIZE MBEDTLS_ECP_MAX_BYTES psa_status_t psa_key_agreement_raw_builtin( const psa_key_attributes_t *attributes, const uint8_t *key_buffer, @@ -5809,7 +5808,7 @@ static psa_status_t psa_key_agreement_internal( psa_key_derivation_operation_t * size_t peer_key_length ) { psa_status_t status; - uint8_t shared_secret[PSA_KEY_AGREEMENT_MAX_SHARED_SECRET_SIZE]; + uint8_t shared_secret[PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE]; size_t shared_secret_length = 0; psa_algorithm_t ka_alg = PSA_ALG_KEY_AGREEMENT_GET_BASE( operation->alg );