Home GnuPG

Add ARMv8-CE HW acceleration for GCM-SIV counter mode

Description

Add ARMv8-CE HW acceleration for GCM-SIV counter mode

* cipher/rijndael-armv8-aarch32-ce.S
(_gcry_aes_ctr32le_enc_armv8_ce): New.
* cipher/rijndael-armv8-aarch64-ce.S
(_gcry_aes_ctr32le_enc_armv8_ce): New.
* cipher/rijndael-armv8-ce.c
(_gcry_aes_ctr32le_enc_armv8_ce)
(_gcry_aes_armv8_ce_ctr32le_enc): New.
* cipher/rijndael.c
(_gcry_aes_armv8_ce_ctr32le_enc): New prototype.
(do_setkey): Add setup of 'bulk_ops->ctr32le_enc' for ARMv8-CE.

Benchmark on Cortex-A53 (aarch64):

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

 GCM-SIV enc |     11.77 ns/B     81.03 MiB/s      7.63 c/B     647.9
 GCM-SIV dec |     11.92 ns/B     79.98 MiB/s      7.73 c/B     647.9
GCM-SIV auth |      2.99 ns/B     318.9 MiB/s      1.94 c/B     648.0

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

 GCM-SIV enc |      4.66 ns/B     204.5 MiB/s      3.02 c/B     647.9
 GCM-SIV dec |      4.82 ns/B     198.0 MiB/s      3.12 c/B     647.9
GCM-SIV auth |      3.00 ns/B     318.4 MiB/s      1.94 c/B     648.0
  • GnuPG-bug-id: T4485
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Aug 13 2021, 3:50 PM
Parents
rC33aebb30d210: Add x86 HW acceleration for GCM-SIV counter mode
Branches
Unknown
Tags
Unknown
Tasks
T4485: Add AEAD mode AES-GCM-SIV to libgcrypt (RFC 8452)