Home GnuPG

Add ARMv7/NEON accelerated GCM implementation

Description

Add ARMv7/NEON accelerated GCM implementation

* cipher/Makefile.am: Add 'cipher-gcm-armv7-neon.S'.
* cipher/cipher-gcm-armv7-neon.S: New.
* cipher/cipher-gcm.c [GCM_USE_ARM_NEON] (_gcry_ghash_setup_armv7_neon)
(_gcry_ghash_armv7_neon, ghash_setup_armv7_neon)
(ghash_armv7_neon): New.
(setupM) [GCM_USE_ARM_NEON]: Use armv7/neon implementation if have
HWF_ARM_NEON.
* cipher/cipher-internal.h (GCM_USE_ARM_NEON): New.

Benchmark on Cortex-A53 (816 Mhz):

Before:

|  nanosecs/byte   mebibytes/sec   cycles/byte

GMAC_AES | 34.81 ns/B 27.40 MiB/s 28.41 c/B

After (3.0x faster):

|  nanosecs/byte   mebibytes/sec   cycles/byte

GMAC_AES | 11.49 ns/B 82.99 MiB/s 9.38 c/B

  • Reported-by: Yuriy M. Kaminskiy <yumkam@gmail.com>
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Mar 23 2019, 3:15 PM
Parents
rC6f2391d2df02: Use memset instead of setting buffers byte by byte
Branches
Unknown
Tags
Unknown