Home GnuPG

Add ARMv8/AArch32 Crypto Extension implementation of SHA-1
3d6334f8d94cUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add ARMv8/AArch32 Crypto Extension implementation of SHA-1

* cipher/Makefile.am: Add 'sha1-armv8-aarch32-ce.S'.
* cipher/sha1-armv7-neon.S (_gcry_sha1_transform_armv7_neon): Add
missing size.
* cipher/sha1-armv8-aarch32-ce.S: New.
* cipher/sha1.c (USE_ARM_CE): New.
(sha1_init): Check features for HWF_ARM_SHA1.
[USE_ARM_CE] (_gcry_sha1_transform_armv8_ce): New.
(transform) [USE_ARM_CE]: Use ARMv8 CE implementation if HW supports
it.
* cipher/sha1.h (SHA1_CONTEXT): Add 'use_arm_ce'.
* configure.ac: Add 'sha1-armv8-aarch32-ce.lo'.

Benchmark on Cortex-A53 (1152 Mhz):

Before (SHA-1 NEON):

               |  nanosecs/byte   mebibytes/sec   cycles/byte
SHA1           |      6.62 ns/B     144.2 MiB/s      7.62 c/B

After (~3.8x faster):

               |  nanosecs/byte   mebibytes/sec   cycles/byte
SHA1           |      1.73 ns/B     552.2 MiB/s      1.99 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jul 14 2016, 4:55 PM
Parents
rCeee78f6e1fbc: Add HW feature check for ARMv8 AArch64 and crypto extensions
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rC3d6334f8d94c: Add ARMv8/AArch32 Crypto Extension implementation of SHA-1 (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Jul 14 2016, 4:55 PM