From b4b58e435d95bcef463b308c578e3376597a20e8 Mon Sep 17 00:00:00 2001 From: miod <> Date: Mon, 17 Nov 2014 20:31:22 +0000 Subject: [PATCH] Add the Cammelia cipher to libcrypto. There used to be a strong reluctance to provide this cipher in LibreSSL in the past, because the licence terms under which Cammelia was released by NTT were free-but-not-in-the-corners, by restricting the right to modify the source code, as well retaining the right to enforce their patents against anyone in the future. However, as stated in http://www.ntt.co.jp/news/news06e/0604/060413a.html , NTT changed its mind and made this code truly free. We only wish there had been more visibility of this, for we could have had enabled Cammelia earlier (-: Licence change noticed by deraadt@. General agreement from the usual LibreSSL suspects. Crank libcrypto.so minor version due to the added symbols. --- src/lib/libcrypto/crypto/Makefile | 4 ++-- src/lib/libcrypto/crypto/arch/alpha/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/amd64/Makefile.inc | 5 ++++- src/lib/libcrypto/crypto/arch/arm/Makefile.inc | 2 ++ src/lib/libcrypto/crypto/arch/hppa/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/i386/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/mips64/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/powerpc/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/sparc/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/sparc64/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/arch/vax/Makefile.inc | 4 +++- src/lib/libcrypto/crypto/shlib_version | 2 +- 12 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/lib/libcrypto/crypto/Makefile b/src/lib/libcrypto/crypto/Makefile index 0c4db184..da53155a 100644 --- a/src/lib/libcrypto/crypto/Makefile +++ b/src/lib/libcrypto/crypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.47 2014/11/09 19:17:11 miod Exp $ +# $OpenBSD: Makefile,v 1.48 2014/11/17 20:31:20 miod Exp $ LIB= crypto @@ -72,7 +72,7 @@ SRCS+= bn_depr.c bn_const.c bn_x931p.c SRCS+= buffer.c buf_err.c buf_str.c # camellia/ -#SRCS+= cmll_ecb.c cmll_ofb.c cmll_cfb.c cmll_ctr.c cmll_utl.c +SRCS+= cmll_cfb.c cmll_ctr.c cmll_ecb.c cmll_ofb.c # cast/ SRCS+= c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c diff --git a/src/lib/libcrypto/crypto/arch/alpha/Makefile.inc b/src/lib/libcrypto/crypto/arch/alpha/Makefile.inc index 9c9d77ea..82fa9fc1 100644 --- a/src/lib/libcrypto/crypto/arch/alpha/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/alpha/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/05/03 17:23:55 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.3 2014/11/17 20:31:21 miod Exp $ # alpha-specific libcrypto build rules @@ -10,6 +10,8 @@ SRCS+= bf_enc.c SRCS+= bn_asm.c SSLASM+= bn alpha-mont CFLAGS+= -DOPENSSL_BN_ASM_MONT +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= des_enc.c fcrypt_b.c # modes diff --git a/src/lib/libcrypto/crypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/crypto/arch/amd64/Makefile.inc index fe7e17df..3f921964 100644 --- a/src/lib/libcrypto/crypto/arch/amd64/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/amd64/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.3 2014/08/11 13:29:43 bcook Exp $ +# $OpenBSD: Makefile.inc,v 1.4 2014/11/17 20:31:21 miod Exp $ # amd64-specific libcrypto build rules @@ -23,6 +23,9 @@ CFLAGS+= -DOPENSSL_BN_ASM_MONT5 SSLASM+= bn x86_64-mont5 CFLAGS+= -DOPENSSL_BN_ASM_GF2m SSLASM+= bn x86_64-gf2m +# camellia +SRCS+= cmll_misc.c +SSLASM+= camellia cmll-x86_64 # des SRCS+= des_enc.c fcrypt_b.c # md5 diff --git a/src/lib/libcrypto/crypto/arch/arm/Makefile.inc b/src/lib/libcrypto/crypto/arch/arm/Makefile.inc index 08179b72..22145a79 100644 --- a/src/lib/libcrypto/crypto/arch/arm/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/arm/Makefile.inc @@ -14,6 +14,8 @@ CFLAGS+= -DOPENSSL_BN_ASM_MONT SSLASM+= bn armv4-mont CFLAGS+= -DOPENSSL_BN_ASM_GF2m SSLASM+= bn armv4-gf2m +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= des_enc.c fcrypt_b.c # modes diff --git a/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc index 8f91214a..0f605868 100644 --- a/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.6 2014/09/27 20:42:38 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.7 2014/11/17 20:31:21 miod Exp $ # hppa-specific libcrypto build rules @@ -12,6 +12,8 @@ SRCS+= bf_enc.c SRCS+= bn_asm.c SSLASM+= bn parisc-mont parisc-mont CFLAGS+= -DOPENSSL_BN_ASM_MONT -DBN_DIV2W +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= des_enc.c fcrypt_b.c # modes diff --git a/src/lib/libcrypto/crypto/arch/i386/Makefile.inc b/src/lib/libcrypto/crypto/arch/i386/Makefile.inc index e450bfe8..f4e1f36b 100644 --- a/src/lib/libcrypto/crypto/arch/i386/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/i386/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.3 2014/05/07 00:04:14 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.4 2014/11/17 20:31:22 miod Exp $ # i386-specific libcrypto build rules @@ -20,6 +20,8 @@ CFLAGS+= -DOPENSSL_BN_ASM_MONT SSLASM+= bn x86-mont CFLAGS+= -DOPENSSL_BN_ASM_GF2m SSLASM+= bn x86-gf2m +# camellia +SSLASM+= camellia cmll-x86 # des SRCS+= fcrypt_b.c SSLASM+= des des-586 diff --git a/src/lib/libcrypto/crypto/arch/mips64/Makefile.inc b/src/lib/libcrypto/crypto/arch/mips64/Makefile.inc index 0ae20ad5..3b8f01e4 100644 --- a/src/lib/libcrypto/crypto/arch/mips64/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/mips64/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/05/02 21:55:31 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.3 2014/11/17 20:31:22 miod Exp $ # mips64-specific libcrypto build rules @@ -12,6 +12,8 @@ SRCS+= bf_enc.c SSLASM+= bn mips bn-mips SSLASM+= bn mips-mont mips-mont CFLAGS+= -DOPENSSL_BN_ASM_MONT -DBN_DIV3W +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= des_enc.c fcrypt_b.c # rc4 diff --git a/src/lib/libcrypto/crypto/arch/powerpc/Makefile.inc b/src/lib/libcrypto/crypto/arch/powerpc/Makefile.inc index b6ef2630..46790859 100644 --- a/src/lib/libcrypto/crypto/arch/powerpc/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/powerpc/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.1 2014/05/03 11:41:05 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ # powerpc-specific libcrypto build rules @@ -14,6 +14,8 @@ SSLASM+= bn ppc bn-ppc SSLASM+= bn ppc-mont ppc-mont # bn_mul_mont_int #SSLASM+= bn ppc64-mont ppc64-mont # bn_mul_mont_fpu64 CFLAGS+= -DOPENSSL_BN_ASM_MONT +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= des_enc.c fcrypt_b.c # rc4 diff --git a/src/lib/libcrypto/crypto/arch/sparc/Makefile.inc b/src/lib/libcrypto/crypto/arch/sparc/Makefile.inc index 54dc3187..ba9954c8 100644 --- a/src/lib/libcrypto/crypto/arch/sparc/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/sparc/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.1 2014/05/05 04:44:54 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ # sparc-specific libcrypto build rules @@ -13,6 +13,8 @@ SRCS+= sparcv8.S .else SRCS+= bn_asm.c .endif +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= fcrypt_b.c SRCS+= des_enc-sparc.S diff --git a/src/lib/libcrypto/crypto/arch/sparc64/Makefile.inc b/src/lib/libcrypto/crypto/arch/sparc64/Makefile.inc index 2565bd42..e3f217db 100644 --- a/src/lib/libcrypto/crypto/arch/sparc64/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/sparc64/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.1 2014/05/03 20:06:13 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ # sparc64-specific libcrypto build rules @@ -10,6 +10,8 @@ SSLASM+= aes aes-sparcv9 aes-sparcv9 SRCS+= bf_enc.c # bn SRCS+= bn_asm.c +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= fcrypt_b.c SRCS+= des_enc-sparc.S diff --git a/src/lib/libcrypto/crypto/arch/vax/Makefile.inc b/src/lib/libcrypto/crypto/arch/vax/Makefile.inc index 968783c5..f7764cf4 100644 --- a/src/lib/libcrypto/crypto/arch/vax/Makefile.inc +++ b/src/lib/libcrypto/crypto/arch/vax/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.1 2014/05/04 17:13:05 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ # vax-specific libcrypto build rules @@ -9,6 +9,8 @@ SRCS+= aes_core.c aes_cbc.c SRCS+= bf_enc.c # bn SRCS+= bn_asm_vax.S +# camellia +SRCS+= camellia.c cmll_cbc.c cmll_misc.c # des SRCS+= des_enc.c fcrypt_b.c # rc4 diff --git a/src/lib/libcrypto/crypto/shlib_version b/src/lib/libcrypto/crypto/shlib_version index 869b6116..ac20b1fa 100644 --- a/src/lib/libcrypto/crypto/shlib_version +++ b/src/lib/libcrypto/crypto/shlib_version @@ -1,2 +1,2 @@ major=30 -minor=2 +minor=3