Re: [PATCH 01/13] crypto: sha256 - support arch-optimized lib and expose through shash
From: Eric Biggers
Date: Sat Apr 26 2025 - 21:12:36 EST
On Sun, Apr 27, 2025 at 09:06:51AM +0800, Herbert Xu wrote:
> Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> >
> > +static int crypto_sha256_update_arch(struct shash_desc *desc, const u8 *data,
> > + unsigned int len)
> > +{
> > + sha256_update(shash_desc_ctx(desc), data, len);
> > + return 0;
> > +}
>
> Please use the block functions directly in the shash implementation.
No, that would be silly. I'm not doing that. The full update including the
partial block handling is already needed in the library. There is no need to
implement it again at the shash level.
- Eric