svn commit: r360931 - in head: share/man/man9 sys/conf sys/crypto/blowfish sys/crypto/blowfish/arch/i386 sys/modules/crypto sys/opencrypto

John Baldwin jhb at FreeBSD.org
Mon May 11 21:24:08 UTC 2020


Author: jhb
Date: Mon May 11 21:24:05 2020
New Revision: 360931
URL: https://svnweb.freebsd.org/changeset/base/360931

Log:
  Remove support for the Blowfish algorithm from OCF.
  
  It no longer has any in-kernel consumers.
  
  Reviewed by:	cem
  Relnotes:	yes
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D24772

Deleted:
  head/sys/crypto/blowfish/arch/i386/bf_enc.S
  head/sys/crypto/blowfish/arch/i386/bf_enc_586.S
  head/sys/crypto/blowfish/arch/i386/bf_enc_686.S
  head/sys/crypto/blowfish/bf_ecb.c
  head/sys/crypto/blowfish/bf_enc.c
  head/sys/crypto/blowfish/bf_locl.h
  head/sys/crypto/blowfish/bf_pi.h
  head/sys/crypto/blowfish/bf_skey.c
  head/sys/crypto/blowfish/blowfish.h
  head/sys/opencrypto/xform_blf.c
Modified:
  head/share/man/man9/crypto.9
  head/sys/conf/files
  head/sys/conf/files.amd64
  head/sys/conf/files.arm
  head/sys/conf/files.arm64
  head/sys/conf/files.i386
  head/sys/conf/files.mips
  head/sys/conf/files.powerpc
  head/sys/conf/files.riscv
  head/sys/modules/crypto/Makefile
  head/sys/opencrypto/crypto.c
  head/sys/opencrypto/cryptodev.h
  head/sys/opencrypto/cryptosoft.c
  head/sys/opencrypto/xform.c
  head/sys/opencrypto/xform_enc.h

Modified: head/share/man/man9/crypto.9
==============================================================================
--- head/share/man/man9/crypto.9	Mon May 11 21:23:22 2020	(r360930)
+++ head/share/man/man9/crypto.9	Mon May 11 21:24:05 2020	(r360931)
@@ -129,7 +129,6 @@ The following encryption algorithms are supported:
 .It Dv CRYPTO_AES_CBC
 .It Dv CRYPTO_AES_ICM
 .It Dv CRYPTO_AES_XTS
-.It Dv CRYPTO_BLF_CBC
 .It Dv CRYPTO_CAMELLIA_CBC
 .It Dv CRYPTO_CHACHA20
 .It Dv CRYPTO_DES_CBC

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files	Mon May 11 21:24:05 2020	(r360931)
@@ -680,8 +680,6 @@ contrib/libb2/blake2s-ref.c	optional crypto | ipsec | 
 	compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function"
 crypto/blake2/blake2-sw.c	optional crypto | ipsec | ipsec_support \
 	compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual"
-crypto/blowfish/bf_ecb.c	optional ipsec | ipsec_support
-crypto/blowfish/bf_skey.c	optional crypto | ipsec | ipsec_support
 crypto/camellia/camellia.c	optional crypto | ipsec | ipsec_support
 crypto/camellia/camellia-api.c	optional crypto | ipsec | ipsec_support
 crypto/chacha20/chacha.c	standard

Modified: head/sys/conf/files.amd64
==============================================================================
--- head/sys/conf/files.amd64	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.amd64	Mon May 11 21:24:05 2020	(r360931)
@@ -136,7 +136,6 @@ amd64/pci/pci_cfgreg.c		optional	pci
 cddl/dev/dtrace/amd64/dtrace_asm.S			optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/amd64/dtrace_subr.c			optional dtrace compile-with "${DTRACE_C}"
 crypto/aesni/aeskeys_amd64.S	optional aesni
-crypto/blowfish/bf_enc.c	optional	crypto | ipsec | ipsec_support
 crypto/des/des_enc.c		optional	crypto | ipsec | \
 	ipsec_support | netsmb
 dev/acpi_support/acpi_wmi_if.m	standard

Modified: head/sys/conf/files.arm
==============================================================================
--- head/sys/conf/files.arm	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.arm	Mon May 11 21:24:05 2020	(r360931)
@@ -91,7 +91,6 @@ cddl/compat/opensolaris/kern/opensolaris_atomic.c	opti
 cddl/dev/dtrace/arm/dtrace_asm.S			optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/arm/dtrace_subr.c			optional dtrace compile-with "${DTRACE_C}"
 cddl/dev/fbt/arm/fbt_isa.c				optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
-crypto/blowfish/bf_enc.c	optional	crypto | ipsec | ipsec_support
 crypto/des/des_enc.c		optional	crypto | ipsec | ipsec_support | netsmb
 dev/cpufreq/cpufreq_dt.c	optional	cpufreq fdt
 dev/dwc/if_dwc.c		optional	dwc

