Home GnuPG

Add s390x/zSeries acceleration for SHA512

Description

Add s390x/zSeries acceleration for SHA512

* cipher/sha512.c (USE_S390X_CRYPTO): New.
(SHA512_CONTEXT) [USE_S390X_CRYPTO]: New members.
(do_sha512_transform_s390x, do_sha512_final_s390x): New.
(sha512_init_common) [USE_S390X_CRYPTO]: Detect and setup s390x/zSeries
acceleration.
(sha512_final) [USE_S390X_CRYPTO]: Use accelerated final function.

Benchmark (z15, 5.2Ghz):

Before:

|  nanosecs/byte   mebibytes/sec   cycles/byte

SHA512 | 3.37 ns/B 282.8 MiB/s 17.53 c/B

After:

|  nanosecs/byte   mebibytes/sec   cycles/byte

SHA512 | 0.261 ns/B 3648 MiB/s 1.36 c/B

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 7 2020, 11:11 AM
Parents
rC0b555c3cc7c2: Add s390x/zSeries acceleration for SHA256
Branches
Unknown
Tags
Unknown