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


Groups > linux.kernel > #1707198 > unrolled thread

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2017-08-09 11:50 +0200
Last post2017-08-09 11:50 +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 v2 2/2] crypto: engine - Permit to enqueue skcipher  request Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-09 11:50 +0200

#1707198 — Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-09 11:50 +0200
SubjectRe: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request
Message-ID<ucvMJ-5na-5@gated-at.bofh.it>
On Fri, Jul 28, 2017 at 05:01:19PM +0200, Corentin Labbe wrote:
> On Fri, Jul 28, 2017 at 09:52:57PM +0800, Herbert Xu wrote:
> > On Fri, Jul 14, 2017 at 01:15:36PM +0200, Corentin Labbe wrote:
> > > On Fri, Jun 23, 2017 at 02:48:37PM +0800, Herbert Xu wrote:
> > > > On Mon, Jun 19, 2017 at 09:55:24AM +0200, Corentin Labbe wrote:
> > > > >
> > > > > Since there are two different user of "crypto engine + ablkcipher", it will be not easy to convert them in one serie. (I could do it, but I simply could not test it for OMAP (lack of hw))
> > > > > And any new user which want to use crypto engine+skcipher (like me with the sun8i-ce driver) are simply stuck.
> > > > 
> > > > You're right.  We'll need to do this in a backwards-compatible way.  In fact
> > > > we already do something similar in skcipher.c itself.  Simply look at the
> > > > cra_type field and if it matches blkcipher/ablkcipher/givcipher then it's
> > > > legacy ablkcipher, otherwise it's skcipher.
> > > > 
> > > > Also the way crypto_engine looks at the request type in the data-path is
> > > > suboptimal.  This should really be built into the cra_type object.  For
> > > > example, we can have cra_type->engine->prepare_request which would just
> > > > do the right thing.
> > > > 
> > > 
> > > Not sure to have well understand what you want.
> > > You want that I switch on cra_type instead of crypto_tfm_alg_type() ?
> > 
> > No I mean that we should have an engine hooks object registered
> > under cra_type so that you simply call
> > 
> > 	cra_type->engine->prepare_request()
> > 
> > regardless of what type you're using.
> > 
> 
> I am sorry, I didnt see how to do that.

Hello

I really didnt see how to do that since cra_type is const.
Anyway, I think it cannot be possible since we could have two different engine with two different prepare_request().

I will really appreciate any advice on what you want exactly.

Regards

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web