]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[CRYPTO] sha512: Fix sha384 block size
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 14 Dec 2006 20:27:09 +0000 (21:27 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 14 Dec 2006 20:27:09 +0000 (21:27 +0100)
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: Adrian Bunk <bunk@stusta.de>
crypto/sha512.c

index 3e6e9392310c0fe94adaebc9632de37089f0d87e..c957481ef8c2d496bd1257985a5cce8f47985f64 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 {