Discrete Logarithm in : Pohlig-Hellman
17 Dec 2021
§ Motivation
For some cases of the discrete logarithm problem, , it is relatively easy to solve; for instance, when is "highly" composite, i.e. factorable by many small primes.
§ The Generalised Algorithm
Sps. we have an algorithm () to solve the discrete log over when has prime power order, and prime. The generalised Pohlig-Hellman algorithm is dependent on the existence of ().
About algorithm ():
- If using () on the discrete log described by , if for some , then suppose we can solve it in time.
- In the case where , then the value of can be expressed as , which means () can also be done in time.
- The algorithm exists and is described in Discrete Logarithm in : is a Prime Power.
Generalised Pohlig-Hellman
Given , and . Then, the discrete log can be solved using the Pohlig-Hellman algorithm:
-
For all , let
Use alg. () to compute a sol'n for in .
-
Using CRT, solve the following system of congruences:
The value of then satisfies .
The discrete log can be solved by Pohlig-Hellman in , assuming the complexity of () holds.
§ Computation
The Magma computational algebra system uses Pohlig-Hellman[1] for the discrete log over for . Using Magma, we can compute
with the following code:
// Replace g, h, p with values from the discrete log
F<x> := FiniteField(p);
// The value satisfying the discrete log is stored in the variable x.
x := Log(F ! g, F ! h);
§ Sketch of Proofs
Complexity
In step (1) of Pohlig-Hellman, we solve discrete logs using (); we assume that () is in . Then, the upper bound of the first step is .
In step (2) we solve a system of congruences using CRT. The CRT can be reduced into:
where satisfies . We compute $b_i$s with each taking , for all $b_i$s the time is .
Then, the total runtime is indeed .
Correctness
In step (2), by CRT satisfies all the congruences. Then, for some .
Then, we notice that , and that there exists satisfying
Finally,