/* --- @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$%.
*/
-extern mp *mpmont_reduce(mpmont */*mm*/, mp */*d*/, mp */*a*/);
+extern mp *mpmont_reduce(const mpmont */*mm*/, mp */*d*/, mp */*a*/);
/* --- @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$%.
*/
-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@ --- *
*
- * 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
* 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@ --- *
*
- * 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
* 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@ --- *
*
- * 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
* 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@ --- *
*
- * 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
* 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 -------------------------------------------------*/