Skip to contentSkip to conversation

crypto: remove Speck

PATCH In review Jason A. Donenfeld 2 participants 2 messages Apr 24, 2018

Subsystems (6)
Arm (32-bit) Crypto API arm64 s390 +2 more subsystems
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: remove Speck

This NSA-designed cipher was rejected for inclusion in international standards by ISO/IEC. Before anyone actually starts using it by accident, let's just not ship it at all.

---
 arch/arm/crypto/Kconfig             |    6 -
 arch/arm/crypto/Makefile            |    2 -
 arch/arm/crypto/speck-neon-core.S   |  432 --------
 arch/arm/crypto/speck-neon-glue.c   |  288 ------
 arch/arm64/crypto/Kconfig           |    6 -
 arch/arm64/crypto/Makefile          |    3 -
 arch/arm64/crypto/speck-neon-core.S |  352 -------
 arch/arm64/crypto/speck-neon-glue.c |  282 -----
 arch/s390/defconfig                 |    1 -
 crypto/Kconfig                      |   14 -
 crypto/Makefile                     |    1 -
 crypto/speck.c                      |  307 ------
 crypto/testmgr.c                    |   36 -
 crypto/testmgr.h                    | 1486 ---------------------------
 include/crypto/speck.h              |   62 --
 15 files changed, 3278 deletions(-)
 delete mode 100644 arch/arm/crypto/speck-neon-core.S
 delete mode 100644 arch/arm/crypto/speck-neon-glue.c
 delete mode 100644 arch/arm64/crypto/speck-neon-core.S
 delete mode 100644 arch/arm64/crypto/speck-neon-glue.c
 delete mode 100644 crypto/speck.c
 delete mode 100644 include/crypto/speck.h
arch/arm/crypto/Kconfig +0 -6
index 925d1364727a..b8e69fe282b8 100644
@@ -121,10 +121,4 @@ config CRYPTO_CHACHA20_NEON
 	select CRYPTO_BLKCIPHER
 	select CRYPTO_CHACHA20
 
-config CRYPTO_SPECK_NEON
-	tristate "NEON accelerated Speck cipher algorithms"
-	depends on KERNEL_MODE_NEON
-	select CRYPTO_BLKCIPHER
-	select CRYPTO_SPECK
-
 endif
arch/arm/crypto/Makefile +0 -2
index 8de542c48ade..bd5bceef0605 100644
@@ -10,7 +10,6 @@ obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
 obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
 obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
 obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o
-obj-$(CONFIG_CRYPTO_SPECK_NEON) += speck-neon.o
 
 ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
 ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
@@ -54,7 +53,6 @@ ghash-arm-ce-y	:= ghash-ce-core.o ghash-ce-glue.o
 crct10dif-arm-ce-y	:= crct10dif-ce-core.o crct10dif-ce-glue.o
 crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
 chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o
-speck-neon-y := speck-neon-core.o speck-neon-glue.o
 
 ifdef REGENERATE_ARM_CRYPTO
 quiet_cmd_perl = PERL    $@
arch/arm/crypto/speck-neon-core.S deleted +0 -432

432 lines not on this page · raw message

arch/arm/crypto/speck-neon-glue.c deleted +0 -288

288 lines not on this page · raw message

arch/arm64/crypto/Kconfig +0 -6
index cb5a243110c4..285c36c7b408 100644
@@ -113,10 +113,4 @@ config CRYPTO_AES_ARM64_BS
 	select CRYPTO_AES_ARM64
 	select CRYPTO_SIMD
 
-config CRYPTO_SPECK_NEON
-	tristate "NEON accelerated Speck cipher algorithms"
-	depends on KERNEL_MODE_NEON
-	select CRYPTO_BLKCIPHER
-	select CRYPTO_SPECK
-
 endif
arch/arm64/crypto/Makefile +0 -3
index f35ac684b1c0..4335d37bcd08 100644
@@ -53,9 +53,6 @@ sha512-arm64-y := sha512-glue.o sha512-core.o
 obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o
 chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o
 
-obj-$(CONFIG_CRYPTO_SPECK_NEON) += speck-neon.o
-speck-neon-y := speck-neon-core.o speck-neon-glue.o
-
 obj-$(CONFIG_CRYPTO_AES_ARM64) += aes-arm64.o
 aes-arm64-y := aes-cipher-core.o aes-cipher-glue.o
 
arch/arm64/crypto/speck-neon-core.S deleted +0 -352

352 lines not on this page · raw message

arch/arm64/crypto/speck-neon-glue.c deleted +0 -282

282 lines not on this page · raw message

arch/s390/defconfig +0 -1
index f40600eb1762..5134c71a4937 100644
@@ -221,7 +221,6 @@ CONFIG_CRYPTO_SALSA20=m
 CONFIG_CRYPTO_SEED=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_SM4=m
-CONFIG_CRYPTO_SPECK=m
 CONFIG_CRYPTO_TEA=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_DEFLATE=m
