hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/s390/crypto/sha.h
....@@ -12,15 +12,17 @@
1212
1313 #include <linux/crypto.h>
1414 #include <crypto/sha.h>
15
+#include <crypto/sha3.h>
1516
1617 /* must be big enough for the largest SHA variant */
17
-#define SHA_MAX_STATE_SIZE (SHA512_DIGEST_SIZE / 4)
18
-#define SHA_MAX_BLOCK_SIZE SHA512_BLOCK_SIZE
18
+#define SHA3_STATE_SIZE 200
19
+#define CPACF_MAX_PARMBLOCK_SIZE SHA3_STATE_SIZE
20
+#define SHA_MAX_BLOCK_SIZE SHA3_224_BLOCK_SIZE
1921
2022 struct s390_sha_ctx {
21
- u64 count; /* message length in bytes */
22
- u32 state[SHA_MAX_STATE_SIZE];
23
- u8 buf[2 * SHA_MAX_BLOCK_SIZE];
23
+ u64 count; /* message length in bytes */
24
+ u32 state[CPACF_MAX_PARMBLOCK_SIZE / sizeof(u32)];
25
+ u8 buf[SHA_MAX_BLOCK_SIZE];
2426 int func; /* KIMD function to use */
2527 };
2628