plutus-core-1.70.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Crypto.ExpMod

Synopsis

Documentation

expMod ∷ Integer → Integer → Natural → BuiltinResult Natural Source #

Modular exponentiation. This uses GHC.Num.integerPowMod#, which gives the wrong answer in some cases. TODO: we'll be able to remove some of the guards when/if integerPowMod# gets fixed.