Add s390x/zSeries acceleration for SHA256
* cipher/sha256.c (USE_S390X_CRYPTO): New. (SHA256_CONTEXT) [USE_S390X_CRYPTO]: New members. (do_sha256_transform_s390x, do_sha256_final_s390x): New. (sha256_common_init) [USE_S390X_CRYPTO]: Detect and setup s390x/zSeries acceleration. (sha256_final) [USE_S390X_CRYPTO]: Use accelerated final function.
Benchmark (z15, 5.2Ghz):
Before:
| nanosecs/byte mebibytes/sec cycles/byte
SHA256 | 3.75 ns/B 254.5 MiB/s 19.48 c/B
After:
| nanosecs/byte mebibytes/sec cycles/byte
SHA256 | 0.422 ns/B 2257 MiB/s 2.20 c/B
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>