From 88658becd4c06eb6757899d3c30e4717d1c939d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 3 May 2021 10:28:57 +0200 Subject: [PATCH] Clarify algorithm constraint for verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- include/psa/crypto.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index b92d194bf..da2a15cfc 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -3724,7 +3724,8 @@ psa_status_t psa_key_derivation_verify_bytes( * \param[in,out] operation The key derivation operation object to read from. * \param[in] expected A key of type #PSA_KEY_TYPE_RAW_DATA containing * the expected output. Its policy must include the - * #PSA_KEY_USAGE_VERIFY_DERIVATION flag. + * #PSA_KEY_USAGE_VERIFY_DERIVATION flag and the + * permitted algorithm must match the operation. * The value of this key was likely computed by a * previous call to psa_key_derivation_output_key(). * @@ -3737,7 +3738,8 @@ psa_status_t psa_key_derivation_verify_bytes( * \retval #PSA_ERROR_INVALID_ARGUMENT * The key passed as the expected value has an invalid type. * \retval #PSA_ERROR_NOT_PERMITTED - * The key passed as the expected value does not allow this usage. + * The key passed as the expected value does not allow this usage or + * this algorithm. * \retval #PSA_ERROR_INSUFFICIENT_DATA * The operation's capacity was less than * the length of the expected value. In this case,