X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/7eaaecf58694345b4e40db9981c0c2ac0f728378..ffec48800022b6872951eca188d2ceedef8dd5c8:/tests/mp?ds=sidebyside diff --git a/tests/mp b/tests/mp index ab2e775..a7c5d50 100644 --- a/tests/mp +++ b/tests/mp @@ -223,6 +223,23 @@ modsqrt { 660864223630638896 1729533840094059799 671335997718840076; } +modexp { + + # --- Montgomery exponentiation --- + + 435365332435654643667 8745435676786567758678547 + 4325987397987458979875737589783 + 2439674515119108242643169132064; + 0xfffffffdfffffffffffffffffffffffe 0 0xfffffffdffffffffffffffffffffffff 1; + 1804289383 -8939035539979879765 8939489893434234331 6139425926295484741; + + # --- Barrett exponentiation --- + + 435365332435654643667 8745435676786567758678547 + 4325987397987458979875737589782 + 2425191520487853884024972777945; +} + factorial { 0 1; 1 1;