summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-12-10 11:32:06 +1100
committerChris Wright <chrisw@sous-sol.org>2007-01-10 11:05:17 -0800
commit80355a9d6632081192381bdcc6903d96627f1c1a (patch)
tree70244fac11a39970b41bd5d6de09981087ddcb74 /crypto
parent43cb0cab8631c2099561dae2cf6ed47c9bd37471 (diff)
[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 <herbert@gondor.apana.org.au> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/sha512.c2
1 files changed, 1 insertions, 1 deletions
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 {