From 899b8378eca7a3801d02bab5fb4cd13dfb6a8595 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 3 Feb 1998 12:09:20 +0000 Subject: Fixed a few bugs --- cipher/elgamal.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cipher/elgamal.c') diff --git a/cipher/elgamal.c b/cipher/elgamal.c index 1f1699f8f..9e6805d62 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -142,6 +142,9 @@ elg_generate( ELG_public_key *pk, ELG_secret_key *sk, unsigned nbits ) /* select a random number which has these properties: * 0 < x < p-1 + * This must be a very good random number because this is the + * secret part. The prime is public and may be shared anyware, + * so a random generator level of 1 has been used for the prime */ x = mpi_alloc_secure( nbits/BITS_PER_MPI_LIMB ); if( DBG_CIPHER ) -- cgit v1.2.3