OSDN Git Service

crypto: arm64/chacha20 - add XChaCha20 support
authorEric Biggers <ebiggers@google.com>
Tue, 4 Dec 2018 03:52:50 +0000 (19:52 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Dec 2018 10:24:36 +0000 (18:24 +0800)
commitcc7cf991e9eb54cac7733dc7d8f3a8591ba6e1c3
tree3b58c06a4ca5cfa2fcf54bea09c62b577748772e
parenta00fa0c88774bea9a102fc616598d9ee52765451
crypto: arm64/chacha20 - add XChaCha20 support

Add an XChaCha20 implementation that is hooked up to the ARM64 NEON
implementation of ChaCha20.  This can be used by Adiantum.

A NEON implementation of single-block HChaCha20 is also added so that
XChaCha20 can use it rather than the generic implementation.  This
required refactoring the ChaCha20 permutation into its own function.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/Kconfig
arch/arm64/crypto/chacha20-neon-core.S
arch/arm64/crypto/chacha20-neon-glue.c