[PATCH 7/7] Avoid burn stack in Arcfour setkey

Jussi Kivilinna jussi.kivilinna at iki.fi
Tue Nov 5 16:58:06 CET 2013


* cipher/arcfour.c (arcfour_setkey): Remove stack burning.
--

Stack is already cleared in do_arcfour_setkey and GCC is inlining
do_arcfour_setkey to arcfour_setkey which renders this _gcry_burn_stack
broken anyways.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 cipher/arcfour.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/cipher/arcfour.c b/cipher/arcfour.c
index 89936f4..64f7204 100644
--- a/cipher/arcfour.c
+++ b/cipher/arcfour.c
@@ -146,7 +146,6 @@ arcfour_setkey ( void *context, const byte *key, unsigned int keylen )
 {
   ARCFOUR_context *ctx = (ARCFOUR_context *) context;
   gcry_err_code_t rc = do_arcfour_setkey (ctx, key, keylen );
-  _gcry_burn_stack (300);
   return rc;
 }
 




More information about the Gcrypt-devel mailing list