TheoremComplete

Primitive Roots - Applications

Primitive roots enable powerful applications in cryptography, pseudorandom number generation, and solving higher-degree congruences. The discrete logarithm problem, based on primitive roots, forms the security foundation for many cryptographic protocols.

TheoremDiscrete Logarithm Problem

Given a prime pp, a primitive root gg modulo pp, and an element a(Z/pZ)a \in (\mathbb{Z}/p\mathbb{Z})^*, the discrete logarithm problem (DLP) is to find the index xx such that: gxa(modp)g^x \equiv a \pmod{p}

No polynomial-time algorithm is known for solving DLP in general, making it cryptographically useful.

The presumed hardness of DLP underpins Diffie-Hellman key exchange, ElGamal encryption, and the Digital Signature Algorithm (DSA).

ExampleDiscrete Logarithm

Find xx such that 2x7(mod11)2^x \equiv 7 \pmod{11}, where 22 is a primitive root modulo 1111.

From our index table: ind2(7)=7\text{ind}_2(7) = 7, so x=7x = 7.

Verify: 27=128=1111+77(mod11)2^7 = 128 = 11 \cdot 11 + 7 \equiv 7 \pmod{11}. ✓

For large primes (hundreds of digits), computing such logarithms is computationally infeasible with current algorithms.

TheoremDiffie-Hellman Key Exchange

Alice and Bob agree on a large prime pp and a primitive root gg modulo pp (public).

  1. Alice chooses secret aa, sends A=gamodpA = g^a \bmod p to Bob
  2. Bob chooses secret bb, sends B=gbmodpB = g^b \bmod p to Alice
  3. Alice computes K=Ba=gabmodpK = B^a = g^{ab} \bmod p
  4. Bob computes K=Ab=gabmodpK = A^b = g^{ab} \bmod p

Both arrive at the same shared secret K=gabK = g^{ab}. An eavesdropper seeing gag^a and gbg^b must solve DLP to find aa or bb.

ExampleDiffie-Hellman Example

Use p=23,g=5p = 23, g = 5 (primitive root modulo 2323).

Alice chooses a=6a = 6: A=56=156258(mod23)A = 5^6 = 15625 \equiv 8 \pmod{23} Bob chooses b=15b = 15: B=515(mod23)B = 5^{15} \pmod{23}

Computing BB: 515=51154(1)4=419(mod23)5^{15} = 5^{11} \cdot 5^4 \equiv (-1) \cdot 4 = -4 \equiv 19 \pmod{23}

Shared secret:

  • Alice: K=196(mod23)K = 19^6 \pmod{23}
  • Bob: K=815(mod23)K = 8^{15} \pmod{23}

Both compute to the same value K=590(mod23)K = 5^{90} \pmod{23}.

TheoremArtin's Conjecture on Primitive Roots

Let a>1a > 1 be an integer that is not a perfect power. Artin conjectured that there are infinitely many primes pp for which aa is a primitive root modulo pp.

Moreover, the density of such primes among all primes is conjectured to be a computable constant A(a)A(a) (Artin's constant 0.3739\approx 0.3739 when aa is not a perfect square).

While still technically open, Artin's conjecture has been proven conditionally on the generalized Riemann hypothesis.

ExampleSmall Primitive Roots

The integer 22 is a primitive root for primes: p{3,5,11,13,19,29,37,53,59,61,67,83,}p \in \{3, 5, 11, 13, 19, 29, 37, 53, 59, 61, 67, 83, \ldots\}

The integer 33 is a primitive root for primes: p{2,5,7,17,19,29,31,43,53,79,}p \in \{2, 5, 7, 17, 19, 29, 31, 43, 53, 79, \ldots\}

Artin predicts that about 37.39%37.39\% of primes have 22 as a primitive root.

TheoremOrder and Polynomial Congruences

Using primitive roots, polynomial congruences f(x)0(modp)f(x) \equiv 0 \pmod{p} can be transformed. For instance, to solve xna(modp)x^n \equiv a \pmod{p}:

Let gg be a primitive root. Write x=gyx = g^y and a=gba = g^b where b=indg(a)b = \text{ind}_g(a). Then: gnygb(modp)    nyb(modp1)g^{ny} \equiv g^b \pmod{p} \implies ny \equiv b \pmod{p-1}

This linear congruence has gcd(n,p1)\gcd(n, p-1) solutions when gcd(n,p1)b\gcd(n, p-1) \mid b.

ExampleSolving $x^3 \equiv 2 \pmod{7}$

With g=3g = 3 (primitive root modulo 77), write x=3yx = 3^y and 2=322 = 3^2: 33y32(mod7)    3y2(mod6)3^{3y} \equiv 3^2 \pmod{7} \implies 3y \equiv 2 \pmod{6}

Since gcd(3,6)=3\gcd(3, 6) = 3 and 323 \nmid 2, there are no solutions.

Indeed, testing: 13=1,23=81,33=276,43=641,53=1256,63=2166(mod7)1^3 = 1, 2^3 = 8 \equiv 1, 3^3 = 27 \equiv 6, 4^3 = 64 \equiv 1, 5^3 = 125 \equiv 6, 6^3 = 216 \equiv 6 \pmod{7}.

No cube equals 22 modulo 77.

Remark

Primitive roots provide both theoretical insights and practical algorithms. They bridge classical number theory with modern cryptography, demonstrating how ancient mathematical concepts find new life in digital security.

These applications show how primitive roots transform abstract group theory into concrete computational tools with real-world impact.