Skip to content

Applications of Abstract Algebra

In this lesson you’ll see the section’s machinery put to work: how Diffie-Hellman and RSA rest on group theory, how error-correcting codes use cosets of a subgroup, and how a statement about one group of order 60 proves that no quintic formula can exist.

Two parties who have never met need a shared secret, over a channel someone is listening to. Published in 1976, this was the result that made public-key cryptography possible.

The group is U(p)U(p) for a large prime pp, which is cyclic of order p1p-1. The protocol:

  1. Agree publicly on pp and a generator gg.
  2. Alice picks a secret aa and sends gamodpg^a \bmod p. Bob picks bb and sends gbmodpg^b \bmod p.
  3. Alice computes (gb)a(g^b)^a and Bob computes (ga)b(g^a)^b. Both equal gabg^{ab}.

The shared secret is never transmitted. Correctness is just the exponent law (gb)a=gab=(ga)b(g^b)^a = g^{ab} = (g^a)^b, which holds because exponents add commutatively.

Security rests on the discrete logarithm problem: given gg and gag^a in a large group, recover aa. Computing gag^a takes about loga\log a multiplications by repeated squaring, while the best known general attacks on the reverse direction take time exponential in the bit length. The gap between those two costs is the entire security argument.

Two things must hold for the group to be usable. It must be cyclic with a known large prime order (otherwise the search space fractures into small pieces and the Pohlig–Hellman attack applies). And the group operation must be cheap. Using (Zn,+)(\mathbb{Z}_n, +) fails badly, because “discrete log” there is just division: from agmodna \cdot g \bmod n you recover aa by multiplying by g1g^{-1}. The group being isomorphic to a hard one is irrelevant if the isomorphism is easy to compute.

RSA (1977) works in the ring Zn\mathbb{Z}_n with n=pqn = pq for two large primes.

  1. Compute φ(n)=(p1)(q1)\varphi(n) = (p-1)(q-1).
  2. Pick ee coprime to φ(n)\varphi(n); publish (n,e)(n, e).
  3. Compute dd with ed1(modφ(n))ed \equiv 1 \pmod{\varphi(n)}; keep dd secret.
  4. Encrypt with c=memodnc = m^e \bmod n, decrypt with m=cdmodnm = c^d \bmod n.

Why decryption works: ed=1+kφ(n)ed = 1 + k\varphi(n), so

cd=med=m1+kφ(n)=m(mφ(n))km1k=mc^d = m^{ed} = m^{1 + k\varphi(n)} = m \cdot \left(m^{\varphi(n)}\right)^k \equiv m \cdot 1^k = m

using Euler’s theorem mφ(n)1(modn)m^{\varphi(n)} \equiv 1 \pmod n, which is Lagrange’s theorem applied to the group U(n)U(n).

Security rests on factoring: knowing φ(n)\varphi(n) requires knowing pp and qq. Note the whole thing runs inside the unit group U(n)U(n), and the security hypothesis is about a computational problem, not about group structure.

A linear code of length nn over F2\mathbb{F}_2 is a subgroup C(F2n,+)C \le (\mathbb{F}_2^n, +). Valid codewords are closed under bitwise XOR and include the all-zeros word - precisely the subgroup conditions.

Transmission adds an error vector: you receive r=c+er = c + e. Since rr and cc differ by an element of… no, wait: rc=er - c = e, and rr lies in the coset c+Cc + C only if eCe \in C. In general rr lies in the coset e+Ce + C, and the coset identifies the error pattern.

Decoding therefore means: find which coset of CC the received word lies in, then subtract that coset’s most likely error, called the coset leader. This is standard-array decoding, and by Lagrange there are exactly 2n/C2^n / |C| cosets to distinguish.

The Hamming code with n=7n = 7 and C=16|C| = 16 has 128/16=8128/16 = 8 cosets: one for “no error” and seven for “error in bit ii.” So it corrects any single-bit error, and the count of cosets is exactly why.

Reed–Solomon codes push this further using finite fields. Data become coefficients of a polynomial over GF(256)GF(256), and the codeword is that polynomial evaluated at many points. Any sufficiently large subset of the values determines the polynomial, so lost values can be reconstructed. This is why a scratched CD still plays and why a partly obscured QR code still scans.

This is the question the whole subject grew from, and the answer is a group-theoretic one.

Every polynomial has a Galois group: the automorphisms of its splitting field that fix the base field, which permute the roots. Solving by radicals means building the roots in a tower of extensions, each obtained by adjoining an nn-th root.

