diff options
author | Werner Koch <wk@gnupg.org> | 2001-03-29 10:01:44 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2001-03-29 10:01:44 +0000 |
commit | 7e68abda362fce76e91631973d062fd7c8ff5e4e (patch) | |
tree | d4c9e9156fde813d270dbe0963756d4a2c7ec191 /cipher/elgamal.c | |
parent | 0eecba659555d50cd7bdd26daef9a32334759dc4 (diff) | |
download | libgcrypt-7e68abda362fce76e91631973d062fd7c8ff5e4e.tar.gz |
Fixed the bug in the hash code
Diffstat (limited to 'cipher/elgamal.c')
-rw-r--r-- | cipher/elgamal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cipher/elgamal.c b/cipher/elgamal.c index d65f2d50..253edae8 100644 --- a/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -50,7 +50,7 @@ static void test_keys( ELG_secret_key *sk, unsigned nbits ); static MPI gen_k( MPI p ); static void generate( ELG_secret_key *sk, unsigned nbits, MPI **factors ); static int check_secret_key( ELG_secret_key *sk ); -static void encrypt(MPI a, MPI b, MPI input, ELG_public_key *pkey ); +static void do_encrypt(MPI a, MPI b, MPI input, ELG_public_key *pkey ); static void decrypt(MPI output, MPI a, MPI b, ELG_secret_key *skey ); static void sign(MPI a, MPI b, MPI input, ELG_secret_key *skey); static int verify(MPI a, MPI b, MPI input, ELG_public_key *pkey); @@ -132,7 +132,7 @@ test_keys( ELG_secret_key *sk, unsigned nbits ) gcry_mpi_randomize( test, nbits, GCRY_WEAK_RANDOM ); - encrypt( out1_a, out1_b, test, &pk ); + do_encrypt( out1_a, out1_b, test, &pk ); decrypt( out2, out1_a, out1_b, sk ); if( mpi_cmp( test, out2 ) ) log_fatal("ElGamal operation: encrypt, decrypt failed\n"); @@ -337,7 +337,7 @@ check_secret_key( ELG_secret_key *sk ) static void -encrypt(MPI a, MPI b, MPI input, ELG_public_key *pkey ) +do_encrypt(MPI a, MPI b, MPI input, ELG_public_key *pkey ) { MPI k; @@ -552,7 +552,7 @@ elg_encrypt( int algo, MPI *resarr, MPI data, MPI *pkey ) pk.y = pkey[2]; resarr[0] = mpi_alloc( mpi_get_nlimbs( pk.p ) ); resarr[1] = mpi_alloc( mpi_get_nlimbs( pk.p ) ); - encrypt( resarr[0], resarr[1], data, &pk ); + do_encrypt( resarr[0], resarr[1], data, &pk ); return 0; } |