- Pohlig–Hellman algorithm
In mathematics, the Pohlig–Hellman algorithm is an
algorithm for the computation ofdiscrete logarithm s in amultiplicative group whose order is asmooth integer . The algorithm is based on theChinese remainder theorem .The algorithm was discovered by Roland Silver, but first published by
Stephen Pohlig andMartin Hellman (independent of Silver).We will explain the algorithm in terms of the group formed by taking all the elements of Zp which are
coprime to p, and leave it to the advanced reader to extend the algorithm to other groups by using Lagrange's Theorem.:Input Integers "p", "g", "e".:Output Integer "x", such that "e ≡ gx (mod p)".
:#Determine the prime factorization and
totient of the order of the group :
:#From theremainder theorem we know that "x = a1 p1 + b1". We now find the value of "b1" for which the following equation holds using a fast algorithm such asBaby-step giant-step :
(usingEuler's theorem )
Note that if then the order of "g" is less than φ("p") and must be 1 for a solution to exist. In this case there will be more than one solution for "x" less than φ("p"), but since we are not looking for the whole set, we can require that "b"1=0.
The same operation is now performed for "p2" up to "pn".
A minor modification is needed where a prime number is repeated. Suppose we are seeing "pi" for the "k+1"-th time. Then we already know "ci" in the equation "x = ai pik+1 + bi pik+ci", and we find "bi" the same way as before.:#We end up with enough simultaneouscongruence s so that "x" can be solved using theChinese remainder theorem .Complexity
The time complexity of the Pohlig–Hellman algorithm is for a group of order "n", but it is more efficient if the order is smooth.
=References=
#S. Pohlig and M. Hellman. " [http://www.dtc.umn.edu/~odlyzko/doc/arch/discrete.logs.pdf An Improved Algorithm for Computing Logarithms over GF(p) and its Cryptographic Significance] ", "IEEE Transactions on Information Theory" 24 (1978), pp. 106–110.
Wikimedia Foundation. 2010.