linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/crypto/aesgcm.c:add kernel docs for aesgcm_mac
@ 2023-10-25 12:57 Sagar Vashnav
  2023-11-17 11:20 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Sagar Vashnav @ 2023-10-25 12:57 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, linux-crypto, linux-kernel; +Cc: sagarvashnav72427

Add kernel documentation for the aesgcm_mac.
This function generates the authentication tag using the AES-GCM algorithm.

Signed-off-by: Sagar Vashnav <sagarvashnav72427@gmail.com>
---
 lib/crypto/aesgcm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/crypto/aesgcm.c b/lib/crypto/aesgcm.c
index c632d6e17..eb55cc57a 100644
--- a/lib/crypto/aesgcm.c
+++ b/lib/crypto/aesgcm.c
@@ -73,6 +73,19 @@ static void aesgcm_ghash(be128 *ghash, const be128 *key, const void *src,
 	}
 }
 
+/**
+ * aesgcm_mac - Generates the authentication tag using AES-GCM algorithm.
+ * @ctx: The data structure that will hold the AES-GCM key schedule
+ * @src: The input source data.
+ * @src_len: Length of the source data.
+ * @assoc: Points to the associated data.
+ * @assoc_len: Length of the associated data values.
+ * @ctr: Points to the counter value.
+ * @authtag: The output buffer for the authentication tag.
+ *
+ * It takes in the AES-GCM context, source data, associated data, counter value,
+ * and an output buffer for the authentication tag.
+ */
 static void aesgcm_mac(const struct aesgcm_ctx *ctx, const u8 *src, int src_len,
 		       const u8 *assoc, int assoc_len, __be32 *ctr, u8 *authtag)
 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib/crypto/aesgcm.c:add kernel docs for aesgcm_mac
  2023-10-25 12:57 [PATCH] lib/crypto/aesgcm.c:add kernel docs for aesgcm_mac Sagar Vashnav
@ 2023-11-17 11:20 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2023-11-17 11:20 UTC (permalink / raw)
  To: Sagar Vashnav; +Cc: David S. Miller, linux-crypto, linux-kernel

On Wed, Oct 25, 2023 at 08:57:07AM -0400, Sagar Vashnav wrote:
> Add kernel documentation for the aesgcm_mac.
> This function generates the authentication tag using the AES-GCM algorithm.
> 
> Signed-off-by: Sagar Vashnav <sagarvashnav72427@gmail.com>
> ---
>  lib/crypto/aesgcm.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-17 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 12:57 [PATCH] lib/crypto/aesgcm.c:add kernel docs for aesgcm_mac Sagar Vashnav
2023-11-17 11:20 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).