Skip to content

Commit d8768fb

Browse files
committed
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library updates from Eric Biggers: - Add a RISC-V optimized implementation of Poly1305. This code was written by Andy Polyakov and contributed by Zhihang Shao. - Migrate the MD5 code into lib/crypto/, and add KUnit tests for MD5. Yes, it's still the 90s, and several kernel subsystems are still using MD5 for legacy use cases. As long as that remains the case, it's helpful to clean it up in the same way as I've been doing for other algorithms. Later, I plan to convert most of these users of MD5 to use the new MD5 library API instead of the generic crypto API. - Simplify the organization of the ChaCha, Poly1305, BLAKE2s, and Curve25519 code. Consolidate these into one module per algorithm, and centralize the configuration and build process. This is the same reorganization that has already been successful for SHA-1 and SHA-2. - Remove the unused crypto_kpp API for Curve25519. - Migrate the BLAKE2s and Curve25519 self-tests to KUnit. - Always enable the architecture-optimized BLAKE2s code. * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: (38 commits) crypto: md5 - Implement export_core() and import_core() wireguard: kconfig: simplify crypto kconfig selections lib/crypto: tests: Enable Curve25519 test when CRYPTO_SELFTESTS lib/crypto: curve25519: Consolidate into single module lib/crypto: curve25519: Move a couple functions out-of-line lib/crypto: tests: Add Curve25519 benchmark lib/crypto: tests: Migrate Curve25519 self-test to KUnit crypto: curve25519 - Remove unused kpp support crypto: testmgr - Remove curve25519 kpp tests crypto: x86/curve25519 - Remove unused kpp support crypto: powerpc/curve25519 - Remove unused kpp support crypto: arm/curve25519 - Remove unused kpp support crypto: hisilicon/hpre - Remove unused curve25519 kpp support lib/crypto: tests: Add KUnit tests for BLAKE2s lib/crypto: blake2s: Consolidate into single C translation unit lib/crypto: blake2s: Move generic code into blake2s.c lib/crypto: blake2s: Always enable arch-optimized BLAKE2s code lib/crypto: blake2s: Remove obsolete self-test lib/crypto: x86/blake2s: Reduce size of BLAKE2S_SIGMA2 lib/crypto: chacha: Consolidate into single module ...
2 parents e2fffe1 + b94bc43 commit d8768fb

143 files changed

Lines changed: 3389 additions & 5035 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arch/arm/configs/exynos_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m
364364
CONFIG_CRYPTO_USER_API_RNG=m
365365
CONFIG_CRYPTO_USER_API_AEAD=m
366366
CONFIG_CRYPTO_AES_ARM_BS=m
367-
CONFIG_CRYPTO_CHACHA20_NEON=m
368367
CONFIG_CRYPTO_DEV_EXYNOS_RNG=y
369368
CONFIG_CRYPTO_DEV_S5P=y
370369
CONFIG_DMA_CMA=y

arch/arm/configs/milbeaut_m10v_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ CONFIG_CRYPTO_GHASH_ARM_CE=m
101101
CONFIG_CRYPTO_AES_ARM=m
102102
CONFIG_CRYPTO_AES_ARM_BS=m
103103
CONFIG_CRYPTO_AES_ARM_CE=m
104-
CONFIG_CRYPTO_CHACHA20_NEON=m
105104
# CONFIG_CRYPTO_HW is not set
106105
CONFIG_DMA_CMA=y
107106
CONFIG_CMA_SIZE_MBYTES=64

arch/arm/configs/multi_v7_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,6 @@ CONFIG_CRYPTO_GHASH_ARM_CE=m
12911291
CONFIG_CRYPTO_AES_ARM=m
12921292
CONFIG_CRYPTO_AES_ARM_BS=m
12931293
CONFIG_CRYPTO_AES_ARM_CE=m
1294-
CONFIG_CRYPTO_CHACHA20_NEON=m
12951294
CONFIG_CRYPTO_DEV_SUN4I_SS=m
12961295
CONFIG_CRYPTO_DEV_FSL_CAAM=m
12971296
CONFIG_CRYPTO_DEV_EXYNOS_RNG=m

