~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math/Makefile.am, symm/Makefile.am: Use `--no-install' on oddball tests.
[catacomb]
/
math
/
mpmont.c
diff --git
a/math/mpmont.c
b/math/mpmont.c
index
fe1e645
..
f8a2611
100644
(file)
--- a/
math/mpmont.c
+++ b/
math/mpmont.c
@@
-211,7
+211,8
@@
static mulcore__functype *pick_mulcore(void)
/* --- @finish@ --- *
*
/* --- @finish@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to a Montgomery reduction context
+ * Arguments: @const mpmont *mm@ = pointer to a Montgomery reduction
+ * context
* *mp *d@ = pointer to mostly-reduced operand
*
* Returns: ---
* *mp *d@ = pointer to mostly-reduced operand
*
* Returns: ---
@@
-223,7
+224,7
@@
static mulcore__functype *pick_mulcore(void)
* need to do an additional subtraction if %$d$% is negative.
*/
* need to do an additional subtraction if %$d$% is negative.
*/
-static void finish(mpmont *mm, mp *d)
+static void finish(
const
mpmont *mm, mp *d)
{
mpw *dv = d->v, *dvl = d->vl;
size_t n = mm->n;
{
mpw *dv = d->v, *dvl = d->vl;
size_t n = mm->n;
@@
-328,7
+329,7
@@
void mpmont_destroy(mpmont *mm)
/* --- @mpmont_reduce@ --- *
*
/* --- @mpmont_reduce@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * Arguments: @
const
mpmont *mm@ = pointer to Montgomery reduction context
* @mp *d@ = destination
* @mp *a@ = source, assumed positive
*
* @mp *d@ = destination
* @mp *a@ = source, assumed positive
*
@@
-337,7
+338,7
@@
void mpmont_destroy(mpmont *mm)
#ifdef MPMONT_DISABLE
#ifdef MPMONT_DISABLE
-mp *mpmont_reduce(mpmont *mm, mp *d, mp *a)
+mp *mpmont_reduce(
const
mpmont *mm, mp *d, mp *a)
{
mp_div(0, &d, a, mm->m);
return (d);
{
mp_div(0, &d, a, mm->m);
return (d);
@@
-345,7
+346,7
@@
mp *mpmont_reduce(mpmont *mm, mp *d, mp *a)
#else
#else
-mp *mpmont_reduce(mpmont *mm, mp *d, mp *a)
+mp *mpmont_reduce(
const
mpmont *mm, mp *d, mp *a)
{
size_t n = mm->n;
{
size_t n = mm->n;
@@
-387,7
+388,7
@@
mp *mpmont_reduce(mpmont *mm, mp *d, mp *a)
/* --- @mpmont_mul@ --- *
*
/* --- @mpmont_mul@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * Arguments: @
const
mpmont *mm@ = pointer to Montgomery reduction context
* @mp *d@ = destination
* @mp *a, *b@ = sources, assumed positive
*
* @mp *d@ = destination
* @mp *a, *b@ = sources, assumed positive
*
@@
-396,7
+397,7
@@
mp *mpmont_reduce(mpmont *mm, mp *d, mp *a)
#ifdef MPMONT_DISABLE
#ifdef MPMONT_DISABLE
-mp *mpmont_mul(mpmont *mm, mp *d, mp *a, mp *b)
+mp *mpmont_mul(
const
mpmont *mm, mp *d, mp *a, mp *b)
{
d = mp_mul(d, a, b);
mp_div(0, &d, d, mm->m);
{
d = mp_mul(d, a, b);
mp_div(0, &d, d, mm->m);
@@
-405,7
+406,7
@@
mp *mpmont_mul(mpmont *mm, mp *d, mp *a, mp *b)
#else
#else
-mp *mpmont_mul(mpmont *mm, mp *d, mp *a, mp *b)
+mp *mpmont_mul(
const
mpmont *mm, mp *d, mp *a, mp *b)
{
size_t n = mm->n;
{
size_t n = mm->n;