From ac99e32b79a865a49d3eb38e2ac237be9d155983 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 14 May 2019 16:10:53 +0200 Subject: [PATCH] Documentation improvements --- include/psa/crypto.h | 12 ++++++------ include/psa/crypto_sizes.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index c0d79dd1e5..ece9fd0728 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -2497,11 +2497,11 @@ psa_status_t psa_aead_update_ad(psa_aead_operation_t *operation, * * This function does not require the input to be aligned to any * particular block boundary. If the implementation can only process - * a whole block at a time, it must store the last partial input block - * or adjust its internal state accordingly until the next call to - * psa_aead_update(), psa_aead_finish() or psa_aead_verify(), and produce - * the corresponding output when sufficient input is available or on the - * finish or verify call. + * a whole block at a time, it must consume all the input provided, but + * it may delay the end of the corresponding output until a subsequent + * call to psa_aead_update(), psa_aead_finish() or psa_aead_verify() + * provides sufficient input. The amount of data that can be delayed + * in this way is bounded by #PSA_AEAD_UPDATE_OUTPUT_SIZE. * * \param[in,out] operation Active AEAD operation. * \param[in] input Buffer containing the message fragment to @@ -2628,7 +2628,7 @@ psa_status_t psa_aead_finish(psa_aead_operation_t *operation, * * \param[in,out] operation Active AEAD operation. * \param[out] plaintext Buffer where the last part of the plaintext - * is to be written. This is the remaining + * is to be written. This is the remaining data * from previous calls to psa_aead_update() * that could not be processed until the end * of the input. diff --git a/include/psa/crypto_sizes.h b/include/psa/crypto_sizes.h index 11858ba2d2..002fe414b3 100644 --- a/include/psa/crypto_sizes.h +++ b/include/psa/crypto_sizes.h @@ -298,7 +298,7 @@ /** A sufficient output buffer size for psa_aead_update(). * * If the size of the output buffer is at least this large, it is - * guaranteed that psa_aead_finish() will not fail due to an + * guaranteed that psa_aead_update() will not fail due to an * insufficient buffer size. The actual size of the output may be smaller * in any given call. *