Re: Possible issue with new inauthentic AEAD in extended crypto tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 27, 2020 at 06:34:55PM -0800, Eric Biggers wrote:
>
> My understanding is that all crypto API functions that take scatterlists only
> forbid zero-length scatterlist elements in the part of the scatterlist that's
> actually passed to the API call.  The input to these functions is never simply a
> scatterlist, but rather a (scatterlist, length) pair.  Algorithms shouldn't look
> beyond 'length', so in the case of 'length == 0', they shouldn't look at the
> scatterlist at all -- which may be just a NULL pointer.
> 
> If that's the case, there's no problem with this test code.
> 
> I'm not sure the comment in aead.h is relevant here.  It sounds like it's
> warning about not providing an empty scatterlist element for the AAD when it's
> followed by a nonempty scatterlist element for the plaintext.  I'm not sure it's
> meant to also cover the case where both are empty.
> 
> Herbert and Stephan, any thoughts on what was intended?

I agree.  I think this is a bug in the driver.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux