summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_s_mp_exptmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/bn_s_mp_exptmod.c')
-rw-r--r--libtommath/bn_s_mp_exptmod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libtommath/bn_s_mp_exptmod.c b/libtommath/bn_s_mp_exptmod.c
index a886361..a954757 100644
--- a/libtommath/bn_s_mp_exptmod.c
+++ b/libtommath/bn_s_mp_exptmod.c
@@ -14,6 +14,7 @@
*
* Tom St Denis, tstdenis82@gmail.com, http://libtom.org
*/
+
#ifdef MP_LOW_MEM
# define TAB_SIZE 32
#else
@@ -25,7 +26,7 @@ int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, i
mp_int M[TAB_SIZE], res, mu;
mp_digit buf;
int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize;
- int (*redux)(mp_int *, const mp_int *, const mp_int *);
+ int (*redux)(mp_int *x, const mp_int *m, const mp_int *mu);
/* find window size */
x = mp_count_bits(X);
@@ -133,7 +134,7 @@ int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, i
if ((err = mp_init(&res)) != MP_OKAY) {
goto LBL_MU;
}
- mp_set(&res, 1);
+ mp_set(&res, 1uL);
/* set initial mode and bit cnt */
mode = 0;