← Hall of Foundations Exhibit 149 · ⟨g⟩
The Grammar of Public-Key Cryptography

The vocabulary
everything shares

Groups, generators, order. These three words describe the structure half of modern cryptography quietly depends on. A group is a set with one well-behaved operation; a generator is an element whose repeated application reaches everything; the order is how many steps that takes.

The unifying abstraction. Diffie–Hellman's clock, elliptic-curve points, RSA's residues — these look different but are all groups. Learn the vocabulary once and every scheme reads the same.
§1

Generators and the ground they cover

Take the numbers 0 to n−1 with addition that wraps around — the group ℤ/nℤ. Pick a generator g and keep adding it to itself: g, 2g, 3g, … Some choices sweep through every element before returning to 0; others get trapped in a small sub-cycle. Watch which is which.

When ⟨g⟩ covers all n elements, g is a generator and the group is cyclic under it. Otherwise g reaches only a subgroup — and its order divides n (Lagrange's theorem, live).
§2

Why cryptographers care about order

The order of a generator is the size of the space a secret can hide in. Too small, and an attacker just enumerates it. Real schemes insist on generators of large prime order — hundreds of bits — precisely so the "keep adding g" walk has nowhere small to get trapped.

order of g = smallest k > 0 with k·g ≡ 0  (divides n)
Where this touches your keys

The discrete-log family, in one skeleton

ECDH walks a generator point around an elliptic-curve group. Diffie–Hellman walks a generator through residues mod a prime. Schnorr-style signatures live in prime-order groups by design. Once you see the generator and its order, every scheme in that family reads the same way.

The family has an edge, though, and it is worth knowing where it falls. The post-quantum standards are not built this way: ML-KEM and ML-DSA rest on lattice problems over polynomial rings, and hash-based signatures on nothing but a hash function. Those are rings and modules, not cyclic groups with a generator. That is not a footnote — it is the whole reason they survive a quantum computer, which breaks this exhibit's structure specifically.

Related: Modular Arithmetic is this exhibit's multiplicative cousin.