From c78833abc70c9b641a5e626388d4c8445eac45f7 Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Mon, 27 Sep 2021 16:00:40 +0100 Subject: [PATCH] Add reminder of assumption to documentation Key size is not verified by this function, but by the level above it. Signed-off-by: Paul Elliott --- library/psa_crypto_aead.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/psa_crypto_aead.h b/library/psa_crypto_aead.h index 9b6b798b66..e82e1cc098 100644 --- a/library/psa_crypto_aead.h +++ b/library/psa_crypto_aead.h @@ -169,6 +169,8 @@ psa_status_t mbedtls_psa_aead_decrypt( * operation. * \param[in] key_buffer The buffer containing the key context. * \param key_buffer_size Size of the \p key_buffer buffer in bytes. + It must be consistent with the size in bits + recorded in \p attributes. * \param alg The AEAD algorithm to compute * (\c PSA_ALG_XXX value such that * #PSA_ALG_IS_AEAD(\p alg) is true). @@ -210,6 +212,8 @@ psa_status_t mbedtls_psa_aead_encrypt_setup( * operation. * \param[in] key_buffer The buffer containing the key context. * \param key_buffer_size Size of the \p key_buffer buffer in bytes. + It must be consistent with the size in bits + recorded in \p attributes. * \param alg The AEAD algorithm to compute * (\c PSA_ALG_XXX value such that * #PSA_ALG_IS_AEAD(\p alg) is true).