Commit 1a49c573 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu
Browse files

crypto: powerpc/sha256 - implement library instead of shash



Instead of providing crypto_shash algorithms for the arch-optimized
SHA-256 code, instead implement the SHA-256 library.  This is much
simpler, it makes the SHA-256 library functions be arch-optimized, and
it fixes the longstanding issue where the arch-optimized SHA-256 was
disabled by default.  SHA-256 still remains available through
crypto_shash, but individual architectures no longer need to handle it.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b67b6f9a
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -39,17 +39,6 @@ config CRYPTO_SHA1_PPC_SPE
	  Architecture: powerpc using
	  - SPE (Signal Processing Engine) extensions

config CRYPTO_SHA256_PPC_SPE
	tristate "Hash functions: SHA-224 and SHA-256 (SPE)"
	depends on SPE
	select CRYPTO_SHA256
	select CRYPTO_HASH
	help
	  SHA-224 and SHA-256 secure hash algorithms (FIPS 180)

	  Architecture: powerpc using
	  - SPE (Signal Processing Engine) extensions

config CRYPTO_AES_PPC_SPE
	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (SPE)"
	depends on SPE
+0 −2
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ obj-$(CONFIG_CRYPTO_AES_PPC_SPE) += aes-ppc-spe.o
obj-$(CONFIG_CRYPTO_MD5_PPC) += md5-ppc.o
obj-$(CONFIG_CRYPTO_SHA1_PPC) += sha1-powerpc.o
obj-$(CONFIG_CRYPTO_SHA1_PPC_SPE) += sha1-ppc-spe.o
obj-$(CONFIG_CRYPTO_SHA256_PPC_SPE) += sha256-ppc-spe.o
obj-$(CONFIG_CRYPTO_AES_GCM_P10) += aes-gcm-p10-crypto.o
obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
obj-$(CONFIG_CRYPTO_CURVE25519_PPC64) += curve25519-ppc64le.o
@@ -18,7 +17,6 @@ aes-ppc-spe-y := aes-spe-core.o aes-spe-keys.o aes-tab-4k.o aes-spe-modes.o aes-
md5-ppc-y := md5-asm.o md5-glue.o
sha1-powerpc-y := sha1-powerpc-asm.o sha1.o
sha1-ppc-spe-y := sha1-spe-asm.o sha1-spe-glue.o
sha256-ppc-spe-y := sha256-spe-asm.o sha256-spe-glue.o
aes-gcm-p10-crypto-y := aes-gcm-p10-glue.o aes-gcm-p10.o ghashp10-ppc.o aesp10-ppc.o
vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
curve25519-ppc64le-y := curve25519-ppc64le-core.o curve25519-ppc64le_asm.o
+6 −0
Original line number Diff line number Diff line
@@ -13,3 +13,9 @@ config CRYPTO_POLY1305_P10
	default CRYPTO_LIB_POLY1305
	select CRYPTO_ARCH_HAVE_LIB_POLY1305
	select CRYPTO_LIB_POLY1305_GENERIC

config CRYPTO_SHA256_PPC_SPE
	tristate
	depends on SPE
	default CRYPTO_LIB_SHA256
	select CRYPTO_ARCH_HAVE_LIB_SHA256
+3 −0
Original line number Diff line number Diff line
@@ -5,3 +5,6 @@ chacha-p10-crypto-y := chacha-p10-glue.o chacha-p10le-8x.o

obj-$(CONFIG_CRYPTO_POLY1305_P10) += poly1305-p10-crypto.o
poly1305-p10-crypto-y := poly1305-p10-glue.o poly1305-p10le_64.o

obj-$(CONFIG_CRYPTO_SHA256_PPC_SPE) += sha256-ppc-spe.o
sha256-ppc-spe-y := sha256.o sha256-spe-asm.o
Loading