[Download postscript version]
next up previous contents
Next: Encryption based on powers Up: Introduction to Number Theory Previous: Powers modulo a prime

Primitive roots

Theorem 5 showed that if p is a prime, there is an a such that the equation

displaymath1110

has a solution for any tex2html_wrap_inline1112 . Such an a is called a primitive root of p, and x is called the discrete logarithm of b.

We showed in subsection 4.2.3 that it is easy to obtain b given a and x. Finding x given a and b is much harder. Many modern encryption systems are based on the fact that no efficient way of computing discrete logarithms is known.

Neither an efficient method for always finding primitive roots is known. However, it is often possible to find one in special cases. We will use p=1223 as an example. tex2html_wrap_inline1136 . By Lemma 9, if a is not a primitive root, then we will either have tex2html_wrap_inline1140 , tex2html_wrap_inline1142 , or tex2html_wrap_inline1144 . a=2 and 3 fail, but a=5 satisfies all three conditions, so it is a primitive root. We could tell that a=4 would not be a primitive root without testing.

It is easy to show that, if a is a primitive root, tex2html_wrap_inline1154 is a primitive root if and only if (x,p-1)=1. In this example, this means the number of primitive roots is

displaymath1158

Thus, if we had just chosen a at random, the probability that it would be a primitive root is tex2html_wrap_inline1162 . Choosing a at random and testing until we found a primitive root would not be expected to take too long.

This is an example of a probabilistic algorithm. It is possible for it to take a long time, but the amount of time needed on average is reasonably small. We will see many other probabilistic algorithms later.



Adrian Perrig
Fri May 31 09:07:38 MET DST 1996