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>