1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-09-04 03:22:10 +03:00

Fix documentation for GCM decryption functions

This commit fixes documentation specifying buffer overlap on GCM
decryption functions.

Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit is contained in:
Harry Ramsey
2024-11-13 19:27:31 +00:00
parent d77207efdd
commit 9892d14607

View File

@@ -178,9 +178,11 @@ int mbedtls_gcm_crypt_and_tag(mbedtls_gcm_context *ctx,
* \brief This function performs a GCM authenticated decryption of a * \brief This function performs a GCM authenticated decryption of a
* buffer. * buffer.
* *
* \note For decryption, the output buffer cannot be the same as * \note The output buffer \p output can be the same as the input
* input buffer. If the buffers overlap, the output buffer * buffer \p input. If \p output is greater than \p input, they
* must trail at least 8 Bytes behind the input buffer. * cannot overlap. Implementations which require
* MBEDTLS_GCM_ALT to be enabled may not provide support for
* overlapping buffers.
* *
* \param ctx The GCM context. This must be initialized. * \param ctx The GCM context. This must be initialized.
* \param length The length of the ciphertext to decrypt, which is also * \param length The length of the ciphertext to decrypt, which is also
@@ -289,8 +291,8 @@ int mbedtls_gcm_update_ad(mbedtls_gcm_context *ctx,
* \note The output buffer \p output can be the same as the input * \note The output buffer \p output can be the same as the input
* buffer \p input. If \p output is greater than \p input, they * buffer \p input. If \p output is greater than \p input, they
* cannot overlap. Implementations which require * cannot overlap. Implementations which require
* MBEDTLS_GCM_ALT //no-check-names to be enabled may not * MBEDTLS_GCM_ALT to be enabled may not provide support for
* provide support for overlapping buffers. * overlapping buffers.
* *
* \param ctx The GCM context. This must be initialized. * \param ctx The GCM context. This must be initialized.
* \param input The buffer holding the input data. If \p input_length * \param input The buffer holding the input data. If \p input_length