arch/arm/configs/omap2plus_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ CONFIG_CRYPTO_MICHAEL_MIC=y
708708
CONFIG_CRYPTO_GHASH_ARM_CE=m
709709
CONFIG_CRYPTO_AES_ARM=m
710710
CONFIG_CRYPTO_AES_ARM_BS=m
711-
CONFIG_CRYPTO_CHACHA20_NEON=m
712711
CONFIG_CRYPTO_DEV_OMAP=m
713712
CONFIG_CRYPTO_DEV_OMAP_SHAM=m
714713
CONFIG_CRYPTO_DEV_OMAP_AES=m

arch/arm/crypto/Kconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22

33
menu "Accelerated Cryptographic Algorithms for CPU (arm)"
44

5-
config CRYPTO_CURVE25519_NEON
6-
tristate
7-
depends on KERNEL_MODE_NEON
8-
select CRYPTO_KPP
9-
select CRYPTO_LIB_CURVE25519_GENERIC
10-
select CRYPTO_ARCH_HAVE_LIB_CURVE25519
11-
default CRYPTO_LIB_CURVE25519_INTERNAL
12-
help
13-
Curve25519 algorithm
14-
15-
Architecture: arm with
16-
- NEON (Advanced SIMD) extensions
17-
185
config CRYPTO_GHASH_ARM_CE
196
tristate "Hash functions: GHASH (PMULL/NEON/ARMv8 Crypto Extensions)"
207
depends on KERNEL_MODE_NEON

arch/arm/crypto/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o
77
obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o
88
obj-$(CONFIG_CRYPTO_BLAKE2B_NEON) += blake2b-neon.o
99
obj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o
10-
obj-$(CONFIG_CRYPTO_CURVE25519_NEON) += curve25519-neon.o
1110

1211
obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
1312
obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
@@ -18,4 +17,3 @@ blake2b-neon-y := blake2b-neon-core.o blake2b-neon-glue.o
1817
aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o
1918
ghash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o
2019
nhpoly1305-neon-y := nh-neon-core.o nhpoly1305-neon-glue.o
21-
curve25519-neon-y := curve25519-core.o curve25519-glue.o

arch/arm/crypto/curve25519-glue.c

Lines changed: 0 additions & 137 deletions
This file was deleted.

arch/m68k/configs/amiga_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ CONFIG_CRYPTO_DH=m
559559
CONFIG_CRYPTO_ECDH=m
560560
CONFIG_CRYPTO_ECDSA=m
561561
CONFIG_CRYPTO_ECRDSA=m
562-
CONFIG_CRYPTO_CURVE25519=m
563562
CONFIG_CRYPTO_AES=y
564563
CONFIG_CRYPTO_AES_TI=m
565564
CONFIG_CRYPTO_ANUBIS=m

arch/m68k/configs/apollo_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ CONFIG_CRYPTO_DH=m
516516
CONFIG_CRYPTO_ECDH=m
517517
CONFIG_CRYPTO_ECDSA=m
518518
CONFIG_CRYPTO_ECRDSA=m
519-
CONFIG_CRYPTO_CURVE25519=m
520519
CONFIG_CRYPTO_AES=y
521520
CONFIG_CRYPTO_AES_TI=m
522521
CONFIG_CRYPTO_ANUBIS=m

arch/m68k/configs/atari_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ CONFIG_CRYPTO_DH=m
536536
CONFIG_CRYPTO_ECDH=m
537537
CONFIG_CRYPTO_ECDSA=m
538538
CONFIG_CRYPTO_ECRDSA=m
539-
CONFIG_CRYPTO_CURVE25519=m
540539
CONFIG_CRYPTO_AES=y
541540
CONFIG_CRYPTO_AES_TI=m
542541
CONFIG_CRYPTO_ANUBIS=m

0 commit comments

Comments
 (0)