IntersectMBO / plutus

The Plutus language implementation and tools
Apache License 2.0
1.56k stars 473 forks source link

Modular exponentiation primitive #6154

Open kwxm opened 3 months ago

kwxm commented 3 months ago

CIP-0109 proposes a new modular exponentiation builtin for Plutus Core. This will calculate a^k mod n for integers a and k and a positive integer n (not necessarily prime) and it should fail if k<0 and a is not invertible modulo n (ie, when gcd(a,n) > 1).

We need to do the following.

bezirg commented 1 month ago