summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-11-08 13:22:17 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-07-07 13:26:36 +0200
commitafc5a91ffbe6af391251c1e2ec875be402c91457 (patch)
treef862cdaaabb467e100782847bae6db176b24c224
parentbbef63e18c1ebf7e86b15fd8fc977516db5b560e (diff)
downloadlinux-crypto-afc5a91ffbe6af391251c1e2ec875be402c91457.tar.gz
linux-crypto-afc5a91ffbe6af391251c1e2ec875be402c91457.zip
crypto: mips/chacha - wire up accelerated 32r2 code from Zinc
commit ad261a4d13e1128853932f8f3cdcad4d68d12a92 upstream. This integrates the accelerated MIPS 32r2 implementation of ChaCha into both the API and library interfaces of the kernel crypto stack. The significance of this is that, in addition to becoming available as an accelerated library implementation, it can also be used by existing crypto API code such as Adiantum (for block encryption on ultra low performance cores) or IPsec using chacha20poly1305. These are use cases that have already opted into using the abstract crypto API. In order to support Adiantum, the core assembler routine has been adapted to take the round count as a function argument rather than hardcoding it to 20. Co-developed-by: René van Dorst <opensource@vdorst.com> Signed-off-by: René van Dorst <opensource@vdorst.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--crypto/Kconfig6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 1c470ea3..9650afc2 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1423,6 +1423,12 @@ config CRYPTO_CHACHA20_X86_64
SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20,
XChaCha20, and XChaCha12 stream ciphers.
+config CRYPTO_CHACHA_MIPS
+ tristate "ChaCha stream cipher algorithms (MIPS 32r2 optimized)"
+ depends on CPU_MIPS32_R2
+ select CRYPTO_BLKCIPHER
+ select CRYPTO_ARCH_HAVE_LIB_CHACHA
+
config CRYPTO_SEED
tristate "SEED cipher algorithm"
select CRYPTO_ALGAPI