mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-03 11:51:24 +03:00
Update GCM buffer overlap documentation
This commit updates GCM buffer overlap documentation to explicitly support overlapping encryption/decryption buffers for GCM. Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
This commit is contained in:
@@ -107,10 +107,9 @@ int mbedtls_gcm_setkey(mbedtls_gcm_context *ctx,
|
|||||||
/**
|
/**
|
||||||
* \brief This function performs GCM encryption or decryption of a buffer.
|
* \brief This function performs GCM encryption or decryption of a buffer.
|
||||||
*
|
*
|
||||||
* \note For encryption, the output buffer can be the same as the
|
* \note The output buffer \p output can be the same as the input
|
||||||
* input buffer. For decryption, the output buffer cannot be
|
* buffer \p input. If \p output is greater than \p input, they
|
||||||
* the same as input buffer. If the buffers overlap, the output
|
* cannot overlap.
|
||||||
* buffer must trail at least 8 Bytes behind the input buffer.
|
|
||||||
*
|
*
|
||||||
* \warning When this function performs a decryption, it outputs the
|
* \warning When this function performs a decryption, it outputs the
|
||||||
* authentication tag and does not verify that the data is
|
* authentication tag and does not verify that the data is
|
||||||
@@ -243,9 +242,11 @@ int mbedtls_gcm_starts(mbedtls_gcm_context *ctx,
|
|||||||
* Bytes. Only the last call before calling
|
* Bytes. Only the last call before calling
|
||||||
* mbedtls_gcm_finish() can be less than 16 Bytes.
|
* mbedtls_gcm_finish() can be less than 16 Bytes.
|
||||||
*
|
*
|
||||||
* \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 //no-check-names 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 input data. This must be a multiple of
|
* \param length The length of the input data. This must be a multiple of
|
||||||
|
|||||||
Reference in New Issue
Block a user