summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-12-04 22:20:02 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-12-13 18:24:57 +0800
commit8c91927b59580f4185c261fe2246be4b367d2ba1 (patch)
tree95a22d552f051f2d122620732b6caa4626cbb795
parent65c45c8b7ece659bbb8cae619bc6965fb7417eae (diff)
downloadlinux-crypto-8c91927b59580f4185c261fe2246be4b367d2ba1.tar.gz
linux-crypto-8c91927b59580f4185c261fe2246be4b367d2ba1.zip
crypto: x86/chacha20 - add XChaCha20 support
Add an XChaCha20 implementation that is hooked up to the x86_64 SIMD implementations of ChaCha20. This can be used by Adiantum. An SSSE3 implementation of single-block HChaCha20 is also added so that XChaCha20 can use it rather than the generic implementation. This required refactoring the ChaCha permutation into its own function. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--crypto/Kconfig12
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index d0bff6ea..dc3a0e3e 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1468,19 +1468,13 @@ config CRYPTO_CHACHA20
in some performance-sensitive scenarios.
config CRYPTO_CHACHA20_X86_64
- tristate "ChaCha20 cipher algorithm (x86_64/SSSE3/AVX2)"
+ tristate "ChaCha stream cipher algorithms (x86_64/SSSE3/AVX2/AVX-512VL)"
depends on X86 && 64BIT
select CRYPTO_BLKCIPHER
select CRYPTO_CHACHA20
help
- ChaCha20 cipher algorithm, RFC7539.
-
- ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J.
- Bernstein and further specified in RFC7539 for use in IETF protocols.
- This is the x86_64 assembler implementation using SIMD instructions.
-
- See also:
- <http://cr.yp.to/chacha/chacha-20080128.pdf>
+ SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20
+ and XChaCha20 stream ciphers.
config CRYPTO_SEED
tristate "SEED cipher algorithm"