* work if %$p$% is composite: you must factor the modulus, take
* a square root mod each factor, and recombine the results
* using the Chinese Remainder Theorem.
+ *
+ * We guarantee that the square root returned is the smallest
+ * one (i.e., the `positive' square root).
*/
extern mp *mp_modsqrt(mp */*d*/, mp */*a*/, mp */*p*/);
+/* --- @mp_modexp@ --- *
+ *
+ * Arguments: @mp *d@ = fake destination
+ * @mp *x@ = base of exponentiation
+ * @mp *e@ = exponent
+ * @mp *n@ = modulus (must be positive)
+ *
+ * Returns: The value %$x^e \bmod n$%.
+ */
+
+extern mp *mp_modexp(mp */*d*/, mp */*x*/, mp */*e*/, mp */*n*/);
+
/*----- Test harness support ----------------------------------------------*/
#include <mLib/testrig.h>