Re: [PATCH v4 1/3] crypto: ti - Add support for SHA224/256/384/512 in DTHEv2 driver
From: Herbert Xu
Date: Sun Jul 12 2026 - 23:41:41 EST
On Fri, Jun 26, 2026 at 06:27:42PM +0530, T Pratham wrote:
>
> However, this sounds contradictory to the stated purpose of the flag
> itself. Commit 7650f826f7b2 ("crypto: shash - Handle partial blocks in
> API"), in which you introduced FINAL_NONZERO, says:
>
> "This will come in handy when this is extended to ahash where hardware
> often can't deal with a zero-length final."
That was the intention.
> This looks to me like a gap in the framework; the implementation of the
> feature does not exactly match the intention. What do you suggest should
> be the approach here, and going forward?
The issue is that to make it easier for the hardware, with the
existing frame-work we would have to penalise the software implementation
and make it withhold an extra block too. Because software is so much
faster than hardware, it makes no sense to do that.
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt