xref: /linux/include/crypto/sha3.h (revision 939a54ac073808db15ed411d563dfadb3ef12798)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Common values for SHA-3 algorithms
4  */
5 #ifndef __CRYPTO_SHA3_H__
6 #define __CRYPTO_SHA3_H__
7 
8 #include <linux/types.h>
9 
10 #define SHA3_224_DIGEST_SIZE	(224 / 8)
11 #define SHA3_224_BLOCK_SIZE	(200 - 2 * SHA3_224_DIGEST_SIZE)
12 
13 #define SHA3_256_DIGEST_SIZE	(256 / 8)
14 #define SHA3_256_BLOCK_SIZE	(200 - 2 * SHA3_256_DIGEST_SIZE)
15 
16 #define SHA3_384_DIGEST_SIZE	(384 / 8)
17 #define SHA3_384_BLOCK_SIZE	(200 - 2 * SHA3_384_DIGEST_SIZE)
18 
19 #define SHA3_512_DIGEST_SIZE	(512 / 8)
20 #define SHA3_512_BLOCK_SIZE	(200 - 2 * SHA3_512_DIGEST_SIZE)
21 
22 #define SHA3_STATE_SIZE		200
23 
24 struct shash_desc;
25 
26 struct sha3_state {
27 	u64		st[SHA3_STATE_SIZE / 8];
28 };
29 
30 int crypto_sha3_init(struct shash_desc *desc);
31 
32 #endif
33