summaryrefslogtreecommitdiff
path: root/cipher/dsa.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-11-19 16:11:34 +0000
committerWerner Koch <wk@gnupg.org>1999-11-19 16:11:34 +0000
commit5d68aaccefcb3e9c7ff515096a240712962b72c9 (patch)
treee5181cfd801c41018f720217870ce229198abd13 /cipher/dsa.c
parent004b4b2bbd984c5efb4ecfa0b1fb3151e3b066bf (diff)
downloadlibgcrypt-5d68aaccefcb3e9c7ff515096a240712962b72c9.tar.gz
See ChangeLog: Fri Nov 19 17:15:20 CET 1999 Werner Koch
Diffstat (limited to 'cipher/dsa.c')
-rw-r--r--cipher/dsa.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/cipher/dsa.c b/cipher/dsa.c
index 91c797c4..903625c1 100644
--- a/cipher/dsa.c
+++ b/cipher/dsa.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <assert.h>
#include "g10lib.h"
-#include "util.h"
#include "mpi.h"
#include "cipher.h"
#include "dsa.h"
@@ -130,10 +129,7 @@ test_keys( DSA_secret_key *sk, unsigned qbits )
pk.q = sk->q;
pk.g = sk->g;
pk.y = sk->y;
- { char *p = gcry_random_bytes( (qbits+7)/8, GCRY_WEAK_RANDOM );
- mpi_set_buffer( test, p, (qbits+7)/8, 0 );
- g10_free(p);
- }
+ gcry_mpi_randomize( test, qbits, GCRY_WEAK_RANDOM );
sign( out1_a, out1_b, test, sk );
if( !verify( out1_a, out1_b, test, &pk ) )