]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit37cbabac6ab7e71e8d99a033a769b6e0d49e2b30
tree6b17f507f905fc8240c49bac6b54c508aef6c79b
parent79ce1446a944f820e9a320e39345dde9e6f2c614
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