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


Groups > linux.kernel > #1673370 > unrolled thread

Re: [Patch V5 1/7] crypto: Multi-buffer encryption infrastructure support

Started byHerbert Xu <herbert@gondor.apana.org.au>
First post2017-06-23 10:40 +0200
Last post2017-06-23 10:40 +0200
Articles 1 — 1 participant

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: [Patch V5 1/7] crypto: Multi-buffer encryption infrastructure  support Herbert Xu <herbert@gondor.apana.org.au> - 2017-06-23 10:40 +0200

#1673370 — Re: [Patch V5 1/7] crypto: Multi-buffer encryption infrastructure support

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2017-06-23 10:40 +0200
SubjectRe: [Patch V5 1/7] crypto: Multi-buffer encryption infrastructure support
Message-ID<tVsid-8gZ-7@gated-at.bofh.it>
On Thu, Jun 08, 2017 at 12:52:54PM -0700, Megha Dey wrote:
>
> I will move this code to the mcryptd.c.
> 
> About the naming scheme, could you give me an example where the internal
> and external algorithm have the same name? I tried searching but did not
> find any.
> 
> When the outer and inner algorithm have the same name, I see a crash
> when testing using tcrypt. This is because the wrong algortihm (with a
> higher priority) is being picked up in __crypto_alg_lookup.  
> 
> Inner alg:
> Currently:
> alg name:__cbc(aes), driver name:__cbc-aes-aesni-mb
> 
> expected:
> alg name:cbc(aes), driver name: cbc-aes-aesni-mb
> 
> Outer alg:
> Currently:
> alg name:cbc(aes), driver name:cbc-aes-aesni-mb
> 
> expected:
> alg name:cbc(aes), driver name:mcryptd-cbc-aes-aesni-mb

This all looks right.  So I'm not sure why you're getting the crash.
We're relying on the INTERNAL flag to ensure the internal algorithm
is not picked up except when we strictly ask for it.

In fact I see something fishy in your testmgr code (the last patch
in the series I think).  It's setting the INTERNAL bit when
allocating tfms, that does not look right.

The only one that should be setting this is mcryptd.

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] | [standalone]


Back to top | Article view | linux.kernel


csiph-web