OSDN Git Service

crypto: arm64/chacha - depend on generic chacha library instead of crypto driver
authorArd Biesheuvel <ardb@kernel.org>
Fri, 8 Nov 2019 12:22:11 +0000 (13:22 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 17 Nov 2019 01:02:39 +0000 (09:02 +0800)
commitc77da4867cbb7841177275dbb250f5c09679fae4
treee59de78149e43a8331b72ec093f16f1e194c602e
parent84e03fa39fbe95a5567d43bff458c6d3b3a23ad1
crypto: arm64/chacha - depend on generic chacha library instead of crypto driver

Depend on the generic ChaCha library routines instead of pulling in the
generic ChaCha skcipher driver, which is more than we need, and makes
managing the dependencies between the generic library, generic driver,
accelerated library and driver more complicated.

While at it, drop the logic to prefer the scalar code on short inputs.
Turning the NEON on and off is cheap these days, and one major use case
for ChaCha20 is ChaCha20-Poly1305, which is guaranteed to hit the scalar
path upon every invocation  (when doing the Poly1305 nonce generation)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/Kconfig
arch/arm64/crypto/chacha-neon-glue.c