From: Herbert Xu Date: Sun, 10 Dec 2006 00:32:06 +0000 (+1100) Subject: [PATCH] sha512: Fix sha384 block size X-Git-Tag: v2.6.19.2~50 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=80355a9d6632081192381bdcc6903d96627f1c1a;p=karo-tx-linux.git [PATCH] 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: Chris Wright --- diff --git a/crypto/sha512.c b/crypto/sha512.c index 2dfe7f170b48..15eab9db9be4 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 {