[PATCH 01/13] crypto: sha256 - support arch-optimized lib and expose through shash

Eric Biggers ebiggers at kernel.org
Sat Apr 26 18:12:28 PDT 2025


On Sun, Apr 27, 2025 at 09:06:51AM +0800, Herbert Xu wrote:
> Eric Biggers <ebiggers at kernel.org> 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



More information about the linux-riscv mailing list