arithmoi-0.9.0.0: Efficient basic number-theoretic functions.

Copyright(c) 2018 Bhavik Mehta
LicenseMIT
MaintainerAndrew Lelechenko <andrew.lelechenko@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Math.NumberTheory.Moduli.DiscreteLogarithm

Description

 
Synopsis

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.