+/* --- @mpmont_destroy@ --- *
+ *
+ * Arguments: @mpmont *mm@ = pointer to a Montgomery reduction context
+ *
+ * Returns: ---
+ *
+ * Use: Disposes of a context when it's no longer of any use to
+ * anyone.
+ */
+
+extern void mpmont_destroy(mpmont */*mm*/);
+
+/* --- @mpmont_reduce@ --- *
+ *
+ * Arguments: @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*/);
+
+/* --- @mpmont_mul@ --- *
+ *
+ * Arguments: @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*/);
+
+/* --- @mpmont_expr@ --- *
+ *
+ * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * @mp *d@ = fake destination
+ * @mp *a@ = base
+ * @mp *e@ = exponent
+ *
+ * Returns: Result, %$(a R^{-1})^e R \bmod m$%. This is useful if
+ * further modular arithmetic is to be performed on the result.
+ */
+
+extern mp *mpmont_expr(mpmont */*mm*/, mp */*d*/, mp */*a*/, mp */*e*/);
+
+/* --- @mpmont_exp@ --- *
+ *
+ * Arguments: @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*/);
+
+/* --- @mpmont_mexpr@ --- *
+ *
+ * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * @mp *d@ = fake destination
+ * @mp_expfactor *f@ = pointer to array of factors
+ * @size_t n@ = number of factors supplied
+ *
+ * Returns: If the bases are %$g_0, g_1, \ldots, g_{n-1}$% and the
+ * exponents are %$e_0, e_1, \ldots, e_{n-1}$% then the result
+ * is:
+ *
+ * %$g_0^{e_0} g_1^{e_1} \ldots g_{n-1}^{e_{n-1}} \bmod m$%
+ *
+ *
+ * except that the %$g_i$% and result are in Montgomery form.
+ */
+
+extern mp *mpmont_mexpr(mpmont */*mm*/, mp */*d*/,
+ mp_expfactor */*f*/, size_t /*n*/);
+
+/* --- @mpmont_mexp@ --- *
+ *
+ * Arguments: @mpmont *mm@ = pointer to Montgomery reduction context
+ * @mp *d@ = fake destination
+ * @mp_expfactor *f@ = pointer to array of factors
+ * @size_t n@ = number of factors supplied
+ *
+ * Returns: Product of bases raised to exponents, all mod @m@.
+ *
+ * Use: Convenient interface over @mpmont_mexpr@.
+ */
+
+extern mp *mpmont_mexp(mpmont */*mm*/, mp */*d*/,
+ mp_expfactor */*f*/, size_t /*n*/);
+