aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/crypto/sha512-mb/sha512_mb_ctx.h
diff options
context:
space:
mode:
authorGreg Tucker <greg.b.tucker@intel.com>2016-11-14 16:11:44 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-17 23:35:00 +0800
commit7a0b86b1b964d31604eb216a5648906b38470bba (patch)
treed7a59bb859af973ff732205aaa600f314e3e1028 /arch/x86/crypto/sha512-mb/sha512_mb_ctx.h
parentcrypto: gf128mul - Zero memory when freeing multiplication table (diff)
downloadwireguard-linux-7a0b86b1b964d31604eb216a5648906b38470bba.tar.xz
wireguard-linux-7a0b86b1b964d31604eb216a5648906b38470bba.zip
crypto: sha-mb - Fix total_len for correct hash when larger than 512MB
Current multi-buffer hash implementations have a restriction on the total length of a hash job to 512MB. Hashing larger buffers will result in an incorrect hash. This extends the limit to 2^62 - 1. Signed-off-by: Greg Tucker <greg.b.tucker@intel.com> Acked-by: Tim Chen <tim.c.chen@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--arch/x86/crypto/sha512-mb/sha512_mb_ctx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/crypto/sha512-mb/sha512_mb_ctx.h b/arch/x86/crypto/sha512-mb/sha512_mb_ctx.h
index 9d4b2c8208d5..e4653f5eec3f 100644
--- a/arch/x86/crypto/sha512-mb/sha512_mb_ctx.h
+++ b/arch/x86/crypto/sha512-mb/sha512_mb_ctx.h
@@ -119,7 +119,7 @@ struct sha512_hash_ctx {
/* error flag */
int error;
- uint32_t total_length;
+ uint64_t total_length;
const void *incoming_buffer;
uint32_t incoming_buffer_length;
uint8_t partial_block_buffer[SHA512_BLOCK_SIZE * 2];