Hi!
This series introduces a mechanism to support arch specific, combined AES+GCM
{en,de}cryption functions. These functions are stubbed by default and will
fall-back to the separate hash and crypt functions if no arch override exists.
The arch override can be provided either at build time via appropriate config
options or using the FAT runtime mechanism.
An implementation combining AES+GCM _can potentially_ yield significant
performance boosts by allowing for increased instruction parallelism, avoiding
C-function call overhead, more flexibility in assembly fine-tuning, etc. This
series provides such an implementation based on the existing optimized Nettle
routines for POWER9 and later processors. Benchmark results on a POWER9
Blackbird running at 3.5GHz are given at the end of this mail. Both builds were
configured statically ie. not FAT. FAT performance is slightly lower for both
but shows similar gains with this series. The OpenSSL build is based on latest
OpenSSL master with all PowerPC optimizations enabled.
Note that the gains on an early POWER10 system are even more impressive but
unfortunately I cannot share those results publically yet :(
AES+GCM combined (this series)
------------------------------
Algorithm mode Mbyte/s
gcm_aes128 encrypt 2567.62
gcm_aes128 decrypt 2582.32
gcm_aes128 update 7724.15
gcm_aes192 encrypt 2279.39
gcm_aes192 decrypt 2293.20
gcm_aes192 update 7724.41
gcm_aes256 encrypt 2054.09
gcm_aes256 decrypt 2061.25
gcm_aes256 update 7724.04
openssl gcm_aes128 encrypt 2336.93
openssl gcm_aes128 decrypt 2337.95
openssl gcm_aes128 update 6248.22
openssl gcm_aes192 encrypt 2113.93
openssl gcm_aes192 decrypt 2114.93
openssl gcm_aes192 update 6210.65
openssl gcm_aes256 encrypt 1936.95
openssl gcm_aes256 decrypt 1935.88
openssl gcm_aes256 update 6208.72
AES,GCM separate (nettle master)
--------------------------------
Algorithm mode Mbyte/s
gcm_aes128 encrypt 1418.66
gcm_aes128 decrypt 1418.97
gcm_aes128 update 7766.31
gcm_aes192 encrypt 1314.03
gcm_aes192 decrypt 1313.17
gcm_aes192 update 7760.23
gcm_aes256 encrypt 1218.75
gcm_aes256 decrypt 1218.64
gcm_aes256 update 7760.52
openssl gcm_aes128 encrypt 2324.70
openssl gcm_aes128 decrypt 2317.19
openssl gcm_aes128 update 6152.77
openssl gcm_aes192 encrypt 2102.99
openssl gcm_aes192 decrypt 2098.98
openssl gcm_aes192 update 6175.62
openssl gcm_aes256 encrypt 1925.85
openssl gcm_aes256 decrypt 1922.49
openssl gcm_aes256 update 6204.55
Christopher M. Riedl (6):
gcm: Introduce gcm_aes_{de,en}crypt()
ppc: Fix variable name for --enable-power-altivec
ppc: Add FAT feature and config option for ISA 3.0
ppc: Add gcm_aes_encrypt() asm for ISA 3.0 (P9)
ppc: Add gcm_aes_decrypt() asm for ISA 3.0 (P9)
ppc: Enable gcm_aes_{de,en}crypt() FAT
configure.ac | 19 +-
fat-ppc.c | 45 ++
fat-setup.h | 6 +
gcm-internal.h | 14 +
gcm.c | 151 ++++++-
powerpc64/fat/gcm-aes-decrypt.asm | 37 ++
powerpc64/fat/gcm-aes-encrypt.asm | 37 ++
powerpc64/p9/gcm-aes-decrypt.asm | 663 +++++++++++++++++++++++++++++
powerpc64/p9/gcm-aes-encrypt.asm | 666 ++++++++++++++++++++++++++++++
9 files changed, 1630 insertions(+), 8 deletions(-)
create mode 100644 powerpc64/fat/gcm-aes-decrypt.asm
create mode 100644 powerpc64/fat/gcm-aes-encrypt.asm
create mode 100644 powerpc64/p9/gcm-aes-decrypt.asm
create mode 100644 powerpc64/p9/gcm-aes-encrypt.asm
--
2.26.1