From 3f692d5f97cb834a42bcfb3cc10f5e390a9d7867 Mon Sep 17 00:00:00 2001 From: Stephan Mueller Date: Fri, 21 Oct 2016 04:59:24 +0200 Subject: crypto: doc - clarify AEAD memory structure The previous description have been misleading and partially incorrect. Reported-by: Harsh Jain Signed-off-by: Stephan Mueller Signed-off-by: Jonathan Corbet --- crypto/algif_aead.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'crypto') diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 80a0f1a78551..a0d8377729a4 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -551,18 +551,8 @@ static int aead_recvmsg_sync(struct socket *sock, struct msghdr *msg, int flags) lock_sock(sk); /* - * AEAD memory structure: For encryption, the tag is appended to the - * ciphertext which implies that the memory allocated for the ciphertext - * must be increased by the tag length. For decryption, the tag - * is expected to be concatenated to the ciphertext. The plaintext - * therefore has a memory size of the ciphertext minus the tag length. - * - * The memory structure for cipher operation has the following - * structure: - * AEAD encryption input: assoc data || plaintext - * AEAD encryption output: cipherntext || auth tag - * AEAD decryption input: assoc data || ciphertext || auth tag - * AEAD decryption output: plaintext + * Please see documentation of aead_request_set_crypt for the + * description of the AEAD memory structure expected from the caller. */ if (ctx->more) { -- cgit v1.2.3-59-g8ed1b