[svn] gcry - r1245 - trunk/cipher
svn author wk
cvs at cvs.gnupg.org
Wed May 2 12:19:14 CEST 2007
Author: wk
Date: 2007-05-02 12:18:46 +0200 (Wed, 02 May 2007)
New Revision: 1245
Modified:
trunk/cipher/ChangeLog
trunk/cipher/camellia-glue.c
Log:
Changed amount of stack to burn
Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog 2007-05-02 09:46:53 UTC (rev 1244)
+++ trunk/cipher/ChangeLog 2007-05-02 10:18:46 UTC (rev 1245)
@@ -1,5 +1,8 @@
2007-05-02 Werner Koch <wk at g10code.com>
+ * camellia-glue.c (camellia_setkey, camellia_encrypt)
+ (camellia_decrypt): Recalculated used stack size in called
+ functions.
* camellia.h: Redefine external symbols.
2007-05-02 David Shaw <dshaw at jabberwocky.com>
Modified: trunk/cipher/camellia-glue.c
===================================================================
--- trunk/cipher/camellia-glue.c 2007-05-02 09:46:53 UTC (rev 1244)
+++ trunk/cipher/camellia-glue.c 2007-05-02 10:18:46 UTC (rev 1245)
@@ -79,7 +79,12 @@
ctx->keybitlength=keylen*8;
Camellia_Ekeygen(ctx->keybitlength,key,ctx->keytable);
- _gcry_burn_stack(4+4+6+34+34+sizeof(unsigned char *)+sizeof(u32 *));
+ _gcry_burn_stack
+ ((19+34+34)*sizeof(u32)+2*sizeof(void*) /* camellia_setup256 */
+ +(4+32)*sizeof(u32)+2*sizeof(void*) /* camellia_setup192 */
+ +0+sizeof(int)+2*sizeof(void*) /* Camellia_Ekeygen */
+ +3*2*sizeof(void*) /* Function calls. */
+ );
return 0;
}
@@ -90,9 +95,12 @@
CAMELLIA_context *ctx=c;
Camellia_EncryptBlock(ctx->keybitlength,inbuf,ctx->keytable,outbuf);
- _gcry_burn_stack(sizeof(int)+sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
- +sizeof(unsigned char *)+16+4+4+4+4+sizeof(u32 *)
- +sizeof(u32 *));
+ _gcry_burn_stack
+ (sizeof(int)+2*sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
+ +4*sizeof(u32)
+ +2*sizeof(u32*)+4*sizeof(u32)
+ +2*2*sizeof(void*) /* Function calls. */
+ );
}
static void
@@ -101,9 +109,12 @@
CAMELLIA_context *ctx=c;
Camellia_DecryptBlock(ctx->keybitlength,inbuf,ctx->keytable,outbuf);
- _gcry_burn_stack(sizeof(int)+sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
- +sizeof(unsigned char *)+16+4+4+4+4+sizeof(u32 *)
- +sizeof(u32 *));
+ _gcry_burn_stack
+ (sizeof(int)+2*sizeof(unsigned char *)+sizeof(KEY_TABLE_TYPE)
+ +4*sizeof(u32)
+ +2*sizeof(u32*)+4*sizeof(u32)
+ +2*2*sizeof(void*) /* Function calls. */
+ );
}
static const char *
More information about the Gnupg-commits
mailing list