diff options
Diffstat (limited to 'arch/s390/crypto/sha256_s390.c')
-rw-r--r-- | arch/s390/crypto/sha256_s390.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/s390/crypto/sha256_s390.c b/arch/s390/crypto/sha256_s390.c index c728bd0ae1ed..ccf8633c4f65 100644 --- a/arch/s390/crypto/sha256_s390.c +++ b/arch/s390/crypto/sha256_s390.c | |||
@@ -19,12 +19,10 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/crypto.h> | 21 | #include <linux/crypto.h> |
22 | #include <crypto/sha.h> | ||
22 | 23 | ||
23 | #include "crypt_s390.h" | 24 | #include "crypt_s390.h" |
24 | 25 | ||
25 | #define SHA256_DIGEST_SIZE 32 | ||
26 | #define SHA256_BLOCK_SIZE 64 | ||
27 | |||
28 | struct s390_sha256_ctx { | 26 | struct s390_sha256_ctx { |
29 | u64 count; /* message length */ | 27 | u64 count; /* message length */ |
30 | u32 state[8]; | 28 | u32 state[8]; |
@@ -35,14 +33,14 @@ static void sha256_init(struct crypto_tfm *tfm) | |||
35 | { | 33 | { |
36 | struct s390_sha256_ctx *sctx = crypto_tfm_ctx(tfm); | 34 | struct s390_sha256_ctx *sctx = crypto_tfm_ctx(tfm); |
37 | 35 | ||
38 | sctx->state[0] = 0x6a09e667; | 36 | sctx->state[0] = SHA256_H0; |
39 | sctx->state[1] = 0xbb67ae85; | 37 | sctx->state[1] = SHA256_H1; |
40 | sctx->state[2] = 0x3c6ef372; | 38 | sctx->state[2] = SHA256_H2; |
41 | sctx->state[3] = 0xa54ff53a; | 39 | sctx->state[3] = SHA256_H3; |
42 | sctx->state[4] = 0x510e527f; | 40 | sctx->state[4] = SHA256_H4; |
43 | sctx->state[5] = 0x9b05688c; | 41 | sctx->state[5] = SHA256_H5; |
44 | sctx->state[6] = 0x1f83d9ab; | 42 | sctx->state[6] = SHA256_H6; |
45 | sctx->state[7] = 0x5be0cd19; | 43 | sctx->state[7] = SHA256_H7; |
46 | sctx->count = 0; | 44 | sctx->count = 0; |
47 | } | 45 | } |
48 | 46 | ||