Modified: head/sys/conf/files.arm64
==============================================================================
--- head/sys/conf/files.arm64	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.arm64	Mon May 11 21:24:05 2020	(r360931)
@@ -221,7 +221,6 @@ armv8_crypto_wrap.o		optional	armv8crypto		\
 	compile-with	"${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \
 	no-implicit-rule						\
 	clean		"armv8_crypto_wrap.o"
-crypto/blowfish/bf_enc.c	optional	crypto | ipsec | ipsec_support
 crypto/des/des_enc.c		optional	crypto | ipsec | ipsec_support | netsmb
 dev/acpica/acpi_bus_if.m	optional	acpi
 dev/acpica/acpi_if.m		optional	acpi

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.i386	Mon May 11 21:24:05 2020	(r360931)
@@ -75,10 +75,6 @@ compat/linux/linux_util.c	optional compat_linux
 compat/linux/linux_vdso.c	optional compat_linux
 compat/linux/linux.c		optional compat_linux
 compat/ndis/winx32_wrap.S	optional ndisapi pci
-bf_enc.o			optional crypto | ipsec	| ipsec_support \
-	dependency	"$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \
-	compile-with	"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \
-	no-implicit-rule
 crypto/aesni/aeskeys_i386.S	optional aesni
 crypto/des/arch/i386/des_enc.S	optional crypto | ipsec | ipsec_support | netsmb
 dev/agp/agp_ali.c		optional agp

Modified: head/sys/conf/files.mips
==============================================================================
--- head/sys/conf/files.mips	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.mips	Mon May 11 21:24:05 2020	(r360931)
@@ -82,8 +82,6 @@ mips/mips/sc_machdep.c			optional	sc
 dev/uart/uart_cpu_fdt.c			optional	uart fdt
 
 # crypto support -- use generic
-crypto/blowfish/bf_enc.c		optional	crypto | ipsec | \
-	ipsec_support
 crypto/des/des_enc.c			optional	crypto | ipsec | \
 	ipsec_support | netsmb
 

Modified: head/sys/conf/files.powerpc
==============================================================================
--- head/sys/conf/files.powerpc	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.powerpc	Mon May 11 21:24:05 2020	(r360931)
@@ -14,7 +14,6 @@ cddl/compat/opensolaris/kern/opensolaris_atomic.c			op
 cddl/dev/dtrace/powerpc/dtrace_asm.S		optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/powerpc/dtrace_subr.c		optional dtrace compile-with "${DTRACE_C}"
 cddl/dev/fbt/powerpc/fbt_isa.c			optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
-crypto/blowfish/bf_enc.c	optional	crypto | ipsec | ipsec_support
 crypto/des/des_enc.c		optional	crypto | ipsec | ipsec_support | netsmb
 dev/aacraid/aacraid_endian.c	optional	aacraid
 dev/adb/adb_bus.c		optional	adb

Modified: head/sys/conf/files.riscv
==============================================================================
--- head/sys/conf/files.riscv	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/conf/files.riscv	Mon May 11 21:24:05 2020	(r360931)
@@ -2,7 +2,6 @@
 cddl/dev/dtrace/riscv/dtrace_asm.S			optional dtrace compile-with "${DTRACE_S}"
 cddl/dev/dtrace/riscv/dtrace_subr.c			optional dtrace compile-with "${DTRACE_C}"
 cddl/dev/fbt/riscv/fbt_isa.c				optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
-crypto/blowfish/bf_enc.c	optional	crypto | ipsec | ipsec_support
 crypto/des/des_enc.c		optional	crypto | ipsec | ipsec_support | netsmb
 dev/ofw/ofw_cpu.c		optional	fdt
 dev/ofw/ofwpci.c		optional 	pci fdt

Modified: head/sys/modules/crypto/Makefile
==============================================================================
--- head/sys/modules/crypto/Makefile	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/modules/crypto/Makefile	Mon May 11 21:24:05 2020	(r360931)
@@ -4,7 +4,6 @@ LIBSODIUM=${SRCTOP}/sys/contrib/libsodium/src/libsodiu
 
 .PATH:	${SRCTOP}/sys/opencrypto
 .PATH:	${SRCTOP}/sys/crypto
-.PATH:	${SRCTOP}/sys/crypto/blowfish
 .PATH:	${SRCTOP}/sys/crypto/camellia
 .PATH:	${SRCTOP}/sys/crypto/des
 .PATH:	${SRCTOP}/sys/crypto/rijndael
@@ -23,7 +22,6 @@ KMOD	= crypto
 SRCS	= crypto.c cryptodev_if.c
 SRCS	+= criov.c cryptosoft.c xform.c
 SRCS	+= cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c rijndael-api-fst.c
