Finite-field Diffie-Hellman (FFDH) applies Diffie-Hellman to a finite field: the nonzero integers below a prime modulus, combined with modular multiplication. Zero is excluded because it has no multiplicative inverse. section 5.2.1
The underlying structure has several useful pieces:
- A group supplies closure, associativity, an identity element, and inverses. section 5.2.1
- Commutative modular multiplication makes the group a Galois group; the added operation of addition makes it a finite field. section 5.2.1
- A cyclic subgroup is generated by repeatedly multiplying a single base, and different subgroups can have different orders. section 5.2.1
A tiny subgroup modulo 5
Using 4 as a generator gives 4¹ mod 5 = 4, 4² mod 5 = 1, and then the sequence repeats: 4, 1, 4, 1. A modulo-5 clock gives the same intuition by wrapping after 4. section 5.2.1
Figure 5.5 The group of integers modulo the prime number 5 can be pictured as a clock that resets to 0 after the number 4. Thus 5 is represented as 0, 6 as 1, 7 as 2, 8 as 3, 9 as 4, 10 as 0, and so on.
Visualize modular arithmetic as a clock that resets after the prime modulus range. section 5.2.1
