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>
diff --git a/include/mbedtls/gcm.h b/include/mbedtls/gcm.h
index 1ad0e9e..ae6d4f3 100644
--- a/include/mbedtls/gcm.h
+++ b/include/mbedtls/gcm.h
@@ -107,10 +107,9 @@
/**
* \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 @@
* 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