plutus-core
Safe HaskellNone
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.