diff options
author | Werner Koch <[email protected]> | 1999-04-09 10:34:44 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1999-04-09 10:34:44 +0000 |
commit | 02d018f9c84c8f3462ff30c2f5336a3acbc9cd38 (patch) | |
tree | 0ac69079ad82fc3c6767fa571428da93d091ef81 /cipher | |
parent | See ChangeLog: Thu Apr 8 09:35:53 CEST 1999 Werner Koch (diff) | |
download | gnupg-02d018f9c84c8f3462ff30c2f5336a3acbc9cd38.tar.gz gnupg-02d018f9c84c8f3462ff30c2f5336a3acbc9cd38.zip |
See ChangeLog: Fri Apr 9 12:26:25 CEST 1999 Werner Koch
Diffstat (limited to 'cipher')
-rw-r--r-- | cipher/ChangeLog | 8 | ||||
-rw-r--r-- | cipher/blowfish.c | 5 | ||||
-rw-r--r-- | cipher/cipher.c | 25 | ||||
-rw-r--r-- | cipher/twofish.c | 3 |
4 files changed, 13 insertions, 28 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 4ecdbc488..9b16f12ae 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,11 @@ +Fri Apr 9 12:26:25 CEST 1999 Werner Koch <[email protected]> + + * 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 <[email protected]> * random.c (get_random_bits): Can now handle requests > POOLSIZE diff --git a/cipher/blowfish.c b/cipher/blowfish.c index 8bfce67c9..5a829d413 100644 --- a/cipher/blowfish.c +++ b/cipher/blowfish.c @@ -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; } diff --git a/cipher/cipher.c b/cipher/cipher.c index 0306c378d..cba011be1 100644 --- a/cipher/cipher.c +++ b/cipher/cipher.c @@ -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; diff --git a/cipher/twofish.c b/cipher/twofish.c index 94a31de71..6ab5ebaed 100644 --- a/cipher/twofish.c +++ b/cipher/twofish.c @@ -2,6 +2,9 @@ * By Matthew Skala <[email protected]>, 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 |