aboutsummaryrefslogtreecommitdiffstats
path: root/mpi/mpi-pow.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-05-20 17:34:00 +0000
committerDavid Shaw <[email protected]>2004-05-20 17:34:00 +0000
commitc19c728afa3bb98209cadb0a83f0f9d18094bd57 (patch)
treeb9051d8a966455557fa9da7768db6b9ef82d310c /mpi/mpi-pow.c
parent* dsa.c (verify): s/exp/exponent/ to fix a compiler warning. From Werner (diff)
downloadgnupg-c19c728afa3bb98209cadb0a83f0f9d18094bd57.tar.gz
gnupg-c19c728afa3bb98209cadb0a83f0f9d18094bd57.zip
* longlong.h: Typo.
* mpi-pow.c (mpi_powm): s/exp/exponent/ to shutup a compiler warning. From Werner on stable branch.
Diffstat (limited to '')
-rw-r--r--mpi/mpi-pow.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mpi/mpi-pow.c b/mpi/mpi-pow.c
index d65258b0f..73d28970c 100644
--- a/mpi/mpi-pow.c
+++ b/mpi/mpi-pow.c
@@ -39,7 +39,7 @@
* RES = BASE ^ EXP mod MOD
*/
void
-mpi_powm( MPI res, MPI base, MPI exp, MPI mod)
+mpi_powm( MPI res, MPI base, MPI exponent, MPI mod)
{
mpi_ptr_t rp, ep, mp, bp;
mpi_size_t esize, msize, bsize, rsize;
@@ -55,19 +55,19 @@ mpi_powm( MPI res, MPI base, MPI exp, MPI mod)
mpi_size_t tsize=0; /* to avoid compiler warning */
/* fixme: we should check that the warning is void*/
- esize = exp->nlimbs;
+ esize = exponent->nlimbs;
msize = mod->nlimbs;
size = 2 * msize;
- esign = exp->sign;
+ esign = exponent->sign;
msign = mod->sign;
- esec = mpi_is_secure(exp);
+ esec = mpi_is_secure(exponent);
msec = mpi_is_secure(mod);
bsec = mpi_is_secure(base);
rsec = mpi_is_secure(res);
rp = res->d;
- ep = exp->d;
+ ep = exponent->d;
if( !msize )
msize = 1 / msize; /* provoke a signal */
@@ -129,7 +129,7 @@ mpi_powm( MPI res, MPI base, MPI exp, MPI mod)
rp = res->d;
}
}
- else { /* Make BASE, EXP and MOD not overlap with RES. */
+ else { /* Make BASE, EXPONENT and MOD not overlap with RES. */
if( rp == bp ) {
/* RES and BASE are identical. Allocate temp. space for BASE. */
assert( !bp_marker );
@@ -137,7 +137,8 @@ mpi_powm( MPI res, MPI base, MPI exp, MPI mod)
MPN_COPY(bp, rp, bsize);
}
if( rp == ep ) {
- /* RES and EXP are identical. Allocate temp. space for EXP. */
+ /* RES and EXPONENT are identical.
+ Allocate temp. space for EXPONENT. */
ep = ep_marker = mpi_alloc_limb_space( esize, esec );
MPN_COPY(ep, rp, esize);
}