liveBook · Manning

Multiplicative group

As explained in Hacking Cryptography

A multiplicative group modulo a prime consists of the nonzero residue classes under multiplication modulo that prime.

A multiplicative group modulo a prime p contains the nonzero residue classes 1 through p−1 under multiplication modulo p. In Z₁₃*, exponentiation cycles through these elements; a generator is a base whose powers visit every element exactly once. section 8.3.1

Table 8.1 Exponentiation table for multiplicative group modulo 13
Base \ Exponent (n) 0 1 2 3 4 5 6 7 8 9 10 11 12
\(1^n \bmod 13\) 1 1 1 1 1 1 1 1 1 1 1 1 1
\(2^n \bmod 13\) 1 2 4 8 3 6 12 11 9 5 10 7 1
\(3^n \bmod 13\) 1 3 9 1 3 9 1 3 9 1 3 9 1
\(4^n \bmod 13\) 1 4 3 12 9 10 1 4 3 12 9 10 1
\(5^n \bmod 13\) 1 5 12 8 1 5 12 8 1 5 12 8 1
\(6^n \bmod 13\) 1 6 10 8 9 2 12 7 3 5 4 11 1
\(7^n \bmod 13\) 1 7 10 5 9 11 12 6 3 8 4 2 1
\(8^n \bmod 13\) 1 8 12 5 1 8 12 5 1 8 12 5 1
\(9^n \bmod 13\) 1 9 3 1 9 3 1 9 3 1 9 3 1
\(10^n \bmod 13\) 1 10 9 12 3 4 1 10 9 12 3 4 1
\(11^n \bmod 13\) 1 11 4 5 3 7 12 2 9 8 6 10 1
\(12^n \bmod 13\) 1 12 1 12 1 12 1 12 1 12 1 12 1

The exponentiation table for modulo 13 makes generators visible: bases 2, 6, 7, and 11 each produce every nonzero residue exactly once across their powers. section 8.3.1

Exponentiating a known generator is straightforward, but reversing y = gⁿ mod p to recover n is the discrete logarithm problem. This asymmetry supports Diffie–Hellman key exchange and ElGamal encryption. section 8.3.1

How Hacking Cryptography covers it

How deep it goes
Defines generators, demonstrates exponentiation modulo 13, and stops at the discrete-logarithm formulation.
Examples
Uses the complete exponentiation table for Z₁₃* and identifies 2, 6, 7, and 11 as generators.
What it assumes
Assumes modular arithmetic while explaining group elements, generators, and exponentiation through a small prime modulus.
What you can do after
Evaluate modular exponentiation examples and understand why reversing them produces the discrete logarithm problem.
How it connects
Connects modular arithmetic, Fermat’s Little Theorem, discrete logarithms, Diffie–Hellman key exchange, and ElGamal encryption.

Also explained in

Compare how 2 books explain multiplicative group →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Hacking Cryptography. The section links point to the parts of the book it draws on.