Re: Why are we testing an intermediate result in ahash?

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

 



On Fri, Mar 02, 2018 at 03:11:52PM -0600, Gary R Hook wrote:
> Commit 466d7b9f6 (cryptodev-2.6) added code to testmgr to populate, for
> async hash operations, the result buffer with a known value and to test the
> buffer against that value at intermediate steps. If the result buffer
> changes the operation is failed.
> 
> My question is: why?

The problem is that you must not touch the result buffer unless
you're doing a finalisation.  Indeed, the caller may have provided
a NULL pointer for what it's worth.

Cheers,
-- 
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