1 Definition of Primitive Roots
For a positive integer n, an integer g with ordn(g)=φ(n) is called a primitive root modulo n. When such a g exists, (Z/nZ)∗ is a cyclic group generated by gˉ.
2 Cyclicity of(Z/pZ)∗
A polynomial of degree d over a field F has at most d roots.
By induction on d. The case d=0 is clear. For d≥1, if a is a root, then f(x)=(x−a)g(x) with degg=d−1, so f has at most 1+(d−1)=d roots. □
For every prime p, (Z/pZ)∗ is a cyclic group of order p−1.
The group (Z/pZ)∗ is a finite abelian group of order p−1. For each positive divisor d of p−1, set ψ(d)=∣{a∈(Z/pZ)∗∣ord(a)=d}∣. If an element a of order d exists, then 1,a,a2,…,ad−1 are d roots of xd−1=0. Over a field, a degree-d polynomial has at most d roots, so these are the only elements whose order divides d. Among them, exactly φ(d) have order precisely d. Thus ψ(d)∈{0,φ(d)} for each d∣(p−1).On the other hand, ∑d∣(p−1)ψ(d)=p−1=∑d∣(p−1)φ(d) (the latter being a standard identity for the totient function). It follows that ψ(d)=φ(d) for every d∣(p−1). In particular, ψ(p−1)=φ(p−1)≥1, so elements of order p−1 exist. □
The number of primitive roots modulo p is φ(p−1).
3 The Index (Discrete Logarithm)
Let g be a primitive root modulo n and gcd(a,n)=1. The unique non-negative integer k with 0≤k<φ(n) satisfying gk≡a(modn) is called the index (or discrete logarithm) of a with respect to g, and is written indg(a).
For a primitive root g modulo n:
indg(ab)≡indg(a)+indg(b)(modφ(n)).
indg(ak)≡k⋅indg(a)(modφ(n)).
ordn(a)=φ(n)/gcd(indg(a),φ(n)).
(1) From gindg(a)≡a and gindg(b)≡b, we get gindg(a)+indg(b)≡ab≡gindg(ab)(modn). Since g has order φ(n), the exponents agree modulo φ(n). (2) Follows by repeated application of (1). (3) The equation ak≡1 is equivalent to k⋅indg(a)≡0(modφ(n)), and the smallest positive k satisfying this is φ(n)/gcd(indg(a),φ(n)). □
4 Structure of(Z/pkZ)∗
For an odd prime p and a positive integer k, (Z/pkZ)∗ is a cyclic group of order φ(pk)=pk−1(p−1). In particular, primitive roots exist modulo pk.
5 The Discrete Logarithm Problem
Let g be a primitive root modulo a prime p and let h∈(Z/pZ)∗. The problem of finding x such that gx≡h(modp) is called the discrete logarithm problem.