OSDN Git Service

crypto: mips/chacha - wire up accelerated 32r2 code from Zinc
authorArd Biesheuvel <ardb@kernel.org>
Fri, 8 Nov 2019 12:22:17 +0000 (13:22 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 17 Nov 2019 01:02:40 +0000 (09:02 +0800)
commit3a2f58f3ba4f6f44e33d1a48240d5eadb882cb59
tree4db812f7ac84ba457c76b99f6fd06552bec60ff0
parent49aa7c00eddf8d8f462b0256bd82e81762d7b0c6
crypto: mips/chacha - wire up accelerated 32r2 code from Zinc

This integrates the accelerated MIPS 32r2 implementation of ChaCha
into both the API and library interfaces of the kernel crypto stack.

The significance of this is that, in addition to becoming available
as an accelerated library implementation, it can also be used by
existing crypto API code such as Adiantum (for block encryption on
ultra low performance cores) or IPsec using chacha20poly1305. These
are use cases that have already opted into using the abstract crypto
API. In order to support Adiantum, the core assembler routine has
been adapted to take the round count as a function argument rather
than hardcoding it to 20.

Co-developed-by: René van Dorst <opensource@vdorst.com>
Signed-off-by: René van Dorst <opensource@vdorst.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/mips/Makefile
arch/mips/crypto/Makefile
arch/mips/crypto/chacha-core.S
arch/mips/crypto/chacha-glue.c [new file with mode: 0644]
crypto/Kconfig