]> git.ipfire.org Git - thirdparty/openssl.git/commit
s390x: support CPACF sha3/shake performance improvements
authorJoerg Schmidbauer <jschmidb@de.ibm.com>
Thu, 29 Feb 2024 11:50:05 +0000 (12:50 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 29 Aug 2024 17:26:06 +0000 (19:26 +0200)
commit25f5d7b85f6657cd2f9f1ab7ae87f319d9bafe54
tree9a4c6f61f58450dd65a799ae8bfab35c945ea146
parent6772c2ab1bc5f12dd800247cd6800c45c2c0bf6e
s390x: support CPACF sha3/shake performance improvements

On newer machines the SHA3/SHAKE performance of CPACF instructions KIMD and KLMD
can be enhanced by using additional modifier bits. This allows the application
to omit initializing the ICV, but also affects the internal processing of the
instructions. Performance is mostly gained when processing short messages.

The new CPACF feature is backwards compatible with older machines, i.e. the new
modifier bits are ignored on older machines. However, to save the ICV
initialization, the application must detect the MSA level and omit the ICV
initialization only if this feature is supported.

Signed-off-by: Joerg Schmidbauer <jschmidb@de.ibm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25235)
crypto/s390x_arch.h
crypto/s390xcpuid.pl
crypto/sha/sha3.c
providers/implementations/digests/sha3_prov.c