mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
See ChangeLog: Fri Apr 9 12:26:25 CEST 1999 Werner Koch
This commit is contained in:
parent
97efca04ef
commit
02d018f9c8
22 changed files with 152 additions and 139 deletions
|
@ -1,3 +1,11 @@
|
|||
Fri Apr 9 12:26:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* cipher.c (cipher_open): Reversed the changes for AUTO_CFB.
|
||||
|
||||
* blowfish.c: Dropped the Blowfish 160 mode.
|
||||
* cipher.c (cipher_open): Ditto.
|
||||
(setup_cipher_table): Ditto. And removed support of twofish128
|
||||
|
||||
Wed Apr 7 20:51:39 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* random.c (get_random_bits): Can now handle requests > POOLSIZE
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
|
||||
#define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */
|
||||
#define CIPHER_ALGO_BLOWFISH160 42 /* blowfish 160 bit key (not in OpenPGP)*/
|
||||
|
||||
#define FNCCAST_SETKEY(f) (int(*)(void*, byte*, unsigned))(f)
|
||||
#define FNCCAST_CRYPT(f) (void(*)(void*, byte*, byte*))(f)
|
||||
|
@ -582,7 +581,7 @@ blowfish_get_info( int algo, size_t *keylen,
|
|||
void (**r_decrypt)( void *c, byte *outbuf, byte *inbuf )
|
||||
)
|
||||
{
|
||||
*keylen = algo == CIPHER_ALGO_BLOWFISH ? 128 : 160;
|
||||
*keylen = 128;
|
||||
*blocksize = BLOWFISH_BLOCKSIZE;
|
||||
*contextsize = sizeof(BLOWFISH_context);
|
||||
*r_setkey = FNCCAST_SETKEY(bf_setkey);
|
||||
|
@ -591,8 +590,6 @@ blowfish_get_info( int algo, size_t *keylen,
|
|||
|
||||
if( algo == CIPHER_ALGO_BLOWFISH )
|
||||
return "BLOWFISH";
|
||||
if( algo == CIPHER_ALGO_BLOWFISH160 )
|
||||
return "BLOWFISH160";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,28 +127,6 @@ setup_cipher_table(void)
|
|||
if( !cipher_table[i].name )
|
||||
BUG();
|
||||
i++;
|
||||
cipher_table[i].algo = CIPHER_ALGO_BLOWFISH160;
|
||||
cipher_table[i].name = blowfish_get_info( cipher_table[i].algo,
|
||||
&cipher_table[i].keylen,
|
||||
&cipher_table[i].blocksize,
|
||||
&cipher_table[i].contextsize,
|
||||
&cipher_table[i].setkey,
|
||||
&cipher_table[i].encrypt,
|
||||
&cipher_table[i].decrypt );
|
||||
if( !cipher_table[i].name )
|
||||
BUG();
|
||||
i++;
|
||||
cipher_table[i].algo = CIPHER_ALGO_TWOFISH_OLD;
|
||||
cipher_table[i].name = twofish_get_info( cipher_table[i].algo,
|
||||
&cipher_table[i].keylen,
|
||||
&cipher_table[i].blocksize,
|
||||
&cipher_table[i].contextsize,
|
||||
&cipher_table[i].setkey,
|
||||
&cipher_table[i].encrypt,
|
||||
&cipher_table[i].decrypt );
|
||||
if( !cipher_table[i].name )
|
||||
BUG();
|
||||
i++;
|
||||
cipher_table[i].algo = CIPHER_ALGO_DUMMY;
|
||||
cipher_table[i].name = "DUMMY";
|
||||
cipher_table[i].blocksize = 8;
|
||||
|
@ -362,8 +340,7 @@ cipher_open( int algo, int mode, int secure )
|
|||
if( algo == CIPHER_ALGO_DUMMY )
|
||||
hd->mode = CIPHER_MODE_DUMMY;
|
||||
else if( mode == CIPHER_MODE_AUTO_CFB ) {
|
||||
if( hd->blocksize > 8
|
||||
|| algo == CIPHER_ALGO_BLOWFISH160 || algo >= 100 )
|
||||
if( algo >= 100 )
|
||||
hd->mode = CIPHER_MODE_CFB;
|
||||
else
|
||||
hd->mode = CIPHER_MODE_PHILS_CFB;
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
* By Matthew Skala <mskala@ansuz.sooke.bc.ca>, July 26, 1998
|
||||
* 256-bit key length added March 20, 1999
|
||||
*
|
||||
* The original author has disclaimed all copyright interest in this
|
||||
* code and thus putting it in the public domain.
|
||||
*
|
||||
* This code is a "clean room" implementation, written from the paper
|
||||
* _Twofish: A 128-Bit Block Cipher_ by Bruce Schneier, John Kelsey,
|
||||
* Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson, available
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue