summaryrefslogtreecommitdiffstats
path: root/crypto/s390x_arch.h
diff options
context:
space:
mode:
authorJoerg Schmidbauer <jschmidb@de.ibm.com>2024-02-29 12:50:05 +0100
committerTomas Mraz <tomas@openssl.org>2024-08-29 19:26:06 +0200
commit25f5d7b85f6657cd2f9f1ab7ae87f319d9bafe54 (patch)
tree9a4c6f61f58450dd65a799ae8bfab35c945ea146 /crypto/s390x_arch.h
parentdoc: Document properties param for Argon2 KDF (diff)
downloadopenssl-25f5d7b85f6657cd2f9f1ab7ae87f319d9bafe54.tar.xz
openssl-25f5d7b85f6657cd2f9f1ab7ae87f319d9bafe54.zip
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)
Diffstat (limited to 'crypto/s390x_arch.h')
-rw-r--r--crypto/s390x_arch.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/s390x_arch.h b/crypto/s390x_arch.h
index 857e5b5632..2bb82347ff 100644
--- a/crypto/s390x_arch.h
+++ b/crypto/s390x_arch.h
@@ -191,6 +191,9 @@ extern int OPENSSL_s390xcex;
# define S390X_KMA_LAAD 0x200
# define S390X_KMA_HS 0x400
# define S390X_KDSA_D 0x80
+# define S390X_KIMD_NIP 0x8000
+# define S390X_KLMD_DUFOP 0x4000
+# define S390X_KLMD_NIP 0x8000
# define S390X_KLMD_PS 0x100
# define S390X_KMAC_IKP 0x8000
# define S390X_KMAC_IIMP 0x4000