summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-07-09 14:18:49 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2022-07-15 16:43:59 +0800
commit4ceb3b594c3abf8b875e2bc541a7d301290574df (patch)
treebd04db3bb4dcbf6ea40bb77a46092ea54ca69bb8
parentf8daa5465f243e6a4afcb0feca83f8cdc59e5ee2 (diff)
downloadlinux-crypto-4ceb3b594c3abf8b875e2bc541a7d301290574df.tar.gz
linux-crypto-4ceb3b594c3abf8b875e2bc541a7d301290574df.zip
crypto: lib - make the sha1 library optional
Since the Linux RNG no longer uses sha1_transform(), the SHA-1 library is no longer needed unconditionally. Make it possible to build the Linux kernel without the SHA-1 library by putting it behind a kconfig option, and selecting this new option from the kconfig options that gate the remaining users: CRYPTO_SHA1 for crypto/sha1_generic.c, BPF for kernel/bpf/core.c, and IPV6 for net/ipv6/addrconf.c. Unfortunately, since BPF is selected by NET, for now this can only make a difference for kernels built without networking support. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 54bdcf2c..75c71d9a 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -901,6 +901,7 @@ config CRYPTO_RMD160
config CRYPTO_SHA1
tristate "SHA1 digest algorithm"
select CRYPTO_HASH
+ select CRYPTO_LIB_SHA1
help
SHA-1 secure hash standard (FIPS 180-1/DFIPS 180-2).