]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: s390/sha3 - Use cpu byte-order when exporting
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 May 2025 12:28:56 +0000 (20:28 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jun 2025 09:26:16 +0000 (17:26 +0800)
commit73c2437109c3eab274258a6430ae5dafac1ef43e
treec50e0207d28c376a914796741f79fa8b3225f78c
parent1b39bc4a703a63a22c08232015540adfb31f22ba
crypto: s390/sha3 - Use cpu byte-order when exporting

The sha3 partial hash on s390 is in little-endian just like the
final hash.  However the generic implementation produces native
or big-endian partial hashes.

Make s390 sha3 conform to that by doing the byte-swap on export
and import.

Reported-by: Ingo Franzki <ifranzki@linux.ibm.com>
Fixes: 6f90ba706551 ("crypto: s390/sha3 - Use API partial block handling")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/s390/crypto/sha.h
arch/s390/crypto/sha3_256_s390.c
arch/s390/crypto/sha3_512_s390.c