linux-stable/arch/arm64/crypto
Ard Biesheuvel 7367bfeb2c crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR
This implements 5-way interleaving for ECB, CBC decryption and CTR,
resulting in a speedup of ~11% on Marvell ThunderX2, which has a
very deep pipeline and therefore a high issue latency for NEON
instructions operating on the same registers.

Note that XTS is left alone: implementing 5-way interleave there
would either involve spilling of the calculated tweaks to the
stack, or recalculating them after the encryption operation, and
doing either of those would most likely penalize low end cores.

For ECB, this is not a concern at all, given that we have plenty
of spare registers. For CTR and CBC decryption, we take advantage
of the fact that v16 is not used by the CE version of the code
(which is the only one targeted by the optimization), and so we
can reshuffle the code a bit and avoid having to spill to memory
(with the exception of one extra reload in the CBC routine)

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-07-03 22:13:12 +08:00
..
.gitignore crypto: arm64/sha2 - add generated .S files to .gitignore 2016-11-29 16:06:56 +08:00
aes-ce-ccm-core.S crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling 2019-02-01 14:42:05 +08:00
aes-ce-ccm-glue.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
aes-ce-core.S crypto: arm64/aes-ce-cipher - move assembler code to .S file 2017-11-29 17:33:30 +11:00
aes-ce-glue.c crypto: arm64 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
aes-ce-setkey.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aes-ce.S crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR 2019-07-03 22:13:12 +08:00
aes-cipher-core.S crypto: arm64/aes-cipher - move S-box to .rodata section 2018-01-18 23:00:30 +11:00
aes-cipher-glue.c crypto: arm64/aes - add scalar implementation 2017-01-13 00:26:49 +08:00
aes-ctr-fallback.h crypto: arm64/aes-blk - add a non-SIMD fallback for synchronous CTR 2017-08-04 09:27:21 +08:00
aes-glue.c crypto: arm64/cbcmac - handle empty messages in same way as template 2019-04-08 14:42:55 +08:00
aes-modes.S crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR 2019-07-03 22:13:12 +08:00
aes-neon.S crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR 2019-07-03 22:13:12 +08:00
aes-neonbs-core.S crypto: arm64/aes-neonbs - fix returning final keystream block 2019-02-08 15:30:08 +08:00
aes-neonbs-glue.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
chacha-neon-core.S crypto: arm64/chacha - fix hchacha_block_neon() for big endian 2019-02-28 14:37:48 +08:00
chacha-neon-glue.c crypto: chacha - constify ctx and iv arguments 2019-06-13 14:31:40 +08:00
crct10dif-ce-core.S crypto: arm64/crct10dif-ce - cleanup and optimizations 2019-02-08 15:29:48 +08:00
crct10dif-ce-glue.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
ghash-ce-core.S crypto: arm64/ghash-ce - implement 4-way aggregation 2018-08-07 17:51:40 +08:00
ghash-ce-glue.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
Kconfig crypto: arm64/chacha - add XChaCha12 support 2018-12-13 18:24:37 +08:00
Makefile Kbuild updates for v4.21 2018-12-29 12:03:17 -08:00
nh-neon-core.S crypto: arm64/nhpoly1305 - add NEON-accelerated NHPoly1305 2018-12-13 18:24:35 +08:00
nhpoly1305-neon-glue.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
sha1-ce-core.S crypto: arm64/sha1-ce - yield NEON after every block of input 2018-05-12 00:13:05 +08:00
sha1-ce-glue.c crypto: arm64/sha1-ce - correct digest for empty data in finup 2019-06-06 14:38:57 +08:00
sha2-ce-core.S crypto: arm64/sha2-ce - yield NEON after every block of input 2018-05-12 00:13:06 +08:00
sha2-ce-glue.c crypto: arm64/sha2-ce - correct digest for empty data in finup 2019-06-06 14:38:57 +08:00
sha3-ce-core.S crypto: arm64/sha3-ce - yield NEON after every block of input 2018-05-12 00:13:11 +08:00
sha3-ce-glue.c crypto: arm64 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha256-core.S_shipped crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha256-glue.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
sha512-armv8.pl crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha512-ce-core.S crypto: arm64/sha512-ce - yield NEON after every block of input 2018-05-12 00:13:12 +08:00
sha512-ce-glue.c crypto: arm64 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sha512-core.S_shipped crypto: clarify licensing of OpenSSL asm code 2018-05-31 00:13:44 +08:00
sha512-glue.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
sm3-ce-core.S crypto: arm64/sm3 - new v8.2 Crypto Extensions implementation 2018-01-26 01:10:35 +11:00
sm3-ce-glue.c crypto: arm64 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00
sm4-ce-core.S crypto: arm64 - add support for SM4 encryption using special instructions 2018-05-05 14:52:53 +08:00
sm4-ce-glue.c crypto: arm64 - convert to use crypto_simd_usable() 2019-03-22 20:57:27 +08:00