mbox series

[v1,0/3] New s390 specific protected key hmac

Message ID 20241030162235.363533-1-freude@linux.ibm.com (mailing list archive)
Headers show
Series New s390 specific protected key hmac | expand

Message

Harald Freudenberger Oct. 30, 2024, 4:22 p.m. UTC
Add support for protected key hmac ("phmac") for s390 arch.

With the latest machine generation there is now support for
protected key (that is a key wrapped by a master key stored
in firmware) hmac for sha2 (sha224, sha256, sha384 and sha512)
for the s390 specific CPACF instruction kmac.

This patch adds support via 4 new shashes registered as
phmac(sha224), phmac(sha256), phmac(sha384) and phmac(sha512).

Please note that as of now, there is no selftest enabled for
these shashes, but the implementation has been tested with
testcases via AF_ALG interface. However, there may come an
improvement soon to use the available clear key hmac selftests.

Please note that v1 does not apply to the current crypto-2.6
or linux-next kernel trees: For crypto-2.6 there is a hmac
patch in the pipe and for linux-next there is a collision with
the s390/configs/*defconfig. However, the hmac code itself
is ready for a review cycle.

Holger Dengler (3):
  crypto: api - Adjust HASH_MAX_DESCSIZE for phmac context on s390
  s390/crypto: Add protected key hmac subfunctions for KMAC
  s390/crypto: New s390 specific shash phmac

 arch/s390/configs/debug_defconfig |   1 +
 arch/s390/configs/defconfig       |   1 +
 arch/s390/crypto/Makefile         |   1 +
 arch/s390/crypto/phmac_s390.c     | 484 ++++++++++++++++++++++++++++++
 arch/s390/include/asm/cpacf.h     |  20 +-
 drivers/crypto/Kconfig            |  12 +
 include/crypto/hash.h             |   7 +
 7 files changed, 518 insertions(+), 8 deletions(-)
 create mode 100644 arch/s390/crypto/phmac_s390.c

--
2.43.0