Home GnuPG

rijndael-vaes-avx2-amd64: acceleration for OCB auth

Description

rijndael-vaes-avx2-amd64: acceleration for OCB auth

* cipher/rijndael-vaes-avx2-amd64.S
(_gcry_vaes_avx2_ocb_crypt_amd64): Add authentication mode support.
* cipher/rijndael-vaes.c (_gcry_vaes_avx2_ocb_crypt_amd64): Change
to return 'size_t' value.
(_gcry_aes_vaes_ocb_auth): New.
* cipher/rijndael.c (_gcry_aes_vaes_ocb_auth): New.
(do_setkey) [USE_VAES]: Add setup for 'bulk_ops->ocb_auth'.

Benchmark on AMD Ryzen 9 7900X (zen4):

Before:

AES | nanosecs/byte mebibytes/sec cycles/byte auto Mhz

OCB auth |     0.071 ns/B     13470 MiB/s     0.333 c/B      4700

After (~2.0x faster):
AES | nanosecs/byte mebibytes/sec cycles/byte auto Mhz

OCB auth |     0.034 ns/B     27946 MiB/s     0.160 c/B      4700
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jul 9 2023, 9:02 PM
Parents
rC77ce5866e06c: build: Fix the notice in configure.ac.
Branches
Unknown
Tags
Unknown