S390x: Support ME and CRT offloading
authorJuergen Christ <jchrist@linux.ibm.com>
Fri, 20 Jan 2023 16:43:59 +0000 (17:43 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 8 Feb 2023 15:53:12 +0000 (16:53 +0100)
commit79040cf29e011c21789563d74da626b7465a0540
treecf4db184af2d8fba461a64994a27635c41d1d51a
parentabf654645dee168b229f3fa6a365f6a8e4dd7c31
S390x: Support ME and CRT offloading

S390x has to ability to offload modular exponentiation and CRT operations to
Crypto Express Adapters.  This possible performance optimization was not yet
used by OpenSSL.  Add support for offloading and implement an optimized
version of RSA and DH with it.

The environment variable OPENSSL_s390xcap now recognizes the token "nocex" to
prevent offloading.

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20113)
crypto/bn/bn_s390x.c [new file with mode: 0644]
crypto/bn/build.info
crypto/dh/dh_key.c
crypto/rsa/rsa_ossl.c
crypto/s390x_arch.h
crypto/s390xcap.c
doc/man3/OPENSSL_s390xcap.pod
include/crypto/bn.h