summaryrefslogtreecommitdiff
path: root/include/crypto/sha.h
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2018-05-29 14:13:45 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-06-22 23:03:02 +0800
commit30c217ef6411d24b8c8b0478b89335dc2dabe6e8 (patch)
tree7505b9dc1f4f7d4a05d221d61c640879b46d1614 /include/crypto/sha.h
parent25bc95510317dc7259299adb786f050617199b42 (diff)
crypto: sha512_generic - add a sha512 0-length pre-computed hash
This patch adds the sha512 pre-computed 0-length hash so that device drivers can use it when an hardware engine does not support computing a hash from a 0 length input. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/sha.h')
-rw-r--r--include/crypto/sha.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/sha.h b/include/crypto/sha.h
index 0555b571dd34..799f071b93df 100644
--- a/include/crypto/sha.h
+++ b/include/crypto/sha.h
@@ -71,6 +71,8 @@ extern const u8 sha224_zero_message_hash[SHA224_DIGEST_SIZE];
extern const u8 sha256_zero_message_hash[SHA256_DIGEST_SIZE];
+extern const u8 sha512_zero_message_hash[SHA512_DIGEST_SIZE];
+
struct sha1_state {
u32 state[SHA1_DIGEST_SIZE / 4];
u64 count;