Add SM3 ARM/AArch64 assembly implementation
* cipher/Makefile.am: Add 'sm3-aarch64.S'. * cipher/sm3-aarch64.S: New. * cipher/sm3.c (USE_AARCH64_SIMD): New. [USE_AARCH64_SIMD] (_gcry_sm3_transform_aarch64) (do_sm3_transform_aarch64): New. (sm3_init) [USE_AARCH64_SIMD]: New. * configure.ac: Add 'sm3-aarch64.lo'. * tests/basic.c (main): Add command-line option '--hash' for running only hash algorithm tests.
Benchmark on AWS Graviton2:
Before:
| nanosecs/byte mebibytes/sec cycles/byte auto Mhz
SM3 | 4.24 ns/B 224.8 MiB/s 10.61 c/B 2500
After (~34% faster):
| nanosecs/byte mebibytes/sec cycles/byte auto Mhz
SM3 | 3.15 ns/B 302.4 MiB/s 7.88 c/B 2500
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>