summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-11-08 13:22:10 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-07-07 13:26:35 +0200
commitbbef63e18c1ebf7e86b15fd8fc977516db5b560e (patch)
tree7fde906ab9902589ce60f8d57e790858a19c7cec
parentf806491a89f7d62bcb25e3deb03ecf66fb51950d (diff)
downloadlinux-crypto-bbef63e18c1ebf7e86b15fd8fc977516db5b560e.tar.gz
linux-crypto-bbef63e18c1ebf7e86b15fd8fc977516db5b560e.zip
crypto: x86/chacha - expose SIMD ChaCha routine as library function
commit 57cc6bc92e387c102c12ad07528c5d33a342ecca upstream. Wire the existing x86 SIMD ChaCha code into the new ChaCha library interface, so that users of the library interface will get the accelerated version when available. Given that calls into the library API will always go through the routines in this module if it is enabled, switch to static keys to select the optimal implementation available (which may be none at all, in which case we defer to the generic implementation for all invocations). 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/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index ef7b0110..1c470ea3 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1418,6 +1418,7 @@ config CRYPTO_CHACHA20_X86_64
depends on X86 && 64BIT
select CRYPTO_BLKCIPHER
select CRYPTO_LIB_CHACHA_GENERIC
+ select CRYPTO_ARCH_HAVE_LIB_CHACHA
help
SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20,
XChaCha20, and XChaCha12 stream ciphers.