aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/dsa.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-12-08 21:03:03 +0000
committerWerner Koch <[email protected]>1999-12-08 21:03:03 +0000
commit4555c0be941cef55486b7a1644d9b70f4ea50c77 (patch)
tree1a10627bf31163f9aef5040724c53f75e8daf3e6 /cipher/dsa.c
parentSee ChangeLog: Fri Nov 19 17:15:20 CET 1999 Werner Koch (diff)
downloadgnupg-4555c0be941cef55486b7a1644d9b70f4ea50c77.tar.gz
gnupg-4555c0be941cef55486b7a1644d9b70f4ea50c77.zip
See ChangeLog: Wed Dec 8 21:58:32 CET 1999 Werner Koch
Diffstat (limited to 'cipher/dsa.c')
-rw-r--r--cipher/dsa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cipher/dsa.c b/cipher/dsa.c
index 903625c11..1f132ae0c 100644
--- a/cipher/dsa.c
+++ b/cipher/dsa.c
@@ -178,7 +178,7 @@ generate( DSA_secret_key *sk, unsigned nbits, MPI **ret_factors )
do {
mpi_add_ui( h, h, 1 );
/* g = h^e mod p */
- mpi_powm( g, h, e, p );
+ gcry_mpi_powm( g, h, e, p );
} while( !mpi_cmp_ui( g, 1 ) ); /* continue until g != 1 */
/* select a random number which has these properties:
@@ -212,7 +212,7 @@ generate( DSA_secret_key *sk, unsigned nbits, MPI **ret_factors )
/* y = g^x mod p */
y = mpi_alloc( mpi_get_nlimbs(p) );
- mpi_powm( y, g, x, p );
+ gcry_mpi_powm( y, g, x, p );
if( DBG_CIPHER ) {
progress('\n');
@@ -246,7 +246,7 @@ check_secret_key( DSA_secret_key *sk )
int rc;
MPI y = mpi_alloc( mpi_get_nlimbs(sk->y) );
- mpi_powm( y, sk->g, sk->x, sk->p );
+ gcry_mpi_powm( y, sk->g, sk->x, sk->p );
rc = !mpi_cmp( y, sk->y );
mpi_free( y );
return rc;
@@ -269,7 +269,7 @@ sign(MPI r, MPI s, MPI hash, DSA_secret_key *skey )
k = gen_k( skey->q );
/* r = (a^k mod p) mod q */
- mpi_powm( r, skey->g, k, skey->p );
+ gcry_mpi_powm( r, skey->g, k, skey->p );
mpi_fdiv_r( r, r, skey->q );
/* kinv = k^(-1) mod q */