From 2694bceb45f71b7808aec66f30d8ee720a92eb67 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 19 Nov 1999 16:11:37 +0000 Subject: See ChangeLog: Fri Nov 19 17:15:20 CET 1999 Werner Koch --- cipher/elgamal.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'cipher/elgamal.c') diff --git a/cipher/elgamal.c b/cipher/elgamal.c index d57906457..f88aa91d3 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -27,7 +27,6 @@ #include #include #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 ); -- cgit v1.2.3