From: Stephan Mueller <smueller@chronox.de>
To: Gary R Hook <ghook@amd.com>
Cc: Harsh Jain <harshjain.prof@gmail.com>, linux-crypto@vger.kernel.org
Subject: Re: Encryption output buffer description in algif_aead.c file
Date: Fri, 24 Jun 2016 14:59:04 +0200 [thread overview]
Message-ID: <7822072.ReBLfZ8iXg@tauon.atsec.com> (raw)
In-Reply-To: <576D2B41.40801@amd.com>
Am Freitag, 24. Juni 2016, 07:44:49 schrieb Gary R Hook:
Hi Gary,
> On 06/24/2016 07:01 AM, Stephan Mueller wrote:
> > Am Freitag, 24. Juni 2016, 17:24:02 schrieb Harsh Jain:
> >
> > Hi Harsh,
> >
> >> 379 * The memory structure for cipher operation has the
> >> following
> >> 380 * structure:
> >> 381 * AEAD encryption input: assoc data || plaintext
> >> 382 * AEAD encryption output: cipherntext || auth tag
> >> 383 * AEAD decryption input: assoc data || ciphertext ||
> >> auth tag 384 * AEAD decryption output: plaintext
> >
> > Right, it returns AAD prepended to the stated output. Do you want to
> > provide a patch?
>
> If testmgr.c is any model, the caller is expected to populate the
> destination
> buffer with the AAD. Is my understanding correct? And should this
> comment clarify
> that point: i.e. the length of the destination is the sum of the lengths
> of the
> aad + ciphertext + tag?
It may make sense if you would look at libkcapi which handles the input/output
appropriately. Especially, the kcapi_aead_getdata() function sets up the right
pointers.
It is correct that the AAD data is taken from the input.
Ciao
Stephan
prev parent reply other threads:[~2016-06-24 12:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 11:54 Encryption output buffer description in algif_aead.c file Harsh Jain
2016-06-24 12:01 ` Stephan Mueller
2016-06-24 12:04 ` Harsh Jain
2016-06-24 12:44 ` Gary R Hook
2016-06-24 12:59 ` Stephan Mueller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7822072.ReBLfZ8iXg@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=ghook@amd.com \
--cc=harshjain.prof@gmail.com \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.