Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: powerpc - Add chacha20/poly1305-p10 to Kconfig and Makefile

Defined CRYPTO_CHACHA20_P10 and CRYPTO POLY1305_P10 in Kconfig to
support optimized implementation for Power10 and later CPU.

Added new module driver chacha-p10-crypto and poly1305-p10-crypto.

Signed-off-by: Danny Tsen <dtsen@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Danny Tsen and committed by
Herbert Xu
161fca7e ba8f8624

+30
+26
arch/powerpc/crypto/Kconfig
··· 111 111 Support for cryptographic acceleration instructions on Power10 or 112 112 later CPU. This module supports stitched acceleration for AES/GCM. 113 113 114 + config CRYPTO_CHACHA20_P10 115 + tristate "Ciphers: ChaCha20, XChacha20, XChacha12 (P10 or later)" 116 + depends on PPC64 && CPU_LITTLE_ENDIAN 117 + select CRYPTO_SKCIPHER 118 + select CRYPTO_LIB_CHACHA_GENERIC 119 + select CRYPTO_ARCH_HAVE_LIB_CHACHA 120 + help 121 + Length-preserving ciphers: ChaCha20, XChaCha20, and XChaCha12 122 + stream cipher algorithms 123 + 124 + Architecture: PowerPC64 125 + - Power10 or later 126 + - Little-endian 127 + 128 + config CRYPTO_POLY1305_P10 129 + tristate "Hash functions: Poly1305 (P10 or later)" 130 + depends on PPC64 && CPU_LITTLE_ENDIAN 131 + select CRYPTO_HASH 132 + select CRYPTO_LIB_POLY1305_GENERIC 133 + help 134 + Poly1305 authenticator algorithm (RFC7539) 135 + 136 + Architecture: PowerPC64 137 + - Power10 or later 138 + - Little-endian 139 + 114 140 endmenu
+4
arch/powerpc/crypto/Makefile
··· 14 14 obj-$(CONFIG_CRYPTO_CRCT10DIF_VPMSUM) += crct10dif-vpmsum.o 15 15 obj-$(CONFIG_CRYPTO_VPMSUM_TESTER) += crc-vpmsum_test.o 16 16 obj-$(CONFIG_CRYPTO_AES_GCM_P10) += aes-gcm-p10-crypto.o 17 + obj-$(CONFIG_CRYPTO_CHACHA20_P10) += chacha-p10-crypto.o 18 + obj-$(CONFIG_CRYPTO_POLY1305_P10) += poly1305-p10-crypto.o 17 19 18 20 aes-ppc-spe-y := aes-spe-core.o aes-spe-keys.o aes-tab-4k.o aes-spe-modes.o aes-spe-glue.o 19 21 md5-ppc-y := md5-asm.o md5-glue.o ··· 25 23 crc32c-vpmsum-y := crc32c-vpmsum_asm.o crc32c-vpmsum_glue.o 26 24 crct10dif-vpmsum-y := crct10dif-vpmsum_asm.o crct10dif-vpmsum_glue.o 27 25 aes-gcm-p10-crypto-y := aes-gcm-p10-glue.o aes-gcm-p10.o ghashp10-ppc.o aesp10-ppc.o 26 + chacha-p10-crypto-y := chacha-p10-glue.o chacha-p10le-8x.o 27 + poly1305-p10-crypto-y := poly1305-p10-glue.o poly1305-p10le_64.o 28 28 29 29 quiet_cmd_perl = PERL $@ 30 30 cmd_perl = $(PERL) $< $(if $(CONFIG_CPU_LITTLE_ENDIAN), linux-ppc64le, linux-ppc64) > $@