RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-30 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Tuesday, July 30, 2019 6:26 AM > To: Pascal Van Leeuwen > Cc: Herbert Xu ; Pascal van Leeuwen > ; > linux-crypto@vger.kernel.org; da...@davemloft.net > Subject: Re: [PATCH] crypto: testmgr - Improve randomizati

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Eric Biggers
On Tue, Jul 30, 2019 at 01:26:17AM +, Pascal Van Leeuwen wrote: > > > > Oh, I see. Currently the fuzz tests assume that if encryption fails > > > > with an > > > > error (such as EINVAL), then decryption fails with that same error. > > > > > > > Ah ok, oops. It should really log the error tha

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
> > > Oh, I see. Currently the fuzz tests assume that if encryption fails with > > > an > > > error (such as EINVAL), then decryption fails with that same error. > > > > > Ah ok, oops. It should really log the error that was returned by the > > generic decryption instead. Which should just be a m

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Eric Biggers
On Tue, Jul 30, 2019 at 12:37:06AM +, Pascal Van Leeuwen wrote: > > > You're the expert, but shouldn't there be some priority to the checks > > > being performed? To me, it seems reasonable to do things like length > > > checks prior to even *starting* decryption and authentication. > > > There

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
> > You're the expert, but shouldn't there be some priority to the checks > > being performed? To me, it seems reasonable to do things like length > > checks prior to even *starting* decryption and authentication. > > Therefore, it makes more sense to get -EINVAL than -EBADMSG in this > > case. IMH

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
> -Original Message- > From: Eric Biggers > Sent: Tuesday, July 30, 2019 2:17 AM > To: Pascal Van Leeuwen > Cc: Pascal van Leeuwen ; linux-crypto@vger.kernel.org; > herb...@gondor.apana.org.au; da...@davemloft.net > Subject: Re: [PATCH] crypto: testmgr - Improve ra

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Eric Biggers
On Mon, Jul 29, 2019 at 10:16:48PM +, Pascal Van Leeuwen wrote: > > > > Note that the "empty test suite" message shouldn't be printed > > > > (especially not at > > > > KERN_ERR level!) if it's working as intended. > > > > > > > That's not my code, that was already there. I already got these m

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Eric Biggers
t; ; linux- > > cry...@vger.kernel.org; da...@davemloft.net > > Subject: Re: [PATCH] crypto: testmgr - Improve randomization of params for > > AEAD fuzz testing > > > > On Mon, Jul 29, 2019 at 10:16:48PM +, Pascal Van Leeuwen wrote: > > > > > > > EI

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
Herbert, > -Original Message- > From: Herbert Xu > Sent: Tuesday, July 30, 2019 12:31 AM > To: Pascal Van Leeuwen > Cc: Eric Biggers ; Pascal van Leeuwen > ; linux- > cry...@vger.kernel.org; da...@davemloft.net > Subject: Re: [PATCH] crypto: testmgr - Improve

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
> Pascal Van Leeuwen > > > Sent: Monday, July 29, 2019 11:11 AM > > > To: Eric Biggers ; Pascal van Leeuwen > > > > > > Cc: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; > > > da...@davemloft.net > > > Subject: RE: [PATCH

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Herbert Xu
On Mon, Jul 29, 2019 at 10:16:48PM +, Pascal Van Leeuwen wrote: > > > EINVAL is for invalid lengths while EBADMSG is for inauthentic inputs. > > Inauthentic test vectors aren't yet automatically generated (even after this > > patch), so I don't think EBADMSG should be seen here. Are you sure t

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
> > Interesting as the inside-secure driver also advertises this ciphersuite > > and does not > generate such > > an error. My guess is you get an error here because plen is not a multiple > > of 16 and this > is CBC > > (note to self: for block ciphers, emphasize legal lengths in the > > rando

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Eric Biggers
Biggers ; Pascal van Leeuwen > > > > Cc: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; > > da...@davemloft.net > > Subject: RE: [PATCH] crypto: testmgr - Improve randomization of params for > > AEAD fuzz > > testing > > > > Hi Eric,

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Eric Biggers
gt; Cc: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; > > da...@davemloft.net; Pascal Van Leeuwen > > > > Subject: Re: [PATCH] crypto: testmgr - Improve randomization of params for > > AEAD fuzz testing > > > > Hi Pascal, thanks for the patch! > > > > On

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
; > da...@davemloft.net > Subject: RE: [PATCH] crypto: testmgr - Improve randomization of params for > AEAD fuzz > testing > > Hi Eric, > > Thanks for your feedback! > > > -Original Message- > > From: Eric Biggers > > Sent: Sunday, July 28, 2019 7:3

RE: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-29 Thread Pascal Van Leeuwen
ject: Re: [PATCH] crypto: testmgr - Improve randomization of params for > AEAD fuzz testing > > Hi Pascal, thanks for the patch! > > On Wed, Jul 24, 2019 at 11:35:17AM +0200, Pascal van Leeuwen wrote: > > The probability of hitting specific input length corner cases relevant >

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-28 Thread Eric Biggers
Hi Pascal, thanks for the patch! On Wed, Jul 24, 2019 at 11:35:17AM +0200, Pascal van Leeuwen wrote: > The probability of hitting specific input length corner cases relevant > for certain hardware driver(s) (specifically: inside-secure) was found > to be too low. Additionally, for authenc AEADs, t