2007-01-06 02:26:18

by Chris Wright

[permalink] [raw]
Subject: [patch 02/50] sha512: Fix sha384 block size

-stable review patch. If anyone has any objections, please let us know.
------------------

From: Herbert Xu <[email protected]>

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 <[email protected]>
Signed-off-by: Chris Wright <[email protected]>
---
crypto/sha512.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.19.1.orig/crypto/sha512.c
+++ linux-2.6.19.1/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 {

--