A general logarithm is the inverse function of an exponential function, representing the power to which a fixed base must be raised to obtain a given number. That is, it refers to the value that satisfies .

A discrete logarithm has the same form as a general logarithm but is defined in the discrete algebraic structure of group theory. The simplest form of a discrete logarithm is defined in . Let’s consider the set , which is closed under multiplication modulo a prime number . Given an element and in , the discrete logarithm problem (DLP) is to find such that , i.e., to compute .

When the prime is sufficiently large, it is easy to compute from and , but it is difficult to find from and . Cryptographic systems such as ElGamal and Diffie-Hellman exploit this property.