-SRCS	+= bf_enc.c bf_ecb.c bf_skey.c
 SRCS	+= camellia.c camellia-api.c
 SRCS	+= des_ecb.c des_enc.c des_setkey.c
 SRCS	+= sha1.c sha256c.c sha512c.c

Modified: head/sys/opencrypto/crypto.c
==============================================================================
--- head/sys/opencrypto/crypto.c	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/opencrypto/crypto.c	Mon May 11 21:24:05 2020	(r360931)
@@ -598,8 +598,6 @@ crypto_cipher(const struct crypto_session_params *csp)
 		return (&enc_xform_des);
 	case CRYPTO_3DES_CBC:
 		return (&enc_xform_3des);
-	case CRYPTO_BLF_CBC:
-		return (&enc_xform_blf);
 	case CRYPTO_RIJNDAEL128_CBC:
 		return (&enc_xform_rijndael128);
 	case CRYPTO_AES_XTS:
@@ -682,7 +680,6 @@ static enum alg_type {
 } alg_types[] = {
 	[CRYPTO_DES_CBC] = ALG_CIPHER,
 	[CRYPTO_3DES_CBC] = ALG_CIPHER,
-	[CRYPTO_BLF_CBC] = ALG_CIPHER,
 	[CRYPTO_MD5_HMAC] = ALG_KEYED_DIGEST,
 	[CRYPTO_SHA1_HMAC] = ALG_KEYED_DIGEST,
 	[CRYPTO_RIPEMD160_HMAC] = ALG_KEYED_DIGEST,

Modified: head/sys/opencrypto/cryptodev.h
==============================================================================
--- head/sys/opencrypto/cryptodev.h	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/opencrypto/cryptodev.h	Mon May 11 21:24:05 2020	(r360931)
@@ -115,7 +115,6 @@
 #define	NULL_BLOCK_LEN		4	/* IPsec to maintain alignment */
 #define	DES_BLOCK_LEN		8
 #define	DES3_BLOCK_LEN		8
-#define	BLOWFISH_BLOCK_LEN	8
 #define	RIJNDAEL128_BLOCK_LEN	16
 #define	AES_BLOCK_LEN		16
 #define	AES_ICM_BLOCK_LEN	1
@@ -137,8 +136,6 @@
 #define	DES_MAX_KEY		DES_MIN_KEY
 #define	TRIPLE_DES_MIN_KEY	24
 #define	TRIPLE_DES_MAX_KEY	TRIPLE_DES_MIN_KEY
-#define	BLOWFISH_MIN_KEY	5
-#define	BLOWFISH_MAX_KEY	56 /* 448 bits, max key */
 #define	RIJNDAEL_MIN_KEY	16
 #define	RIJNDAEL_MAX_KEY	32
 #define	AES_MIN_KEY		RIJNDAEL_MIN_KEY

Modified: head/sys/opencrypto/cryptosoft.c
==============================================================================
--- head/sys/opencrypto/cryptosoft.c	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/opencrypto/cryptosoft.c	Mon May 11 21:24:05 2020	(r360931)
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/limits.h>
 #include <sys/mutex.h>
 
-#include <crypto/blowfish/blowfish.h>
 #include <crypto/sha1.h>
 #include <opencrypto/rmd160.h>
 #include <sys/md5.h>

Modified: head/sys/opencrypto/xform.c
==============================================================================
--- head/sys/opencrypto/xform.c	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/opencrypto/xform.c	Mon May 11 21:24:05 2020	(r360931)
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/kernel.h>
 #include <machine/cpu.h>
 
-#include <crypto/blowfish/blowfish.h>
 #include <crypto/des/des.h>
 #include <crypto/rijndael/rijndael.h>
 #include <crypto/camellia/camellia.h>
@@ -79,7 +78,6 @@ MALLOC_DEFINE(M_XDATA, "xform", "xform data buffers");
 #include "xform_null.c"
 #include "xform_des1.c"
 #include "xform_des3.c"
-#include "xform_blf.c"
 #include "xform_rijndael.c"
 #include "xform_aes_icm.c"
 #include "xform_aes_xts.c"

Modified: head/sys/opencrypto/xform_enc.h
==============================================================================
--- head/sys/opencrypto/xform_enc.h	Mon May 11 21:23:22 2020	(r360930)
+++ head/sys/opencrypto/xform_enc.h	Mon May 11 21:24:05 2020	(r360931)
@@ -33,7 +33,6 @@
 
 #include <sys/malloc.h>
 #include <sys/errno.h>
-#include <crypto/blowfish/blowfish.h>
 #include <crypto/des/des.h>
 #include <crypto/rijndael/rijndael.h>
 #include <crypto/camellia/camellia.h>


More information about the svn-src-all mailing list