> -----Original Message----- > From: linux-crypto-owner@xxxxxxxxxxxxxxx <linux-crypto-owner@xxxxxxxxxxxxxxx> On Behalf Of Eric Biggers > Sent: Friday, July 19, 2019 6:23 PM > To: Pascal Van Leeuwen <pvanleeuwen@xxxxxxxxxxxxxx> > Cc: linux-crypto@xxxxxxxxxxxxxxx; Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx> > 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. > > AFAICS, init/update/final have been mandatory for at least 9 years, as that's > when testmgr started testing it. See: I just spotted some [mandatory] tags as well ... must've missed those on the previous read, I'm not good with details, I'm more of a big picture guy. Not that I was expecting a different answer anyway :-) Just being hopeful. > > commit a8f1a05292db8b410be47fa905669672011f0343 > Author: David S. Miller <davem@xxxxxxxxxxxxx> > Date: Wed May 19 14:12:03 2010 +1000 > > crypto: testmgr - Add testing for async hashing and update/final > > - Eric Regards, Pascal van Leeuwen Silicon IP Architect, Multi-Protocol Engines @ Verimatrix www.insidesecure.com