From 5f486864691e8875f32bd4b368eb654bbee9a697 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 14 Dec 2006 21:27:09 +0100 Subject: [PATCH] [CRYPTO] sha512: Fix sha384 block size The SHA384 block size should be 128 bytes, not 96 bytes. This was spotted by Andrew Donofrio. This breaks HMAC which uses the block size during setup and the final calculation. Signed-off-by: Herbert Xu Signed-off-by: Adrian Bunk --- crypto/sha512.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/sha512.c b/crypto/sha512.c index 3e6e9392310c..c957481ef8c2 100644 --- a/crypto/sha512.c +++ b/crypto/sha512.c @@ -24,7 +24,7 @@ #define SHA384_DIGEST_SIZE 48 #define SHA512_DIGEST_SIZE 64 -#define SHA384_HMAC_BLOCK_SIZE 96 +#define SHA384_HMAC_BLOCK_SIZE 128 #define SHA512_HMAC_BLOCK_SIZE 128 struct sha512_ctx {