summaryrefslogtreecommitdiffstats
path: root/crypto/algif_aead.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-17 19:00:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-17 19:00:34 -0500
commit0aaf2146ecf00f7932f472ec5aa30d999c89530c (patch)
tree690dd244437f1974b8132fcb1e360213f827bf94 /crypto/algif_aead.c
parent59331c215daf600a650e281b6e8ef3e1ed1174c2 (diff)
parent3fa71d0f58a9b9df84e8e79196f961bcfbf01b2e (diff)
Merge tag 'docs-4.10-2' of git://git.lwn.net/linux
Pull more documentation updates from Jonathan Corbet: "This converts the crypto DocBook to Sphinx" * tag 'docs-4.10-2' of git://git.lwn.net/linux: crypto: doc - optimize compilation crypto: doc - clarify AEAD memory structure crypto: doc - remove crypto_alloc_ablkcipher crypto: doc - add KPP documentation crypto: doc - fix separation of cipher / req API crypto: doc - fix source comments for Sphinx crypto: doc - remove crypto API DocBook crypto: doc - convert crypto API documentation to Sphinx
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 668ef402c6eb..f849311e9fd4 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -556,18 +556,8 @@ static int aead_recvmsg_sync(struct socket *sock, struct msghdr *msg, int flags)
556 lock_sock(sk); 556 lock_sock(sk);
557 557
558 /* 558 /*
559 * AEAD memory structure: For encryption, the tag is appended to the 559 * Please see documentation of aead_request_set_crypt for the
560 * ciphertext which implies that the memory allocated for the ciphertext 560 * description of the AEAD memory structure expected from the caller.
561 * must be increased by the tag length. For decryption, the tag
562 * is expected to be concatenated to the ciphertext. The plaintext
563 * therefore has a memory size of the ciphertext minus the tag length.
564 *
565 * The memory structure for cipher operation has the following
566 * structure:
567 * AEAD encryption input: assoc data || plaintext
568 * AEAD encryption output: cipherntext || auth tag
569 * AEAD decryption input: assoc data || ciphertext || auth tag
570 * AEAD decryption output: plaintext
571 */ 561 */
572 562
573 if (ctx->more) { 563 if (ctx->more) {