]> Gentwo Git Trees - linux/.git/commit
lib/crypto: sha3: Add SHA-3 support
authorDavid Howells <dhowells@redhat.com>
Sun, 26 Oct 2025 05:50:20 +0000 (22:50 -0700)
committerEric Biggers <ebiggers@kernel.org>
Thu, 6 Nov 2025 04:02:32 +0000 (20:02 -0800)
commit0593447248044ab609b43b947d0e198c887ac281
treed3563597ca6244ba994b07d7b22d01613fe9bd8a
parent414121190348edc3da26505fc1e6c7d8f2d75fae
lib/crypto: sha3: Add SHA-3 support

Add SHA-3 support to lib/crypto/.  All six algorithms in the SHA-3
family are supported: four digests (SHA3-224, SHA3-256, SHA3-384, and
SHA3-512) and two extendable-output functions (SHAKE128 and SHAKE256).

The SHAKE algorithms will be required for ML-DSA.

[EB: simplified the API to use fewer types and functions, fixed bug that
     sometimes caused incorrect SHAKE output, cleaned up the
     documentation, dropped an ad-hoc test that was inconsistent with
     the rest of lib/crypto/, and many other cleanups]

Signed-off-by: David Howells <dhowells@redhat.com>
Co-developed-by: Eric Biggers <ebiggers@kernel.org>
Tested-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251026055032.1413733-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Documentation/crypto/index.rst
Documentation/crypto/sha3.rst [new file with mode: 0644]
include/crypto/sha3.h
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/sha3.c [new file with mode: 0644]