Copyright | (c) 2018 Bhavik Mehta |
---|---|
License | MIT |
Maintainer | Andrew Lelechenko <andrew.lelechenko@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- discreteLogarithm :: KnownNat m => PrimitiveRoot m -> MultMod m -> Natural
Documentation
discreteLogarithm :: KnownNat m => PrimitiveRoot m -> MultMod m -> Natural Source #
Computes the discrete logarithm. Currently uses a combination of the baby-step giant-step method and Pollard's rho algorithm, with Bach reduction.