Galois’s theorem translates that tower into a group condition. A polynomial is solvable by radicals exactly when its Galois group is solvable, meaning there is a chain

{e}=G0G1Gk=G\{e\} = G_0 \trianglelefteq G_1 \trianglelefteq \dots \trianglelefteq G_k = G

with each quotient Gi+1/GiG_{i+1}/G_i abelian. Adjoining a root corresponds to one abelian step.

For degrees up to 4, the Galois groups are small enough that such chains always exist, which is why the quadratic, cubic and quartic formulas are possible.

The generic quintic has Galois group S5S_5, of order 120. Inside it sits A5A_5, of order 60, and A5A_5 is simple: its only normal subgroups are the trivial ones. A simple non-abelian group admits no chain of abelian quotients, so S5S_5 is not solvable.

Therefore no formula in radicals can express the roots of a general quintic. Not undiscovered - impossible.

The specific polynomial x5x1x^5 - x - 1 has Galois group S5S_5, so its roots provably cannot be written with radicals, even though it plainly has five of them and they can be computed numerically to any precision you like.

Noether’s theorem (1918) states that every continuous symmetry of a physical system corresponds to a conserved quantity:

  • Time-translation symmetry \to conservation of energy
  • Space-translation symmetry \to conservation of momentum
  • Rotational symmetry \to conservation of angular momentum

Conservation of energy is not a separate law of nature; it is a consequence of physics being the same today as yesterday. The Standard Model is specified by naming its symmetry group SU(3)×SU(2)×U(1)SU(3) \times SU(2) \times U(1), and the particles are labels for how that group acts.

Example 1: Run Diffie-Hellman by hand.

Use p=23p = 23, g=5g = 5, Alice’s secret a=6a = 6, Bob’s b=15b = 15.

Solution. Repeated squaring keeps the numbers small.

52=2525^2 = 25 \equiv 2, so 53105^3 \equiv 10, and 56=(53)210085^6 = (5^3)^2 \equiv 100 \equiv 8. Alice sends A=8A = 8.

55=5352102=205^5 = 5^3 \cdot 5^2 \equiv 10 \cdot 2 = 20; 510202=40095^{10} \equiv 20^2 = 400 \equiv 9; 515920=180195^{15} \equiv 9 \cdot 20 = 180 \equiv 19. Bob sends B=19B = 19.

Shared secret: gab=590g^{ab} = 5^{90}. Since U(23)=22|U(23)| = 22 and 55 is a generator, 52215^{22} \equiv 1, and 902(mod22)90 \equiv 2 \pmod{22}, so

59052=252(mod23)5^{90} \equiv 5^2 = 25 \equiv 2 \pmod{23}

Both parties get 2. Note the shortcut used Lagrange’s theorem to reduce the exponent mod the group order.

Example 2: RSA with small numbers.

p=5p = 5, q=11q = 11, e=3e = 3. Find dd and encrypt m=9m = 9.

Solution. n=55n = 55 and φ(n)=410=40\varphi(n) = 4 \cdot 10 = 40.

gcd(3,40)=1\gcd(3, 40) = 1 ✓. Find dd with 3d1(mod40)3d \equiv 1 \pmod{40}: 327=81=240+13 \cdot 27 = 81 = 2\cdot40 + 1, so d=27d = 27.

Encrypt: c=93=729mod55c = 9^3 = 729 \bmod 55. Since 5513=71555 \cdot 13 = 715, c=14c = 14.

Decrypt: 1427mod5514^{27} \bmod 55. Work smart - 142=1963114^2 = 196 \equiv 31, 144312=9612614^4 \equiv 31^2 = 961 \equiv 26, 148262=6761614^8 \equiv 26^2 = 676 \equiv 16, 1416162=2563614^{16} \equiv 16^2 = 256 \equiv 36.

27=16+8+2+127 = 16 + 8 + 2 + 1:

14273616311414^{27} \equiv 36 \cdot 16 \cdot 31 \cdot 14

3616=5762636 \cdot 16 = 576 \equiv 26; 2631=8063626 \cdot 31 = 806 \equiv 36 (since 5514=77055\cdot14 = 770); 3614=504936 \cdot 14 = 504 \equiv 9 (since 559=49555 \cdot 9 = 495).

Recovered m=9m = 9

Example 3: Why (Zn,+)(\mathbb{Z}_n, +) is useless for Diffie-Hellman.

Solution. In additive notation, “exponentiation” is agmodna \cdot g \bmod n. Given gg and h=agh = ag, an attacker with gcd(g,n)=1\gcd(g,n)=1 computes

