summaryrefslogtreecommitdiff
path: root/cipher/cipher-internal.h
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2016-09-04 13:41:02 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2016-09-05 20:08:48 +0300
commit0b332c1aef03a735c1fb0df184f74d523deb2f98 (patch)
tree2efc348903aa54b6c746e9c72786889eb68bc885 /cipher/cipher-internal.h
parent2d4bbc0ad62c54bbdef77799f9db82d344b7219e (diff)
downloadlibgcrypt-0b332c1aef03a735c1fb0df184f74d523deb2f98.tar.gz
Add ARMv8/AArch64 Crypto Extension implementation of GCM
* cipher/Makefile.am: Add 'cipher-gcm-armv8-aarch64-ce.S'. * cipher/cipher-gcm-armv8-aarch64-ce.S: New. * cipher/cipher-internal.h (GCM_USE_ARM_PMULL): Enable on ARMv8/AArch64. -- Benchmark on Cortex-A53 (1152 Mhz): Before: | nanosecs/byte mebibytes/sec cycles/byte GMAC_AES | 15.54 ns/B 61.36 MiB/s 17.91 c/B After (11.9x faster): | nanosecs/byte mebibytes/sec cycles/byte GMAC_AES | 1.30 ns/B 731.5 MiB/s 1.50 c/B Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/cipher-internal.h')
-rw-r--r--cipher/cipher-internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cipher/cipher-internal.h b/cipher/cipher-internal.h
index 52504f6b..01352f31 100644
--- a/cipher/cipher-internal.h
+++ b/cipher/cipher-internal.h
@@ -79,6 +79,10 @@
&& defined(HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS) \
&& defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
# define GCM_USE_ARM_PMULL 1
+# elif defined(__AARCH64EL__) && \
+ defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) && \
+ defined(HAVE_GCC_INLINE_ASM_AARCH64_CRYPTO)
+# define GCM_USE_ARM_PMULL 1
# endif
#endif /* GCM_USE_ARM_PMULL */