ABSTRACT

Let p be a prime and let a, b be integers that are nonzero mod p. Suppose we know that there exists an integer k such that

ak ≡ b (mod p).

The classical discrete logarithm problem is to find k. Since k + (p− 1) is also a solution, the answer k should be regarded as being defined mod p− 1, or mod a divisor d of p− 1 if ad ≡ 1 (mod p).