]> git.ipfire.org Git - thirdparty/openssl.git/commit
s390x: Fix AES-XTS hardware acceleration in IBM z17
authorIngo Franzki <ifranzki@linux.ibm.com>
Mon, 29 Jun 2026 11:04:32 +0000 (13:04 +0200)
committerNorbert Pocs <norbertp@openssl.org>
Wed, 1 Jul 2026 09:12:22 +0000 (11:12 +0200)
commite9351bcce65c642b130cdf875fd0e64e8637d737
tree09f2c44206d04a5359f546133e6fb1e5cdf5a2af
parent1be08a77911e039959c74be7ab4eecc63b5ae76d
s390x: Fix AES-XTS hardware acceleration in IBM z17

For the re-init case where only the IV is specified, but no key, the 'nap'
field must also be initialized.

Instead of setting the s390 specific fields in a special case block, call
ctx->hw->init() also in this case. It performs the necessary setup already
(when the KM function code was once set already).

Adjust the cipher_hw_aes_xts_s390x_initkey() function so that it can also
be called with a NULL key. It then only performs the IV setup as well as
setting up the 'nap'.

Closes: https://github.com/openssl/openssl/issues/31766
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Milan Broz <mbroz@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Jul  1 09:12:26 2026
(Merged from https://github.com/openssl/openssl/pull/31775)
providers/implementations/ciphers/cipher_aes_hw_s390x.c
providers/implementations/ciphers/cipher_aes_xts.c