Home GnuPG

Add ARMv8/AArch32 Crypto Extension implemenation of SHA-256
34c64eb03178Unpublished

Unpublished Commit ยท Learn More

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

Description

Add ARMv8/AArch32 Crypto Extension implemenation of SHA-256

* cipher/Makefile.am: Add 'sha256-armv8-aarch32-ce.S'.
* cipher/sha256-armv8-aarch32-ce.S: New.
* cipher/sha256.c (USE_ARM_CE): New.
(sha256_init, sha224_init): Check features for HWF_ARM_SHA1.
[USE_ARM_CE] (_gcry_sha256_transform_armv8_ce): New.
(transform) [USE_ARM_CE]: Use ARMv8 CE implementation if HW supports.
(SHA256_CONTEXT): Add 'use_arm_ce'.
* configure.ac: Add 'sha256-armv8-aarch32-ce.lo'.

Benchmark on Cortex-A53 (1152 Mhz):

Before:

               |  nanosecs/byte   mebibytes/sec   cycles/byte
SHA256         |     17.38 ns/B     54.88 MiB/s     20.02 c/B

After (~9.3x faster):

               |  nanosecs/byte   mebibytes/sec   cycles/byte
SHA256         |      1.85 ns/B     515.7 MiB/s      2.13 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jul 14 2016, 4:55 PM
Parents
rC3d6334f8d94c: Add ARMv8/AArch32 Crypto Extension implementation of SHA-1
Branches
Unknown
Tags
Unknown

Event Timeline

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