Foundations of Blockchain
上QQ阅读APP看书,第一时间看更新

Discrete logarithm

A discrete logarithm is based on the modular arithmetic settings on a discrete logarithm where the solution is infeasible to find. The logarithm logba is a discrete logarithm that has the integer solution x so that bx = a. There is no efficient general method for finding the solution to a discrete logarithm. When modular arithmetic is used with a discrete logarithm, it's known as modular exponentiation, and this problem becomes really difficult. This problem is generally used with the Diffie-Hellman key exchange algorithm.

Let's consider an example of modular exponentiation:

33 mod 5 = 2

It is easy to find the result of the preceding function, which is 2, but it is difficult to find the exponent value 3 from the result. The preceding modulo operation can also be represented with a congruence as 33 ≅ 2 (mod 5).

Suppose a and b are two integers, and m is a positive integer. Then the phrase a ≅ b (mod m) is called congruence and is read as "a is congruent to b modulo m," which states that m divides a-b.