summaryrefslogtreecommitdiffstats
path: root/crypto/algif_aead.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/algif_aead.c')
-rw-r--r--crypto/algif_aead.c14
1 files changed, 2 insertions, 12 deletions
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)
551 lock_sock(sk); 551 lock_sock(sk);
552 552
553 /* 553 /*
554 * AEAD memory structure: For encryption, the tag is appended to the 554 * Please see documentation of aead_request_set_crypt for the
555 * ciphertext which implies that the memory allocated for the ciphertext 555 * description of the AEAD memory structure expected from the caller.
556 * must be increased by the tag length. For decryption, the tag
557 * is expected to be concatenated to the ciphertext. The plaintext
558 * therefore has a memory size of the ciphertext minus the tag length.
559 *
560 * The memory structure for cipher operation has the following
561 * structure:
562 * AEAD encryption input: assoc data || plaintext
563 * AEAD encryption output: cipherntext || auth tag
564 * AEAD decryption input: assoc data || ciphertext || auth tag
565 * AEAD decryption output: plaintext
566 */ 556 */
567 557
568 if (ctx->more) { 558 if (ctx->more) {