Home GnuPG

aes-ppc: add ECB bulk acceleration for benchmarking purposes

Description

aes-ppc: add ECB bulk acceleration for benchmarking purposes

* cipher/rijndael-ppc-functions.h (ECB_CRYPT_FUNC): New.
* cipher/rijndael-ppc.c (_gcry_aes_ppc8_ecb_crypt): New.
* cipher/rijndael-ppc9le.c (_gcry_aes_ppc9le_ecb_crypt): New.
* cipher/rijndael.c (_gcry_aes_ppc8_ecb_crypt)
(_gcry_aes_ppc9le_ecb_crypt): New.
(do_setkey): Set up _gcry_aes_ppc8_ecb_crypt for POWER8 and
_gcry_aes_ppc9le_ecb_crypt for POWER9.

Benchmark on POWER9:

Before:
AES | nanosecs/byte mebibytes/sec cycles/byte

ECB enc |     0.875 ns/B      1090 MiB/s      2.01 c/B
ECB dec |      1.06 ns/B     899.8 MiB/s      2.44 c/B

After:
AES | nanosecs/byte mebibytes/sec cycles/byte

ECB enc |     0.305 ns/B      3126 MiB/s     0.702 c/B
ECB dec |     0.305 ns/B      3126 MiB/s     0.702 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Feb 26 2023, 11:13 AM
Parents
rC161614ecc1c2: sha2-ppc: better optimization for POWER9
Branches
Unknown
Tags
Unknown