Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670204 > unrolled thread

Re: [RFC PATCH 1/2] crypto: caam - properly set IV after {en,de}crypt

Started byHerbert Xu <herbert@gondor.apana.org.au>
First post2017-06-20 04:30 +0200
Last post2017-06-26 08:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH 1/2] crypto: caam - properly set IV after {en,de}crypt Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-20 04:30 +0200
    Re: [RFC PATCH 1/2] crypto: caam - properly set IV after {en,de}crypt David Gstir <david@sigma-star.at> - 2017-06-26 07:50 +0200
      Re: [RFC PATCH 1/2] crypto: caam - properly set IV after {en,de}crypt Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-26 08:50 +0200

#1670204 — Re: [RFC PATCH 1/2] crypto: caam - properly set IV after {en,de}crypt

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2017-06-20 04:30 +0200
SubjectRe: [RFC PATCH 1/2] crypto: caam - properly set IV after {en,de}crypt
Message-ID<tUh5w-2E2-3@gated-at.bofh.it>
On Mon, Jun 19, 2017 at 10:31:27AM +0000, Horia Geantă wrote:
>
> IIUC, IV update is required only in case of CBC.
> Since this callback is used also for CTR, we should avoid the copy:
> if ((ctx->cdata.algtype & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC) ...

No it is needed for CTR too.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[toc] | [next] | [standalone]


#1674443

FromDavid Gstir <david@sigma-star.at>
Date2017-06-26 07:50 +0200
Message-ID<tWv4m-6Jc-7@gated-at.bofh.it>
In reply to#1670204
Herbert,

> On 20 Jun 2017, at 03:28, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> 
> On Mon, Jun 19, 2017 at 10:31:27AM +0000, Horia Geantă wrote:
>> 
>> IIUC, IV update is required only in case of CBC.
>> Since this callback is used also for CTR, we should avoid the copy:
>> if ((ctx->cdata.algtype & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC) ...
> 
> No it is needed for CTR too.

So, am I correct in assuming that it is required for all modes including AEAD modes like GCM?
In that case I'll include a fix for the CAAM GCM mode too.

Thanks,
David

[toc] | [prev] | [next] | [standalone]


#1674469

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2017-06-26 08:50 +0200
Message-ID<tWw0p-7jt-9@gated-at.bofh.it>
In reply to#1674443
On Mon, Jun 26, 2017 at 07:40:58AM +0200, David Gstir wrote:
>
> So, am I correct in assuming that it is required for all modes including AEAD modes like GCM?
> In that case I'll include a fix for the CAAM GCM mode too.

It's only required for skcihper.  As we do not do chunking/streaming
with our AEAD interface it is not required for GCM.
  
Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web