diff options
author | Stephan Mueller <smueller@chronox.de> | 2016-10-20 22:59:24 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-12-13 18:38:06 -0500 |
commit | 3f692d5f97cb834a42bcfb3cc10f5e390a9d7867 (patch) | |
tree | a7663ecfa0067ea394140eb86bd5490fc4c81451 /crypto/algif_aead.c | |
parent | 71f3f027f8f8532d397ff2da7bdcd99bf0aa3867 (diff) |
crypto: doc - clarify AEAD memory structure
The previous description have been misleading and partially incorrect.
Reported-by: Harsh Jain <harshjain.prof@gmail.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'crypto/algif_aead.c')
-rw-r--r-- | crypto/algif_aead.c | 14 |
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) { |