summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclTomMath.h10
-rw-r--r--libtommath/bn_mp_export.c2
-rw-r--r--libtommath/bn_mp_reduce.c2
-rw-r--r--libtommath/bn_mp_reduce_2k_l.c2
-rw-r--r--libtommath/bn_s_mp_exptmod.c2
-rw-r--r--libtommath/tommath.h6
6 files changed, 12 insertions, 12 deletions
diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h
index c8b2a87..df54ff5 100644
--- a/generic/tclTomMath.h
+++ b/generic/tclTomMath.h
@@ -273,7 +273,7 @@ int mp_set_long(mp_int *a, unsigned long b);
/* set a platform dependent unsigned long long value */
/*
-int mp_set_long_long(mp_int *a, Tcl_WideUInt b);
+int mp_set_long_long(mp_int *a, unsigned long long b);
*/
/* get a 32-bit value */
@@ -288,7 +288,7 @@ unsigned long mp_get_long(const mp_int *a);
/* get a platform dependent unsigned long long value */
/*
-Tcl_WideUInt mp_get_long_long(const mp_int *a);
+unsigned long long mp_get_long_long(const mp_int *a);
*/
/* initialize and set a digit */
@@ -323,7 +323,7 @@ int mp_import(mp_int *rop, size_t count, int order, size_t size, int endian, siz
/* export binary data */
/*
-int mp_export(void *rop, size_t *countp, int order, size_t size, int endian, size_t nails, mp_int *op);
+int mp_export(void *rop, size_t *countp, int order, size_t size, int endian, size_t nails, const mp_int *op);
*/
/* ---> digit manipulation <--- */
@@ -577,7 +577,7 @@ int mp_reduce_setup(mp_int *a, const mp_int *b);
* compute the reduction as -1 * mp_reduce(mp_abs(a)) [pseudo code].
*/
/*
-int mp_reduce(mp_int *a, const mp_int *b, mp_int *c);
+int mp_reduce(mp_int *a, const mp_int *b, const mp_int *c);
*/
/* setups the montgomery reduction */
@@ -639,7 +639,7 @@ int mp_reduce_2k_setup_l(const mp_int *a, mp_int *d);
/* reduces a modulo b where b is of the form 2**p - k [0 <= a] */
/*
-int mp_reduce_2k_l(mp_int *a, const mp_int *n, mp_int *d);
+int mp_reduce_2k_l(mp_int *a, const mp_int *n, const mp_int *d);
*/
/* d = a**b (mod c) */
diff --git a/libtommath/bn_mp_export.c b/libtommath/bn_mp_export.c
index b69a4fb..4276f4f 100644
--- a/libtommath/bn_mp_export.c
+++ b/libtommath/bn_mp_export.c
@@ -19,7 +19,7 @@
* see http://gmplib.org/manual/Integer-Import-and-Export.html
*/
int mp_export(void *rop, size_t *countp, int order, size_t size,
- int endian, size_t nails, mp_int *op)
+ int endian, size_t nails, const mp_int *op)
{
int result;
size_t odd_nails, nail_bytes, i, j, bits, count;
diff --git a/libtommath/bn_mp_reduce.c b/libtommath/bn_mp_reduce.c
index 6665acb..bbc521f 100644
--- a/libtommath/bn_mp_reduce.c
+++ b/libtommath/bn_mp_reduce.c
@@ -19,7 +19,7 @@
* precomputed via mp_reduce_setup.
* From HAC pp.604 Algorithm 14.42
*/
-int mp_reduce(mp_int *x, const mp_int *m, mp_int *mu)
+int mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu)
{
mp_int q;
int res, um = m->used;
diff --git a/libtommath/bn_mp_reduce_2k_l.c b/libtommath/bn_mp_reduce_2k_l.c
index 3b23a37..23381bf 100644
--- a/libtommath/bn_mp_reduce_2k_l.c
+++ b/libtommath/bn_mp_reduce_2k_l.c
@@ -19,7 +19,7 @@
This differs from reduce_2k since "d" can be larger
than a single digit.
*/
-int mp_reduce_2k_l(mp_int *a, const mp_int *n, mp_int *d)
+int mp_reduce_2k_l(mp_int *a, const mp_int *n, const mp_int *d)
{
mp_int q;
int p, res;
diff --git a/libtommath/bn_s_mp_exptmod.c b/libtommath/bn_s_mp_exptmod.c
index 0d0145d..a886361 100644
--- a/libtommath/bn_s_mp_exptmod.c
+++ b/libtommath/bn_s_mp_exptmod.c
@@ -25,7 +25,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 *,mp_int *);
+ int (*redux)(mp_int *, const mp_int *, const mp_int *);
/* find window size */
x = mp_count_bits(X);
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index e067cb4..50a3a81 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -252,7 +252,7 @@ void mp_clamp(mp_int *a);
int mp_import(mp_int *rop, size_t count, int order, size_t size, int endian, size_t nails, const void *op);
/* export binary data */
-int mp_export(void *rop, size_t *countp, int order, size_t size, int endian, size_t nails, mp_int *op);
+int mp_export(void *rop, size_t *countp, int order, size_t size, int endian, size_t nails, const mp_int *op);
/* ---> digit manipulation <--- */
@@ -410,7 +410,7 @@ int mp_reduce_setup(mp_int *a, const mp_int *b);
* Assumes that 0 < a <= b*b, note if 0 > a > -(b*b) then you can merely
* compute the reduction as -1 * mp_reduce(mp_abs(a)) [pseudo code].
*/
-int mp_reduce(mp_int *a, const mp_int *b, mp_int *c);
+int mp_reduce(mp_int *a, const mp_int *b, const mp_int *c);
/* setups the montgomery reduction */
int mp_montgomery_setup(const mp_int *a, mp_digit *mp);
@@ -448,7 +448,7 @@ int mp_reduce_is_2k_l(const mp_int *a);
int mp_reduce_2k_setup_l(const mp_int *a, mp_int *d);
/* reduces a modulo b where b is of the form 2**p - k [0 <= a] */
-int mp_reduce_2k_l(mp_int *a, const mp_int *n, mp_int *d);
+int mp_reduce_2k_l(mp_int *a, const mp_int *n, const mp_int *d);
/* d = a**b (mod c) */
int mp_exptmod(const mp_int *a, const mp_int *b, const mp_int *c, mp_int *d);