diff options
author | Eric Biggers <ebiggers@google.com> | 2018-12-05 01:20:02 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-12-13 05:24:57 -0500 |
commit | 4af78261870a7d36dd222af8dad9688b705e365e (patch) | |
tree | 6013fcbd4c774b15033d09b67dfa7320ec22bc3a /crypto | |
parent | 0f961f9f670e7c07690bfde2f533b93c653569cc (diff) |
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 'crypto')
-rw-r--r-- | crypto/Kconfig | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index d0bff6ea6b10..dc3a0e3ea2ac 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig | |||
@@ -1468,19 +1468,13 @@ config CRYPTO_CHACHA20 | |||
1468 | in some performance-sensitive scenarios. | 1468 | in some performance-sensitive scenarios. |
1469 | 1469 | ||
1470 | config CRYPTO_CHACHA20_X86_64 | 1470 | config CRYPTO_CHACHA20_X86_64 |
1471 | tristate "ChaCha20 cipher algorithm (x86_64/SSSE3/AVX2)" | 1471 | tristate "ChaCha stream cipher algorithms (x86_64/SSSE3/AVX2/AVX-512VL)" |
1472 | depends on X86 && 64BIT | 1472 | depends on X86 && 64BIT |
1473 | select CRYPTO_BLKCIPHER | 1473 | select CRYPTO_BLKCIPHER |
1474 | select CRYPTO_CHACHA20 | 1474 | select CRYPTO_CHACHA20 |
1475 | help | 1475 | help |
1476 | ChaCha20 cipher algorithm, RFC7539. | 1476 | SSSE3, AVX2, and AVX-512VL optimized implementations of the ChaCha20 |
1477 | 1477 | and XChaCha20 stream ciphers. | |
1478 | ChaCha20 is a 256-bit high-speed stream cipher designed by Daniel J. | ||
1479 | Bernstein and further specified in RFC7539 for use in IETF protocols. | ||
1480 | This is the x86_64 assembler implementation using SIMD instructions. | ||
1481 | |||
1482 | See also: | ||
1483 | <http://cr.yp.to/chacha/chacha-20080128.pdf> | ||
1484 | 1478 | ||
1485 | config CRYPTO_SEED | 1479 | config CRYPTO_SEED |
1486 | tristate "SEED cipher algorithm" | 1480 | tristate "SEED cipher algorithm" |