X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/222c8a436f09da82e2ee7c84c7aca47d11a2c843..ffec48800022b6872951eca188d2ceedef8dd5c8:/mp.h diff --git a/mp.h b/mp.h index 74b6473..7f96746 100644 --- a/mp.h +++ b/mp.h @@ -975,6 +975,18 @@ extern int mp_jacobi(mp */*a*/, mp */*n*/); 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