Fix mbedtls_ccm_update() buffered output description

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2021-05-26 10:11:06 +02:00
parent d1a29a9687
commit 2d40b1031f

View file

@ -366,15 +366,17 @@ int mbedtls_ccm_update_ad( mbedtls_ccm_context *ctx,
* ways: * ways:
* - Immediate output: the output length is always equal * - Immediate output: the output length is always equal
* to the input length. * to the input length.
* - Buffered output: but for the last chunck of input data, * - Buffered output: but for the last part of input data,
* the output consists of a whole number of 16-byte blocks. * the output consists of a whole number of 16-byte blocks.
* If the total input length so far (not including * If the total input length so far (not including
* associated data) is 16 \* *B* + *A* with *A* < 16 then * associated data) is 16 \* *B* + *A* with *A* < 16 then
* the total output length is 16 \* *B*. * the total output length is 16 \* *B*.
* For the last chunck of input data, the output length is * For the last part of input data, the output length is
* equal to the input length. The function uses the length * equal to the input length plus the number of bytes (*A*)
* in bytes of the body data passed in mbedtls_ccm_starts() * buffered in the previous call to the function (if any).
* to detect the last chunck of data to encrypt or decrypt. * The function uses the total length of input data
* \c total_input_len passed to mbedtls_ccm_starts()
* to detect the last part of input data.
* *
* In particular: * In particular:
* - It is always correct to call this function with * - It is always correct to call this function with