X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/222c8a436f09da82e2ee7c84c7aca47d11a2c843..45c0fd363937c6e9b05da04a9167e9912c05ca0c:/tests/mp diff --git a/tests/mp b/tests/mp index ab2e775..14d73b9 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;