diff options
author | mbkma <[email protected]> | 2020-04-08 01:11:48 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-08 01:11:48 +0200 |
commit | 8bdf0d013359d295e7b26b46d553c9525d7ed0cb (patch) | |
tree | 96235fd9d2df5736553ecc884a9f1b0050ae2365 /src/mp.h | |
parent | 2e5b3891e485237a7860a84b141a770b0a867ea1 (diff) | |
download | mate-calc-8bdf0d013359d295e7b26b46d553c9525d7ed0cb.tar.bz2 mate-calc-8bdf0d013359d295e7b26b46d553c9525d7ed0cb.tar.xz |
Add modular exponentiation ability and add acccording tests
Diffstat (limited to 'src/mp.h')
-rw-r--r-- | src/mp.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -204,6 +204,9 @@ void mp_factorial(const MPNumber *x, MPNumber *z); /* Sets z = x mod y */ void mp_modulus_divide(const MPNumber *x, const MPNumber *y, MPNumber *z); +/* Sets z = x ^ y mod p */ +void mp_modular_exponentiation(const MPNumber *x, const MPNumber *y, const MPNumber *p, MPNumber *z); + /* Sets z = x^y */ void mp_xpowy(const MPNumber *x, const MPNumber *y, MPNumber *z); |