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


Groups > linux.kernel > #1707198

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

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request
Date Wed, 09 Aug 2017 11:50:01 +0200
Message-ID <ucvMJ-5na-5@gated-at.bofh.it> (permalink)
References <tPn1U-12m-17@gated-at.bofh.it> <tPn1V-12m-25@gated-at.bofh.it> <tTXqa-6Rc-7@gated-at.bofh.it> <tTZLj-8de-1@gated-at.bofh.it> <tVqzL-78A-11@gated-at.bofh.it> <u36NB-2CT-17@gated-at.bofh.it> <u8dY5-4rR-1@gated-at.bofh.it> <u8f3R-5oC-31@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iioEEKeJqsfYpox7Uy4i8ksECoEp2zlBVG6DRcaYv1s=; b=bED8V/X6oQ2MupDLx1tqv/7DQ5Z3Eyjs1l2TP7Tf8mWna6G+gDVu3MZ+evassAuhOD HocoDp2QqdbO+ewktHHKQSB83wSOJ+QQCPsAf/u/ezieD8jvha5shr+gK2MTSaFJLWkT YRs2OR4ZP9EO9lKz3yFol50zCOWeYt+nmvLA2OGNnhqULPpASj2AsLnpD3/i5qOi3/gy DZZsNWhCIcSGZkzoTWP7f2j1WLveNyUyMfXw/MCgn0RE8z6XuDlPJubAyDspCZEQI+08 0Jnk8eQc0NZqldhJFeEyVwIJJuZb723YlqkuIZNbWNrHDdtzdpa+xRzqq859aVv8FkYn k9pg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=iioEEKeJqsfYpox7Uy4i8ksECoEp2zlBVG6DRcaYv1s=; b=rGeDeOyniqRj3oAn7oc/73AbnzoAMUtePPo5cqg/t3FdnvxRe7+hs0FpLTHFYlKJTo VEqGmU4awU7eu+cpVgzgKSydzChhWNgz99t638IG3V4Wp+niDl0UnUICscM4nCp3EKvv /suFmu3lKu4q2g94yVDs5B/F6JRPuIHfW010rPTzynGGOIa77PA/meJdHACW0bpJdjEN BJNLk5TIdv9SbeDsVCKamHPStRkORlS3MrkIYAFjoc3GFnqMlzyggeLF8n6mZDSd5xct zRPkT4QLs1WXuuOqstqMCfWGjZE+CYDlhM9nS/I/cUFfFU/MjPlBcNN6dPQ8I6coKsGB rMqw==
X-Gm-Message-State AHYfb5i9mmP+O6kJv+IGNAaT9E9oK9M474/xvXzrcZvrKjN8LzcXLTdA RUiSQ4kSB3gWyV2v
X-Received by 10.28.134.209 with SMTP id i200mr5532240wmd.48.1502271617693; Wed, 09 Aug 2017 02:40:17 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.2 (2016-11-26)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Wed, 9 Aug 2017 11:40:12 +0200
X-Original-Message-ID <20170809094012.GC7137@Red>
X-Original-References <20170606134417.18850-1-clabbe.montjoie@gmail.com> <20170606134417.18850-3-clabbe.montjoie@gmail.com> <20170619052707.GA13180@gondor.apana.org.au> <20170619075524.GA27419@Red> <20170623064837.GA29139@gondor.apana.org.au> <20170714111536.GA30440@Red> <20170728135257.GE21401@gondor.apana.org.au> <20170728150119.GD7221@Red>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1707198

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher  request Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-09 11:50 +0200

csiph-web