ahg1(modn)a \equiv h g^{-1} \pmod n

using the extended Euclidean algorithm - a few dozen operations even for enormous nn.

So the discrete log is trivial here. Being isomorphic to a group with a hard discrete log does not help, because the isomorphism itself is easy to compute. This is the sharpest possible illustration that isomorphism preserves structure and not computational difficulty.

Example 4: Coset decoding.

A code CF24C \le \mathbb{F}_2^4 is {0000,1111}\{0000, 1111\}. Decode the received word 11011101.

Solution. C=2|C| = 2, so by Lagrange there are 16/2=816/2 = 8 cosets, each of size 2.

The coset of 11011101 is

1101+C={1101, 1101+1111}={1101, 0010}1101 + C = \{1101,\ 1101 + 1111\} = \{1101,\ 0010\}

The coset leader is the lower-weight member, 00100010: a single bit flipped, in position 3.

Correcting: 11010010=1101+0010=11111101 - 0010 = 1101 + 0010 = 1111.

Decoded as 11111111. This is the repetition code, and it corrects any single error, because every weight-1 vector sits in a different coset.

Example 5: The order of A5A_5 and why it matters.

Solution. A5=5!/2=60|A_5| = 5!/2 = 60.

A5A_5 is simple: it has no normal subgroup other than {e}\{e\} and itself. One route to this is a conjugacy-class count - the class sizes in A5A_5 are 1, 15, 20, 12, 12, and any normal subgroup is a union of classes including the identity whose total divides 60. The only subsets of {1,15,20,12,12}\{1,15,20,12,12\} containing the 1 that sum to a divisor of 60 are {1}\{1\} and all of them.

Since a solvable group needs a chain with abelian quotients, and a simple non-abelian group offers no proper normal subgroup to start such a chain, A5A_5 is not solvable. Neither is S5S_5, which contains it as a normal subgroup with quotient Z2\mathbb{Z}_2.

Hence the general quintic is unsolvable by radicals.

Example 6: Arithmetic in the AES field.

GF(4) multiplication, a miniature of the GF(256) arithmetic inside AES
× 0 1 a a+1
0 0 0 0 0
1 0 1 a a+1
a 0 a a+1 1
a+1 0 a+1 1 a

Every nonzero element has an inverse, which is what the AES S-box computes. Real AES uses GF(2⁸) so that one field element is exactly one byte.

Identity: 1. Cells holding it mark inverse pairs.

Solution. The AES S-box is essentially xx1x \mapsto x^{-1} in GF(28)GF(2^8), followed by an affine map. Inversion is chosen because it is highly nonlinear, which is what resists linear and differential cryptanalysis.

In the miniature above, a1=a+1a^{-1} = a+1 and (a+1)1=a(a+1)^{-1} = a, while 11=11^{-1} = 1 and 00 has no inverse (the standard defines 000 \mapsto 0 as a special case).

Every HTTPS connection. The TLS handshake performs an elliptic-curve Diffie-Hellman exchange, so the group theory in this section runs billions of times a day. Perfect forward secrecy comes from using fresh secrets per session, meaning a later key compromise cannot decrypt past traffic.

QR codes and storage. Reed–Solomon over GF(256)GF(256) lets a QR code survive roughly 30% damage, and the same codes protect CDs, DVDs, Blu-ray discs and RAID 6 arrays. The Voyager probes’ images crossed the solar system inside these codes.

Cell networks and Wi-Fi. LTE and 5G use LDPC and polar codes; Wi-Fi uses convolutional and LDPC codes. All are built on linear algebra over finite fields, and the coset picture is what decoders implement.

Bitcoin and blockchains. Bitcoin signs transactions with ECDSA on the curve secp256k1 over a 256-bit prime field. An address is derived from a public key that is a point in a group of prime order; the security assumption is the elliptic-curve discrete logarithm.

Chemistry and drug design. Molecular symmetry groups determine spectra and whether a molecule is chiral. Thalidomide’s two mirror-image forms had drastically different effects, which is a group-theoretic distinction with serious consequences.

Rubik’s cube. God’s number is 20, proved in 2010 by partitioning the cube group into about two billion cosets of a large subgroup and searching each. The coset decomposition made an otherwise impossible search tractable.

What problem must be hard for Diffie-Hellman to be secure?
Which theorem makes RSA decryption return the original message?
In coding theory, what does a coset of the code represent?
Why is there no general formula in radicals for the quintic?
Why is (ℤₙ, +) unsuitable for Diffie-Hellman, despite being a group?
What does Noether's theorem connect?