1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

*** empty log message ***

This commit is contained in:
Werner Koch 1998-04-30 14:06:01 +00:00
parent b27503e3cd
commit 448f8e53fe
42 changed files with 2892 additions and 65 deletions

View file

@ -35,19 +35,8 @@
void
make_session_key( DEK *dek )
{
switch( dek->algo ) {
case CIPHER_ALGO_BLOWFISH:
dek->keylen = 20;
randomize_buffer( dek->key, dek->keylen, 1 );
break;
case CIPHER_ALGO_BLOWFISH128:
case CIPHER_ALGO_CAST:
dek->keylen = 16;
randomize_buffer( dek->key, dek->keylen, 1 );
break;
default: log_bug("invalid algo %d in make_session_key()\n", dek->algo);
}
dek->keylen = cipher_get_keylen( dek->algo ) / 8;
randomize_buffer( dek->key, dek->keylen, 1 );
}
@ -84,7 +73,7 @@ encode_session_key( DEK *dek, unsigned nbits )
* RND are non-zero random bytes.
* A is the cipher algorithm
* DEK is the encryption key (session key) length k depends on the
* cipher algorithm (20 is used with blowfish).
* cipher algorithm (20 is used with blowfish160).
* CSUM is the 16 bit checksum over the DEK
*/
csum = 0;