btrfs: fix race between page release and a fast fsync
[linux/fpc-iii.git] / include / crypto / sm3.h
blob1438942dc7737437a0a9104cb14f0de9bb3dd89d
1 /*
2 * Common values for SM3 algorithm
3 */
5 #ifndef _CRYPTO_SM3_H
6 #define _CRYPTO_SM3_H
8 #include <linux/types.h>
10 #define SM3_DIGEST_SIZE 32
11 #define SM3_BLOCK_SIZE 64
13 #define SM3_T1 0x79CC4519
14 #define SM3_T2 0x7A879D8A
16 #define SM3_IVA 0x7380166f
17 #define SM3_IVB 0x4914b2b9
18 #define SM3_IVC 0x172442d7
19 #define SM3_IVD 0xda8a0600
20 #define SM3_IVE 0xa96f30bc
21 #define SM3_IVF 0x163138aa
22 #define SM3_IVG 0xe38dee4d
23 #define SM3_IVH 0xb0fb0e4e
25 extern const u8 sm3_zero_message_hash[SM3_DIGEST_SIZE];
27 struct sm3_state {
28 u32 state[SM3_DIGEST_SIZE / 4];
29 u64 count;
30 u8 buffer[SM3_BLOCK_SIZE];
33 struct shash_desc;
35 extern int crypto_sm3_update(struct shash_desc *desc, const u8 *data,
36 unsigned int len);
38 extern int crypto_sm3_finup(struct shash_desc *desc, const u8 *data,
39 unsigned int len, u8 *hash);
40 #endif