Add ARMv8/AArch64 Crypto Extension implementation of SHA-256
* cipher/Makefile.am: Add 'sha256-armv8-aarch64-ce.S'. * cipher/sha256-armv8-aarch64-ce.S: New. * cipher/sha256-armv8-aarch32-ce.S: Move round macros to correct section. * cipher/sha256.c (USE_ARM_CE): Enable on ARMv8/AArch64. * configure.ac: Add 'sha256-armv8-aarch64-ce.lo'; Swap places for 'sha512-arm.lo' and 'sha256-armv8-aarch32-ce.lo'.
Benchmark on Cortex-A53 (1152 Mhz):
Before:
| nanosecs/byte mebibytes/sec cycles/byte
SHA256 | 13.34 ns/B 71.51 MiB/s 15.36 c/B
After (7.2x faster):
| nanosecs/byte mebibytes/sec cycles/byte
SHA256 | 1.85 ns/B 516.3 MiB/s 2.13 c/B
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>