]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] sha512: Fix sha384 block size
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 10 Dec 2006 00:32:06 +0000 (11:32 +1100)
committerChris Wright <chrisw@sous-sol.org>
Wed, 10 Jan 2007 19:05:17 +0000 (11:05 -0800)
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 <herbert@gondor.apana.org.au>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
crypto/sha512.c

index 2dfe7f170b4893bc6b5bdf5870c9ac3b77b89c9d..15eab9db9be410dfe12d990b4bdc2b417e798050 100644 (file)
@@ -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 {