Discrete Logarithms
Discrete Logarithms
By Nihal Jayachandran
2K20/CO/297
PRE-REQUISITES
1. CONGRUENCE MODULO
2. PRIMITIVE ROOTS
CONGRUENCE MODULO
● Congruence is an equivalence relation operation under modular arithmetic.
● It states that if given an integer n > 1, called a modulus, two integers a and b are said to be
congruent modulo n, if n is a divisor of their difference.
So there should be an integer k such that a − b = kn.
● That is an integer g is a primitive root of (mod n) if for every number relatively prime to n
there is an integer z such that
● Here, for every value of 1<=z<=(n-1) a distinct 𝛼 should be the resultant such that
1<=𝛼 <=(n-1)
● The number z is then called the discrete logarithm of a with respect to the base g modulo
n and can be denoted as: z = indg a (mod n) OR z = logg(𝛼).
● The reason it is called discrete logarithm is because its definition is analogous to that of
the usual logarithm.
● a ≡ g^z (mod m) is equivalent to logg(a) ≡ z (mod k), where k is the order of g modulo m.
logb(y) = x is equivalent to y = b^x.)
DISCRETE LOGARITHM PROBLEM
Question: Find the discrete logarithms of each unit modulo 11 to the base 2.
Solution: Since 2 is a primitive root modulo 11, we can write each unit as a power of
2. The simplest way to do this is, is to compute each of the values 2^0, 2^1, ... ,
2^10 modulo 11. The table of results is as follows:
Here, for example, 3 · 6 ≡ 7 (mod 11), and log2(3)+log2(6) ≡ log2(7) (mod 10), since
10 is the order of 2 modulo 11.
DISCRETE LOGARITHM PROBLEM
Question: Calculate k in the equation 3^k ≡ 13 (mod 17) in the group (Z17)*.
Solution: By doing the table similar to the last question we find that k=4.
Thus, the equation has infinitely many solutions of the form 4 + 16n, where
-∞<=n<∞
DISCRETE LOGARITHM PROBLEM
Question: Suppose G = (Z5641)*. Then Calculate log337 in G.
As it can be seen it is very complex to find the discrete logarithm in this case using
the aforementioned tabular method. It is a known fact that for large prime numbers
it is in general very difficult to compute discrete logarithms using any method or
algorithms that are currently available.
DISCRETE LOGARITHM APPLICATION
● However, given 𝛼, g, and n, it is, in general, very difficult to calculate z . The difficulty
seems to be on the same order of magnitude as that of factoring primes required for RSA.
● In fact there does not exist a polynomial time algorithm to solve the Discrete Logarithm
Problem and the fastest known algorithm works in exponential time.