summaryrefslogtreecommitdiff
path: root/lib/crypto/Makefile
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-06-30 19:03:06 +0300
committerEric Biggers <ebiggers@kernel.org>2025-06-30 19:26:19 +0300
commitb693c703accb08cbd52f0b94d810d6abbca3bfb9 (patch)
treeee291c5d41ade237f13d87d5cc505254e250a15c /lib/crypto/Makefile
parente0fca177556c4419819876ac5a947b0844115d56 (diff)
downloadlinux-b693c703accb08cbd52f0b94d810d6abbca3bfb9.tar.xz
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>
Diffstat (limited to 'lib/crypto/Makefile')
-rw-r--r--lib/crypto/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index b0c0f8aea269..f6b6f370451e 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -64,6 +64,12 @@ libsha256-y := sha256.o
obj-$(CONFIG_CRYPTO_LIB_SHA256_GENERIC) += libsha256-generic.o
libsha256-generic-y := sha256-generic.o
+obj-$(CONFIG_CRYPTO_LIB_SHA512) += libsha512.o
+libsha512-y := sha512.o
+ifeq ($(CONFIG_CRYPTO_LIB_SHA512_ARCH),y)
+CFLAGS_sha512.o += -I$(src)/$(SRCARCH)
+endif # CONFIG_CRYPTO_LIB_SHA512_ARCH
+
obj-$(CONFIG_MPILIB) += mpi/
obj-$(CONFIG_CRYPTO_SELFTESTS_FULL) += simd.o