[PATCH 2/3] Specify stack_burn for SHA256 cipher
Dmitry Eremin-Solenikov
dbaryshkov at gmail.com
Sat Jul 13 16:50:06 CEST 2013
* cipher/sha256.c (sha256_init): fill stack_burn information for SHA256
cipher, which otherwise will contain random value.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
cipher/sha256.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cipher/sha256.c b/cipher/sha256.c
index 975612b..1785699 100644
--- a/cipher/sha256.c
+++ b/cipher/sha256.c
@@ -70,6 +70,7 @@ sha256_init (void *context)
hd->bctx.nblocks = 0;
hd->bctx.count = 0;
hd->bctx.blocksize = 64;
+ hd->bctx.stack_burn = 74*4+32;
hd->bctx.bwrite = transform;
}
--
1.7.10.4
More information about the Gcrypt-devel
mailing list