diff options
Diffstat (limited to 'cipher/elgamal.c')
-rw-r--r-- | cipher/elgamal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cipher/elgamal.c b/cipher/elgamal.c index a7450e068..63ec06f57 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -95,7 +95,7 @@ gen_k( MPI p ) if( DBG_CIPHER ) fputc('.', stderr); mpi_set_bytes( k, nbits, get_random_byte, 1 ); - mpi_set_bit( k, nbits-1 ); /* make sure it's high (needed?) */ + mpi_set_bit( k, nbits-1 ); /* make sure it's high (really needed?) */ if( mpi_cmp( k, p_1 ) >= 0 ) continue; /* is not smaller than (p-1) */ if( mpi_gcd( temp, k, p_1 ) ) @@ -136,7 +136,7 @@ elg_generate( ELG_public_key *pk, ELG_secret_key *sk, unsigned nbits ) fputc('.', stderr); mpi_set_bytes( x, nbits, get_random_byte, 1 ); /* fixme: should be 2 */ mpi_set_bit( x, nbits-1 ); /* make sure it's high (needed?) */ - } while( mpi_cmp( x, p ) >= 0 ); /* x must be samller than p */ + } while( mpi_cmp( x, p ) >= 0 ); /* x must be smaller than p */ y = mpi_alloc(nbits/BITS_PER_MPI_LIMB); mpi_powm( y, g, x, p ); |