Definition (Order Modulo )

If , the order of modulo , denoted , is the smallest positive integer such that

By Euler’s theorem, such an exists whenever .

Theorem

If , then

In particular, the order divides any exponent that sends back to modulo .

Primitive Roots

An integer is a primitive root modulo if

If is prime and is a primitive root modulo , then

run through all nonzero residue classes modulo .

Discrete Logarithm

Fix a primitive root modulo a prime . For each nonzero residue class , there is a unique integer with such that

This exponent is the discrete logarithm of base , written

Computing discrete logarithms is believed to be hard in general.

Order of a Power

If , then

This is useful in the analysis of Elgamal and Diffie-Hellman.