diff options
author | Werner Koch <wk@gnupg.org> | 1999-11-19 16:11:34 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1999-11-19 16:11:34 +0000 |
commit | 5d68aaccefcb3e9c7ff515096a240712962b72c9 (patch) | |
tree | e5181cfd801c41018f720217870ce229198abd13 /cipher/elgamal.c | |
parent | 004b4b2bbd984c5efb4ecfa0b1fb3151e3b066bf (diff) | |
download | libgcrypt-5d68aaccefcb3e9c7ff515096a240712962b72c9.tar.gz |
See ChangeLog: Fri Nov 19 17:15:20 CET 1999 Werner Koch
Diffstat (limited to 'cipher/elgamal.c')
-rw-r--r-- | cipher/elgamal.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/cipher/elgamal.c b/cipher/elgamal.c index d5790645..f88aa91d 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -27,7 +27,6 @@ #include <stdlib.h> #include <string.h> #include "g10lib.h" -#include "util.h" #include "mpi.h" #include "cipher.h" #include "elgamal.h" @@ -77,12 +76,7 @@ test_keys( ELG_secret_key *sk, unsigned nbits ) pk.g = sk->g; pk.y = sk->y; - /*mpi_set_bytes( test, nbits, get_random_byte, 0 );*/ - { char *p = gcry_random_bytes( (nbits+7)/8, GCRY_WEAK_RANDOM ); - mpi_set_buffer( test, p, (nbits+7)/8, 0 ); - g10_free(p); - } - + gcry_mpi_randomize( test, nbits, GCRY_WEAK_RANDOM ); encrypt( out1_a, out1_b, test, &pk ); decrypt( out2, out1_a, out1_b, sk ); |