diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2019-11-08 13:22:09 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-07-07 13:26:35 +0200 |
commit | f806491a89f7d62bcb25e3deb03ecf66fb51950d (patch) | |
tree | 2e350eec129a439d7ccd72712b006bdcb1a9371d | |
parent | 8d515489c3f8ff4c0c0ddea2482c643f928ca30d (diff) | |
download | linux-crypto-f806491a89f7d62bcb25e3deb03ecf66fb51950d.tar.gz linux-crypto-f806491a89f7d62bcb25e3deb03ecf66fb51950d.zip |
crypto: x86/chacha - depend on generic chacha library instead of crypto driver
commit 47708ff48faa838190a4be50489e08c1ec383b46 upstream.
In preparation of extending the x86 ChaCha driver to also expose the ChaCha
library interface, drop the dependency on the chacha_generic crypto driver
as a non-SIMD fallback, and depend on the generic ChaCha library directly.
This way, we only pull in the code we actually need, without registering
a set of ChaCha skciphers that we will never use.
Since turning the FPU on and off is cheap these days, simplify the SIMD
routine by dropping the per-page yield, which makes for a cleaner switch
to the library API as well. This also allows use to invoke the skcipher
walk routines in non-atomic mode.
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/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 34a74bdc..ef7b0110 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -1417,7 +1417,7 @@ config CRYPTO_CHACHA20_X86_64 tristate "ChaCha stream cipher algorithms (x86_64/SSSE3/AVX2/AVX-512VL)" depends on X86 && 64BIT select CRYPTO_BLKCIPHER - select CRYPTO_CHACHA20 + select CRYPTO_LIB_CHACHA_GENERIC help SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20, XChaCha20, and XChaCha12 stream ciphers. |