diff options
author | Moritz Schulte <mo@g10code.com> | 2003-02-28 01:41:14 +0000 |
---|---|---|
committer | Moritz Schulte <mo@g10code.com> | 2003-02-28 01:41:14 +0000 |
commit | 622a9c5c3e7aaf1bb0296ca1d072cc57e8469135 (patch) | |
tree | 38a32381045549142f6d0b92566dd4d4581a2f24 /cipher/blowfish.c | |
parent | 8ccfdc7879b49e1e5e7f71133d208659b6177690 (diff) | |
download | libgcrypt-622a9c5c3e7aaf1bb0296ca1d072cc57e8469135.tar.gz |
2003-02-23 Moritz Schulte <moritz@g10code.com>
* cipher.c: Remove (bogus) `digitp' macro definition.
* md.c: Likewise.
* blowfish.c (burn_stack): Removed.
* arcfour.c (burn_stack): Likewise.
* cast5.c (burn_stack): Likewise.
* des.c (burn_stack): Likewise.
* md4.c (burn_stack): Likewise.
* md5.c (burn_stack): Likewise.
* random.c (burn_stack): Likewise.
* rijndael.c (burn_stack): Likewise.
* rmd160.c (burn_stack): Likewise.
* sha1.c (burn_stack): Likewise.
* sha256.c (burn_stack): Likewise.
* tiger.c (burn_stack): Likewise.
* twofish.c (burn_stack): Likewise.
* blowfish.c: Changed all occurences of burn_stack to
_gcry_burn_stack.
* arcfour.c: Likewise.
* cast5.c: Likewise.
* des.c: Likewise.
* md4.c: Likewise.
* md5.c: Likewise.
* random.c: Likewise.
* rijndael.c: Likewise.
* rmd160.c: Likewise.
* sha1.c: Likewise.
* sha256.c: Likewise.
* tiger.c: Likewise.
* twofish.c: Likewise.
* arcfour.c (_gcry_arcfour_get_info): Use GCRY_CIPHER_ARCFOUR
instead of hard-coded value `301'.
Diffstat (limited to 'cipher/blowfish.c')
-rw-r--r-- | cipher/blowfish.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/cipher/blowfish.c b/cipher/blowfish.c index af4f4978..a911c5b3 100644 --- a/cipher/blowfish.c +++ b/cipher/blowfish.c @@ -1,5 +1,5 @@ /* blowfish.c - Blowfish encryption - * Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -282,18 +282,6 @@ function_F( BLOWFISH_context *bc, u32 x ) #define R(l,r,i) do { l ^= p[i]; r ^= F(l); } while(0) static void -burn_stack (int bytes) -{ - char buf[64]; - - memset (buf, 0, sizeof buf); - bytes -= sizeof buf; - if (bytes > 0) - burn_stack (bytes); -} - - -static void do_encrypt( BLOWFISH_context *bc, u32 *ret_xl, u32 *ret_xr ) { #if BLOWFISH_ROUNDS == 16 @@ -448,7 +436,7 @@ static void encrypt_block ( BLOWFISH_context *bc, byte *outbuf, byte *inbuf ) { do_encrypt_block (bc, outbuf, inbuf); - burn_stack (64); + _gcry_burn_stack (64); } @@ -474,7 +462,7 @@ static void decrypt_block( BLOWFISH_context *bc, byte *outbuf, byte *inbuf ) { do_decrypt_block (bc, outbuf, inbuf); - burn_stack (64); + _gcry_burn_stack (64); } @@ -596,7 +584,7 @@ static int bf_setkey( BLOWFISH_context *c, byte *key, unsigned keylen ) { int rc = do_bf_setkey (c, key, keylen); - burn_stack (64); + _gcry_burn_stack (64); return rc; } |