crypto: lib/sha256 - Add helpers for block-based shash
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 May 2025 05:30:53 +0000 (13:30 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 5 May 2025 10:20:45 +0000 (18:20 +0800)
commit5b90a779bc547939421bfeb333e470658ba94fb6
treebb8750b51d4f0f133884e002dae5313d9c763612
parent7d2461c7616743d62be0df8f9a5f4a6de29f119a
crypto: lib/sha256 - Add helpers for block-based shash

Add an internal sha256_finup helper and move the finalisation code
from __sha256_final into it.

Also add sha256_choose_blocks and CRYPTO_ARCH_HAVE_LIB_SHA256_SIMD
so that the Crypto API can use the SIMD block function unconditionally.
The Crypto API must not be used in hard IRQs and there is no reason
to have a fallback path for hardirqs.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/internal/sha2.h
lib/crypto/Kconfig
lib/crypto/sha256.c