linux/arch/arm64/crypto
Ard Biesheuvel 537c1445ab crypto: arm64/gcm - implement native driver using v8 Crypto Extensions
Currently, the AES-GCM implementation for arm64 systems that support the
ARMv8 Crypto Extensions is based on the generic GCM module, which combines
the AES-CTR implementation using AES instructions with the PMULL based
GHASH driver. This is suboptimal, given the fact that the input data needs
to be loaded twice, once for the encryption and again for the MAC
calculation.

On Cortex-A57 (r1p2) and other recent cores that implement micro-op fusing
for the AES instructions, AES executes at less than 1 cycle per byte, which
means that any cycles wasted on loading the data twice hurt even more.

So implement a new GCM driver that combines the AES and PMULL instructions
at the block level. This improves performance on Cortex-A57 by ~37% (from
3.5 cpb to 2.6 cpb)

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-08-04 09:27:23 +08:00
..
.gitignore crypto: arm64/sha2 - add generated .S files to .gitignore 2016-11-29 16:06:56 +08:00
Kconfig crypto: arm64/gcm - implement native driver using v8 Crypto Extensions 2017-08-04 09:27:23 +08:00
Makefile crypto: arm64/crc32 - merge CRC32 and PMULL instruction based drivers 2017-02-11 17:50:38 +08:00
aes-ce-ccm-core.S crypto: arm64/aes-ce-cipher - match round key endianness with generic code 2017-08-04 09:27:19 +08:00
aes-ce-ccm-glue.c crypto: arm64/aes-ce-ccm: add non-SIMD generic fallback 2017-08-04 09:27:21 +08:00
aes-ce-cipher.c crypto: arm64/aes-ce-cipher: add non-SIMD generic fallback 2017-08-04 09:27:20 +08:00
aes-ce-setkey.h arm64/crypto: use crypto instructions to generate AES key schedule 2014-11-06 17:25:28 +00:00
aes-ce.S crypto: arm64/aes-ce-cipher - match round key endianness with generic code 2017-08-04 09:27:19 +08:00
aes-cipher-core.S crypto: arm64/aes - performance tweak 2017-02-03 18:16:20 +08: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/aes-blk - add a non-SIMD fallback for synchronous CTR 2017-08-04 09:27:21 +08:00
aes-modes.S crypto: arm64/aes - add NEON/Crypto Extensions CBCMAC/CMAC/XCBC driver 2017-02-11 17:50:45 +08:00
aes-neon.S crypto: arm64/aes-neon-blk - tweak performance for low end cores 2017-02-03 18:16:20 +08:00
aes-neonbs-core.S crypto: arm64/aes - don't use IV buffer to return final keystream block 2017-02-03 18:16:20 +08:00
aes-neonbs-glue.c crypto: arm64/aes-bs - implement non-SIMD fallback for AES-CTR 2017-08-04 09:27:22 +08:00
chacha20-neon-core.S crypto: arm64/chacha20 - implement NEON version based on SSE3 code 2017-01-13 00:26:48 +08:00
chacha20-neon-glue.c crypto: arm64/chacha20 - take may_use_simd() into account 2017-08-04 09:27:22 +08:00
crc32-ce-core.S crypto: arm64/crc32 - accelerated support based on x86 SSE implementation 2016-12-07 20:01:22 +08:00
crc32-ce-glue.c crypto: arm64/crc32 - add non-SIMD scalar fallback 2017-08-04 09:27:17 +08:00
crct10dif-ce-core.S crypto: arm64/crct10dif - port x86 SSE implementation to arm64 2016-12-07 20:01:17 +08:00
crct10dif-ce-glue.c crypto: arm64/crct10dif - add non-SIMD generic fallback 2017-08-04 09:27:16 +08:00
ghash-ce-core.S crypto: arm64/gcm - implement native driver using v8 Crypto Extensions 2017-08-04 09:27:23 +08:00
ghash-ce-glue.c crypto: arm64/gcm - implement native driver using v8 Crypto Extensions 2017-08-04 09:27:23 +08:00
sha1-ce-core.S crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
sha1-ce-glue.c crypto: arm64/sha1-ce - add non-SIMD generic fallback 2017-08-04 09:27:18 +08:00
sha2-ce-core.S crypto: arm64/sha - avoid non-standard inline asm tricks 2017-05-18 13:19:52 +08:00
sha2-ce-glue.c crypto: arm64/sha2-ce - add non-SIMD scalar fallback 2017-08-04 09:27:19 +08:00
sha256-core.S_shipped crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00
sha256-glue.c crypto: arm64/sha2-ce - add non-SIMD scalar fallback 2017-08-04 09:27:19 +08:00
sha512-armv8.pl crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00
sha512-core.S_shipped crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00
sha512-glue.c crypto: arm64/sha2 - integrate OpenSSL implementations of SHA256/SHA512 2016-11-28 19:58:05 +08:00