In mathematics, a discrete logarithm is an integer k exponent solving the equation bk = g, where b and g are elements of a finite group. Discrete logarithms are thus the finite group-theoretic analogue of ordinary logarithms, which solve the same equation for real numbers b and g, where b is the base of the logarithm and g is the value whose logarithm is being taken.
No efficient general method for computing discrete logarithms on conventional computers is known. Several important algorithms in public-key cryptography base their security on the assumption that the discrete logarithm problem over carefully chosen groups has no efficient solution.
The powers of 10 form an infinite subset G = {..., 0.001, 0.01, 0.1, 1, 10, 100, 1000, ...} of the rational numbers. This set G is a cyclic group under multiplication, and 10 is a generator. For any element g of the group, one can compute log10g. For example, log10 10000 = 4, and log10 0.001 = -3. These are instances of the discrete logarithm problem.
Other base-10 logarithms in the real numbers are not instances of the discrete logarithm problem, because they involve non-integer exponents. For example, the equation log10 53 = 1.724276... means that 101.724276... = 53. While integer exponents can be defined in any group using products and inverses, non-integer exponents in the real numbers arise through quite a different mechanism — the exponential function.
One of the simplest settings for discrete logarithms is the group (Zp)×. This is the group of multiplication modulo the prime p. Its elements are congruence classes modulo p, and the group product of two elements may be obtained by ordinary integer multiplication of the elements followed by reduction modulo p.