lib/crypto: sha512: Add support for SHA-384 and SHA-512
authorEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:03:06 +0000 (09:03 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:26:19 +0000 (09:26 -0700)
commitb693c703accb08cbd52f0b94d810d6abbca3bfb9
treeee291c5d41ade237f13d87d5cc505254e250a15c
parente0fca177556c4419819876ac5a947b0844115d56
lib/crypto: sha512: Add support for SHA-384 and SHA-512

Add basic support for SHA-384 and SHA-512 to lib/crypto/.

Various in-kernel users will be able to use this instead of the
old-school crypto API, which is harder to use and has more overhead.

The basic support added by this commit consists of the API and its
documentation, backed by a C implementation of the algorithms.
sha512_block_generic() is derived from crypto/sha512_generic.c.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250630160320.2888-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
include/crypto/sha2.h
lib/crypto/Kconfig
lib/crypto/Makefile
lib/crypto/sha512.c [new file with mode: 0644]