Optimize AES-GCM for uarchs with unroll and new instructions
authorXiaokangQian <xiaokang.qian@arm.com>
Wed, 9 Jun 2021 06:35:46 +0000 (06:35 +0000)
committerPauli <pauli@openssl.org>
Tue, 25 Jan 2022 03:30:00 +0000 (14:30 +1100)
commit954f45ba4c504570206ff5bed811e512cf92dc8e
tree6d2521f79615afd4c8b35cb2c6794a57aded5602
parent44a563dde1584cd9284e80b6e45ee5019be8d36c
Optimize AES-GCM for uarchs with unroll and new instructions

Increase the block numbers to 8 for every iteration.  Increase the hash
table capacity.  Make use of EOR3 instruction to improve the performance.

This can improve performance 25-40% on out-of-order microarchitectures
with a large number of fast execution units, such as Neoverse V1.  We also
see 20-30% performance improvements on other architectures such as the M1.

Assembly code reviewd by Tom Cosgrove (ARM).

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15916)
crypto/arm64cpuid.pl
crypto/arm_arch.h
crypto/armcap.c
crypto/modes/asm/aes-gcm-armv8-unroll8_64.pl [new file with mode: 0644]
crypto/modes/asm/ghashv8-armx.pl
crypto/modes/build.info
include/crypto/aes_platform.h
providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc