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.
|
||||
*
|
||||
* \note For encryption, the output buffer can be the same as the
|
||||
* input buffer. For decryption, the output buffer cannot be
|
||||
* the same as input buffer. If the buffers overlap, the output
|
||||
* buffer must trail at least 8 Bytes behind the input buffer.
|
||||
* \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
|
||||
* cannot overlap.
|
||||
*
|
||||
* \warning When this function performs a decryption, it outputs the
|
||||
* 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
|
||||
* mbedtls_gcm_finish() can be less than 16 Bytes.
|
||||
*
|
||||
* \note For decryption, the output buffer cannot be the same as
|
||||
* input buffer. If the buffers overlap, the output buffer
|
||||
* must trail at least 8 Bytes behind the input buffer.
|
||||
* \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
|
||||
* 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 length The length of the input data. This must be a multiple of
|
||||
|
||||
Reference in New Issue
Block a user