From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
To: "Herbert Xu" <herbert@gondor.apana.org.au>,
"Stephan Müller" <smueller@chronox.de>
Cc: <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 00/13] crypto: copy AAD during encrypt for AEAD ciphers
Date: Fri, 20 Jan 2017 18:07:04 +0100 [thread overview]
Message-ID: <2a4fab23-3ea7-a0f7-7c30-55d301f51ec9@atmel.com> (raw)
In-Reply-To: <20170113113906.GA24096@gondor.apana.org.au>
Hi all,
Le 13/01/2017 à 12:39, Herbert Xu a écrit :
> On Fri, Jan 13, 2017 at 12:36:56PM +0100, Stephan Müller wrote:
>>
>> I thought I understood that you would not want to see it in any
>> implementation. But, ok, if you want to leave it.
>
> If you remove it from authenc then authenc will be broken.
>
Hence if the copy of the associated data is needed in the crypto/authenc.c
driver, then I should also keep this copy in the drivers/crypto/atmel-aes.c
for authenc(hmac(shaX),cbc-aes) algorithms [1], shouldn't I?
If so, should I keep the current not optimized implementation of
atmel_aes_authenc_copy_assoc() or try to use the code extracted by Stephan
from crypto/authenc.c using the null cipher as proposed in this thread?
As said earlier in this thread, copying the associated data is not a so big
deal when compared to the main crypto processing.
For instance, with IPSec ESP with AES in CBC mode, the associated data
layout should be:
Security Parameters Index (SPI): 4 bytes
Sequence Number: 4 bytes
AES IV: 16 bytes
So it's only a 24 byte copy.
I've taken Stephan's other comments into account from his review of the
atmel-authenc driver so I'm preparing a new series but I don't know what to
do for the associated data copy.
Please let me know what you recommend, thanks!
Best regards,
Cyrille
[1] https://lkml.org/lkml/2016/12/22/306
next prev parent reply other threads:[~2017-01-20 17:09 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 1:36 [PATCH 00/13] crypto: copy AAD during encrypt for AEAD ciphers Stephan Müller
2017-01-10 1:36 ` [PATCH 01/13] crypto: service function to copy AAD from src to dst Stephan Müller
2017-01-10 1:37 ` [PATCH 02/13] crypto: gcm_generic - copy AAD during encryption Stephan Müller
2017-01-10 1:37 ` [PATCH 03/13] crypto: ccm_generic " Stephan Müller
2017-01-10 1:37 ` [PATCH 04/13] crypto: rfc4106-gcm-aesni " Stephan Müller
2017-01-10 1:38 ` [PATCH 05/13] crypto: ccm-aes-ce " Stephan Müller
2017-01-10 1:38 ` [PATCH 06/13] crypto: talitos " Stephan Müller
2017-01-10 1:38 ` [PATCH 07/13] crypto: picoxcell " Stephan Müller
2017-01-10 1:39 ` [PATCH 08/13] crypto: ixp4xx " Stephan Müller
2017-01-10 1:39 ` [PATCH 09/13] crypto: atmel " Stephan Müller
2017-01-10 1:39 ` [PATCH 10/13] crypto: caam " Stephan Müller
2017-01-10 1:40 ` [PATCH 11/13] crypto: chelsio " Stephan Müller
2017-01-10 1:40 ` [PATCH 12/13] crypto: nx " Stephan Müller
2017-01-10 1:41 ` [PATCH 13/13] crypto: qat " Stephan Müller
2017-01-12 6:19 ` [PATCH 00/13] crypto: copy AAD during encrypt for AEAD ciphers Herbert Xu
2017-01-12 11:22 ` Stephan Müller
2017-01-12 14:57 ` Herbert Xu
2017-01-12 15:23 ` Stephan Müller
2017-01-12 15:27 ` Herbert Xu
2017-01-12 15:34 ` Stephan Müller
2017-01-12 15:39 ` Herbert Xu
2017-01-12 15:50 ` Stephan Müller
2017-01-12 15:53 ` Herbert Xu
2017-01-12 16:01 ` Stephan Müller
2017-01-12 16:06 ` Herbert Xu
2017-01-12 16:37 ` Stephan Müller
2017-01-13 10:23 ` Herbert Xu
2017-01-13 10:58 ` Stephan Müller
2017-01-13 11:04 ` Herbert Xu
2017-01-13 11:12 ` Stephan Müller
2017-01-13 11:14 ` Herbert Xu
2017-01-13 11:19 ` Stephan Müller
2017-01-13 11:26 ` Herbert Xu
2017-01-13 11:30 ` Stephan Müller
2017-01-13 11:33 ` Herbert Xu
2017-01-13 11:36 ` Stephan Müller
2017-01-13 11:39 ` Herbert Xu
2017-01-20 17:07 ` Cyrille Pitchen [this message]
2017-01-20 20:28 ` Stephan Müller
2017-01-23 13:10 ` Herbert Xu
2017-01-12 12:43 ` Stephan Müller
2017-01-18 14:57 ` Cyrille Pitchen
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=2a4fab23-3ea7-a0f7-7c30-55d301f51ec9@atmel.com \
--to=cyrille.pitchen@atmel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=smueller@chronox.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).