diff mbox series

[v1,2/3] s390/crypto: Add protected key hmac subfunctions for KMAC

Message ID 20241030162235.363533-3-freude@linux.ibm.com
State New
Headers show
Series New s390 specific protected key hmac | expand

Commit Message

Harald Freudenberger Oct. 30, 2024, 4:22 p.m. UTC
From: Holger Dengler <dengler@linux.ibm.com>

The CPACF KMAC instruction supports new subfunctions for
protected key hmac. Add defines for these 4 new subfuctions.

Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
---
 arch/s390/include/asm/cpacf.h | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h
index 1d3a4b0c650f..5fcde9a7bc07 100644
--- a/arch/s390/include/asm/cpacf.h
+++ b/arch/s390/include/asm/cpacf.h
@@ -119,14 +119,18 @@ 
  * function codes for the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE)
  * instruction
  */
-#define CPACF_KMAC_QUERY	0x00
-#define CPACF_KMAC_DEA		0x01
-#define CPACF_KMAC_TDEA_128	0x02
-#define CPACF_KMAC_TDEA_192	0x03
-#define CPACF_KMAC_HMAC_SHA_224	0x70
-#define CPACF_KMAC_HMAC_SHA_256	0x71
-#define CPACF_KMAC_HMAC_SHA_384	0x72
-#define CPACF_KMAC_HMAC_SHA_512	0x73
+#define CPACF_KMAC_QUERY		0x00
+#define CPACF_KMAC_DEA			0x01
+#define CPACF_KMAC_TDEA_128		0x02
+#define CPACF_KMAC_TDEA_192		0x03
+#define CPACF_KMAC_HMAC_SHA_224		0x70
+#define CPACF_KMAC_HMAC_SHA_256		0x71
+#define CPACF_KMAC_HMAC_SHA_384		0x72
+#define CPACF_KMAC_HMAC_SHA_512		0x73
+#define CPACF_KMAC_PHMAC_SHA_224	0x78
+#define CPACF_KMAC_PHMAC_SHA_256	0x79
+#define CPACF_KMAC_PHMAC_SHA_384	0x7a
+#define CPACF_KMAC_PHMAC_SHA_512	0x7b
 
 /*
  * Function codes for the PCKMO (PERFORM CRYPTOGRAPHIC KEY MANAGEMENT)