Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: move gf128mul library into lib/crypto

The gf128mul library does not depend on the crypto API at all, so it can
be moved into lib/crypto. This will allow us to use it in other library
code in a subsequent patch without having to depend on CONFIG_CRYPTO.

While at it, change the Kconfig symbol name to align with other crypto
library implementations. However, the source file name is retained, as
it is reflected in the module .ko filename, and changing this might
break things for users.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Ard Biesheuvel and committed by
Herbert Xu
61c581a4 329cfa42

+11 -10
+1 -1
arch/arm/crypto/Kconfig
··· 18 18 depends on KERNEL_MODE_NEON 19 19 select CRYPTO_HASH 20 20 select CRYPTO_CRYPTD 21 - select CRYPTO_GF128MUL 21 + select CRYPTO_LIB_GF128MUL 22 22 help 23 23 GCM GHASH function (NIST SP800-38D) 24 24
+1 -1
arch/arm64/crypto/Kconfig
··· 6 6 tristate "Hash functions: GHASH (ARMv8 Crypto Extensions)" 7 7 depends on KERNEL_MODE_NEON 8 8 select CRYPTO_HASH 9 - select CRYPTO_GF128MUL 10 9 select CRYPTO_LIB_AES 10 + select CRYPTO_LIB_GF128MUL 11 11 select CRYPTO_AEAD 12 12 help 13 13 GCM GHASH function (NIST SP800-38D)
+3 -6
crypto/Kconfig
··· 175 175 This is intended for developer use only, as these tests take much 176 176 longer to run than the normal self tests. 177 177 178 - config CRYPTO_GF128MUL 179 - tristate 180 - 181 178 config CRYPTO_NULL 182 179 tristate "Null algorithms" 183 180 select CRYPTO_NULL2 ··· 711 714 712 715 config CRYPTO_LRW 713 716 tristate "LRW (Liskov Rivest Wagner)" 717 + select CRYPTO_LIB_GF128MUL 714 718 select CRYPTO_SKCIPHER 715 719 select CRYPTO_MANAGER 716 - select CRYPTO_GF128MUL 717 720 select CRYPTO_ECB 718 721 help 719 722 LRW (Liskov Rivest Wagner) mode ··· 923 926 924 927 config CRYPTO_GHASH 925 928 tristate "GHASH" 926 - select CRYPTO_GF128MUL 927 929 select CRYPTO_HASH 930 + select CRYPTO_LIB_GF128MUL 928 931 help 929 932 GCM GHASH function (NIST SP800-38D) 930 933 ··· 964 967 965 968 config CRYPTO_POLYVAL 966 969 tristate 967 - select CRYPTO_GF128MUL 968 970 select CRYPTO_HASH 971 + select CRYPTO_LIB_GF128MUL 969 972 help 970 973 POLYVAL hash function for HCTR2 971 974
-1
crypto/Makefile
··· 85 85 CFLAGS_wp512.o := $(call cc-option,-fno-schedule-insns) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149 86 86 obj-$(CONFIG_CRYPTO_BLAKE2B) += blake2b_generic.o 87 87 CFLAGS_blake2b_generic.o := -Wframe-larger-than=4096 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105930 88 - obj-$(CONFIG_CRYPTO_GF128MUL) += gf128mul.o 89 88 obj-$(CONFIG_CRYPTO_ECB) += ecb.o 90 89 obj-$(CONFIG_CRYPTO_CBC) += cbc.o 91 90 obj-$(CONFIG_CRYPTO_CFB) += cfb.o
crypto/gf128mul.c lib/crypto/gf128mul.c
+1 -1
drivers/crypto/chelsio/Kconfig
··· 3 3 tristate "Chelsio Crypto Co-processor Driver" 4 4 depends on CHELSIO_T4 5 5 select CRYPTO_LIB_AES 6 + select CRYPTO_LIB_GF128MUL 6 7 select CRYPTO_SHA1 7 8 select CRYPTO_SHA256 8 9 select CRYPTO_SHA512 9 10 select CRYPTO_AUTHENC 10 - select CRYPTO_GF128MUL 11 11 help 12 12 The Chelsio Crypto Co-processor driver for T6 adapters. 13 13
+3
lib/crypto/Kconfig
··· 11 11 config CRYPTO_LIB_ARC4 12 12 tristate 13 13 14 + config CRYPTO_LIB_GF128MUL 15 + tristate 16 + 14 17 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S 15 18 bool 16 19 help
+2
lib/crypto/Makefile
··· 13 13 obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o 14 14 libarc4-y := arc4.o 15 15 16 + obj-$(CONFIG_CRYPTO_LIB_GF128MUL) += gf128mul.o 17 + 16 18 # blake2s is used by the /dev/random driver which is always builtin 17 19 obj-y += libblake2s.o 18 20 libblake2s-y := blake2s.o