OSDN Git Service

crypto: arm/chacha20 - add XChaCha20 support
authorEric Biggers <ebiggers@google.com>
Sat, 17 Nov 2018 01:26:24 +0000 (17:26 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Nov 2018 06:26:56 +0000 (14:26 +0800)
commitd97a94309d764ed907d4281da6246f5d935166f8
tree6b17f507f905fc8240c49bac6b54c508aef6c79b
parentbe2830b15b60011845ad701076511e8b93b2fd76
crypto: arm/chacha20 - add XChaCha20 support

Add an XChaCha20 implementation that is hooked up to the ARM NEON
implementation of ChaCha20.  This is needed for use in the Adiantum
encryption mode; see the generic code patch,
"crypto: chacha20-generic - add XChaCha20 support", for more details.

We also update the NEON code to support HChaCha20 on one block, so we
can use that in XChaCha20 rather than calling the generic HChaCha20.
This required factoring the permutation out into its own macro.

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