]> 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)
commit38b61cab34b608a0ba20f5f8aa02f42a3bd03db1
tree6b17f507f905fc8240c49bac6b54c508aef6c79b
parent8876d0d7ec63ecff1bcb1417a32075490ec63d98
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