crypto/Kconfig +0 -14
index 76e8c88c97b4..fd33946924ef 100644
@@ -1517,20 +1517,6 @@ config CRYPTO_SM4
 
 	  If unsure, say N.
 
-config CRYPTO_SPECK
-	tristate "Speck cipher algorithm"
-	select CRYPTO_ALGAPI
-	help
-	  Speck is a lightweight block cipher that is tuned for optimal
-	  performance in software (rather than hardware).
-
-	  Speck may not be as secure as AES, and should only be used on systems
-	  where AES is not fast enough.
-
-	  See also: <https://eprint.iacr.org/2013/404.pdf>
-
-	  If unsure, say N.
-
 config CRYPTO_TEA
 	tristate "TEA, XTEA and XETA cipher algorithms"
 	select CRYPTO_ALGAPI
crypto/Makefile +0 -1
index 3a5f01616f74..cce481433b8e 100644
@@ -110,7 +110,6 @@ obj-$(CONFIG_CRYPTO_TEA) += tea.o
 obj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o
 obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
 obj-$(CONFIG_CRYPTO_SEED) += seed.o
-obj-$(CONFIG_CRYPTO_SPECK) += speck.o
 obj-$(CONFIG_CRYPTO_SALSA20) += salsa20_generic.o
 obj-$(CONFIG_CRYPTO_CHACHA20) += chacha20_generic.o
 obj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o
crypto/speck.c deleted +0 -307

307 lines not on this page · raw message

crypto/testmgr.c +0 -36
index af4a01c5037b..ba3f18450768 100644
@@ -3009,24 +3009,6 @@ static const struct alg_test_desc alg_test_descs[] = {
 				.dec = __VECS(sm4_dec_tv_template)
 			}
 		}
-	}, {
-		.alg = "ecb(speck128)",
-		.test = alg_test_skcipher,
-		.suite = {
-			.cipher = {
-				.enc = __VECS(speck128_enc_tv_template),
-				.dec = __VECS(speck128_dec_tv_template)
-			}
-		}
-	}, {
-		.alg = "ecb(speck64)",
-		.test = alg_test_skcipher,
-		.suite = {
-			.cipher = {
-				.enc = __VECS(speck64_enc_tv_template),
-				.dec = __VECS(speck64_dec_tv_template)
-			}
-		}
 	}, {
 		.alg = "ecb(tea)",
 		.test = alg_test_skcipher,
@@ -3584,24 +3566,6 @@ static const struct alg_test_desc alg_test_descs[] = {
 				.dec = __VECS(serpent_xts_dec_tv_template)
 			}
 		}
-	}, {
-		.alg = "xts(speck128)",
-		.test = alg_test_skcipher,
-		.suite = {
-			.cipher = {
-				.enc = __VECS(speck128_xts_enc_tv_template),
-				.dec = __VECS(speck128_xts_dec_tv_template)
-			}
-		}
-	}, {
-		.alg = "xts(speck64)",
-		.test = alg_test_skcipher,
-		.suite = {
-			.cipher = {
-				.enc = __VECS(speck64_xts_enc_tv_template),
-				.dec = __VECS(speck64_xts_dec_tv_template)
-			}
-		}
 	}, {
 		.alg = "xts(twofish)",
 		.test = alg_test_skcipher,
crypto/testmgr.h +0 -1486

1,214 lines not on this page · raw message

include/crypto/speck.h deleted +0 -62

62 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.17.0

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi Jason,

Quoted 20 lines · Jason A. Donenfeld

This NSA-designed cipher was rejected for inclusion in international standards by ISO/IEC. Before anyone actually starts using it by accident, let's just not ship it at all.

---
 arch/arm/crypto/Kconfig             |    6 -
 arch/arm/crypto/Makefile            |    2 -
 arch/arm/crypto/speck-neon-core.S   |  432 --------
 arch/arm/crypto/speck-neon-glue.c   |  288 ------
 arch/arm64/crypto/Kconfig           |    6 -
 arch/arm64/crypto/Makefile          |    3 -
 arch/arm64/crypto/speck-neon-core.S |  352 -------
 arch/arm64/crypto/speck-neon-glue.c |  282 -----
 arch/s390/defconfig                 |    1 -
 crypto/Kconfig                      |   14 -
 crypto/Makefile                     |    1 -
 crypto/speck.c                      |  307 ------
 crypto/testmgr.c                    |   36 -
 crypto/testmgr.h                    | 1486 ---------------------------
Quoted 9 lines
 include/crypto/speck.h              |   62 --
 15 files changed, 3278 deletions(-)
 delete mode 100644 arch/arm/crypto/speck-neon-core.S
 delete mode 100644 arch/arm/crypto/speck-neon-glue.c
 delete mode 100644 arch/arm64/crypto/speck-neon-core.S
 delete mode 100644 arch/arm64/crypto/speck-neon-glue.c
 delete mode 100644 crypto/speck.c
 delete mode 100644 include/crypto/speck.h

Please see my response on the other thread ("[PATCH v2 0/5] crypto: Speck support"):

https://marc.info/?l=linux-crypto-vger&m=152459378914647

Thanks,

- Eric