.. | .. |
---|
50 | 50 | struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); |
---|
51 | 51 | int rk_digest_size = crypto_ahash_digestsize(tfm); |
---|
52 | 52 | |
---|
| 53 | + const u8 sha256_zero_msg_hash[SHA256_DIGEST_SIZE] = { |
---|
| 54 | + 0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, |
---|
| 55 | + 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, |
---|
| 56 | + 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, |
---|
| 57 | + 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55 |
---|
| 58 | + }; |
---|
| 59 | + |
---|
| 60 | + const u8 sha1_zero_msg_hash[SHA1_DIGEST_SIZE] = { |
---|
| 61 | + 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, |
---|
| 62 | + 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, |
---|
| 63 | + 0xaf, 0xd8, 0x07, 0x09 |
---|
| 64 | + }; |
---|
| 65 | + |
---|
| 66 | + const u8 md5_zero_msg_hash[MD5_DIGEST_SIZE] = { |
---|
| 67 | + 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, |
---|
| 68 | + 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e, |
---|
| 69 | + }; |
---|
| 70 | + |
---|
53 | 71 | switch (rk_digest_size) { |
---|
54 | 72 | case SHA1_DIGEST_SIZE: |
---|
55 | | - memcpy(req->result, sha1_zero_message_hash, rk_digest_size); |
---|
| 73 | + memcpy(req->result, sha1_zero_msg_hash, rk_digest_size); |
---|
56 | 74 | break; |
---|
57 | 75 | case SHA256_DIGEST_SIZE: |
---|
58 | | - memcpy(req->result, sha256_zero_message_hash, rk_digest_size); |
---|
| 76 | + memcpy(req->result, sha256_zero_msg_hash, rk_digest_size); |
---|
59 | 77 | break; |
---|
60 | 78 | case MD5_DIGEST_SIZE: |
---|
61 | | - memcpy(req->result, md5_zero_message_hash, rk_digest_size); |
---|
| 79 | + memcpy(req->result, md5_zero_msg_hash, rk_digest_size); |
---|
62 | 80 | break; |
---|
63 | 81 | default: |
---|
64 | 82 | return -EINVAL; |
---|