Loading…
Loading…
Mod 7, take the number 3 and raise it to successive powers: 3¹ = 3, 3² = 2, 3³ = 6, 3⁴ = 4, 3⁵ = 5, 3⁶ = 1. Every nonzero residue from 1 to 6 appears — in a single cycle. The number 3 'generates' the entire multiplicative group mod 7. Such a number is a primitive root, and it turns out to be the key that powers Diffie-Hellman key exchange and discrete-log cryptography.