~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
progs/perftest.c: Use from Glibc syscall numbers.
[catacomb]
/
math
/
mpmont.h
diff --git
a/math/mpmont.h
b/math/mpmont.h
index
b0c119a
..
cd1d399
100644
(file)
--- a/
math/mpmont.h
+++ b/
math/mpmont.h
@@
-126,29
+126,29
@@
extern 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
*
* Returns: Result, %$a R^{-1} \bmod m$%.
*/
* @mp *d@ = destination
* @mp *a@ = source, assumed positive
*
* Returns: Result, %$a R^{-1} \bmod m$%.
*/
-extern mp *mpmont_reduce(mpmont */*mm*/, mp */*d*/, mp */*a*/);
+extern mp *mpmont_reduce(
const
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
*
* Returns: Result, %$a b R^{-1} \bmod m$%.
*/
* @mp *d@ = destination
* @mp *a, *b@ = sources, assumed positive
*
* Returns: Result, %$a b R^{-1} \bmod m$%.
*/
-extern mp *mpmont_mul(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*b*/);
+extern mp *mpmont_mul(
const
mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*b*/);
/* --- @mpmont_expr@ --- *
*
/* --- @mpmont_expr@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * Arguments: @
const
mpmont *mm@ = pointer to Montgomery reduction context
* @mp *d@ = fake destination
* @mp *a@ = base
* @mp *e@ = exponent
* @mp *d@ = fake destination
* @mp *a@ = base
* @mp *e@ = exponent
@@
-157,11
+157,12
@@
extern mp *mpmont_mul(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*b*/);
* further modular arithmetic is to be performed on the result.
*/
* further modular arithmetic is to be performed on the result.
*/
-extern mp *mpmont_expr(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*e*/);
+extern mp *mpmont_expr(const mpmont */*mm*/, mp */*d*/,
+ mp */*a*/, mp */*e*/);
/* --- @mpmont_exp@ --- *
*
/* --- @mpmont_exp@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * Arguments: @
const
mpmont *mm@ = pointer to Montgomery reduction context
* @mp *d@ = fake destination
* @mp *a@ = base
* @mp *e@ = exponent
* @mp *d@ = fake destination
* @mp *a@ = base
* @mp *e@ = exponent
@@
-169,11
+170,11
@@
extern mp *mpmont_expr(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*e*/);
* Returns: Result, %$a^e \bmod m$%.
*/
* Returns: Result, %$a^e \bmod m$%.
*/
-extern mp *mpmont_exp(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*e*/);
+extern mp *mpmont_exp(
const
mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*e*/);
/* --- @mpmont_mexpr@ --- *
*
/* --- @mpmont_mexpr@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * Arguments: @
const
mpmont *mm@ = pointer to Montgomery reduction context
* @mp *d@ = fake destination
* @const mp_expfactor *f@ = pointer to array of factors
* @size_t n@ = number of factors supplied
* @mp *d@ = fake destination
* @const mp_expfactor *f@ = pointer to array of factors
* @size_t n@ = number of factors supplied
@@
-188,12
+189,12
@@
extern mp *mpmont_exp(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*e*/);
* except that the %$g_i$% and result are in Montgomery form.
*/
* except that the %$g_i$% and result are in Montgomery form.
*/
-extern mp *mpmont_mexpr(mpmont */*mm*/, mp */*d*/,
+extern mp *mpmont_mexpr(
const
mpmont */*mm*/, mp */*d*/,
const mp_expfactor */*f*/, size_t /*n*/);
/* --- @mpmont_mexp@ --- *
*
const mp_expfactor */*f*/, size_t /*n*/);
/* --- @mpmont_mexp@ --- *
*
- * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * Arguments: @
const
mpmont *mm@ = pointer to Montgomery reduction context
* @mp *d@ = fake destination
* @const mp_expfactor *f@ = pointer to array of factors
* @size_t n@ = number of factors supplied
* @mp *d@ = fake destination
* @const mp_expfactor *f@ = pointer to array of factors
* @size_t n@ = number of factors supplied
@@
-203,7
+204,7
@@
extern mp *mpmont_mexpr(mpmont */*mm*/, mp */*d*/,
* Use: Convenient interface over @mpmont_mexpr@.
*/
* Use: Convenient interface over @mpmont_mexpr@.
*/
-extern mp *mpmont_mexp(mpmont */*mm*/, mp */*d*/,
+extern mp *mpmont_mexp(
const
mpmont */*mm*/, mp */*d*/,
const mp_expfactor */*f*/, size_t /*n*/);
/*----- That's all, folks -------------------------------------------------*/
const mp_expfactor */*f*/, size_t /*n*/);
/*----- That's all, folks -------------------------------------------------*/