linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Subject: RE: generic ahash question
Date: Fri, 19 Jul 2019 21:30:20 +0000	[thread overview]
Message-ID: <MN2PR20MB29737E72B082B6CAA43189FACACB0@MN2PR20MB2973.namprd20.prod.outlook.com> (raw)
In-Reply-To: <20190719200711.GD1422@gmail.com>

> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org <linux-crypto-owner@vger.kernel.org> On Behalf Of Eric Biggers
> Sent: Friday, July 19, 2019 10:07 PM
> To: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
> Cc: linux-crypto@vger.kernel.org; Herbert Xu <herbert@gondor.apana.org.au>; David S. Miller <davem@davemloft.net>
> Subject: Re: generic ahash question
> 
> On Fri, Jul 19, 2019 at 07:33:30PM +0000, Pascal Van Leeuwen wrote:
> > > -----Original Message-----
> > > From: linux-crypto-owner@vger.kernel.org <linux-crypto-owner@vger.kernel.org> On Behalf Of Eric Biggers
> > > Sent: Friday, July 19, 2019 6:23 PM
> > > To: Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>
> > > Cc: linux-crypto@vger.kernel.org; Herbert Xu <herbert@gondor.apana.org.au>; David S. Miller <davem@davemloft.net>
> > > Subject: Re: generic ahash question
> > >
> > > On Fri, Jul 19, 2019 at 02:41:03PM +0000, Pascal Van Leeuwen wrote:
> > > > Hi,
> > > >
> > > > I recall reading somewhere in the Linux Crypto documentation that support for finup() and digest()
> > > > calls were explicitly added to support hardware that couldn't handle seperate init/update/final
> > > > calls so they could at least be used with e.g. the IPsec stack.  I also noticed that testmgr *does*
> > > >  attempt to verify these seperate calls ...
> > > >
> > > > So I'm guessing there must be some flags that I can set to indicate I'm not supporting seperate
> > > > init/update/final calls so that testmgr skips those specific tests? Which flag(s) do I need to set?
> > > >
> > >
> > > Where does the documentation say that?
> >
> > For finup:
> > "As some hardware cannot do update and final separately, this callback was added to allow such
> > hardware to be used at least by IPsec"
> >
> > For digest:
> > "Just like finup, this was added for hardware which cannot do even the finup, but can only do the
> > whole transformation in one run."
> >
> > Those statement sort of imply (to me) that it's OK to only support digest or only finup and digest.
> >
> 
> Can you send a patch to fix this documentation?
> 
I could add some big fat disclaimer somewhere, but admittedly I just did not read or
remember thoroughly enough. And perhaps my memory was just being selective,
only remembering the parts that suited me well (it usually does :-).

Still, it seems rather odd to on the one hand acknowledge the fact that there is 
hardware out there with these limitations, and add  specific support for that, and 
on the other hand burden their drivers with implementing all these fallbacks.
That's why I assumed there must be some flags somehere to indicate to the API
that it should not bother my driver with requests requiring init/update/final.
Which I now know is not the case, so fine, I either implement the fallbacks or I
just don't bother supporting the algorithm.

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com


  reply	other threads:[~2019-07-19 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19 14:41 generic ahash question Pascal Van Leeuwen
2019-07-19 14:58 ` Herbert Xu
2019-07-19 16:02   ` Pascal Van Leeuwen
2019-07-19 16:23 ` Eric Biggers
2019-07-19 19:33   ` Pascal Van Leeuwen
2019-07-19 20:07     ` Eric Biggers
2019-07-19 21:30       ` Pascal Van Leeuwen [this message]
2019-07-20  2:50         ` Herbert Xu

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=MN2PR20MB29737E72B082B6CAA43189FACACB0@MN2PR20MB2973.namprd20.prod.outlook.com \
    --to=pvanleeuwen@verimatrix.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /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).