]> git.ipfire.org Git - thirdparty/openssl.git/commit
s390x: Fix Keccak implementation
authorJuergen Christ <jchrist@linux.ibm.com>
Wed, 13 Jul 2022 13:07:16 +0000 (15:07 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 14 Jul 2022 16:27:26 +0000 (18:27 +0200)
commit086d88a637ecf537af62260e16d4e0011dbb8d1b
tree58c074051df88e34d812f97c180323d43ea2c0ef
parent180c8d7ae56378992b90ace9626d6df6ab1d4de8
s390x: Fix Keccak implementation

s390x does not directly support keccak via CPACF since these instructions
hard-code the padding to either SHA-3 or SHAKE for the "compute last message
digest" function.  This caused test errors on Keccak digests.  Fix it by using
"compute intermediate message digest" and manually computing the padding for
Keccak.

Fixes: a8b238f0e4c1 ("Fix SHA, SHAKE, and KECCAK ASM flag passing")
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18794)
providers/implementations/digests/sha3_prov.c