Example
Find an inverse by trying residues.
highlighted = computed this step
Step 1 — Set up
Set up the exact toy cryptography values.
a, m(3, 7)
Step 2 — Trial 1
Compute the highlighted cryptography value.
x, ax, ax mod m(1, 3, 3)
Step 3 — Trial 2
Compute the highlighted cryptography value.
x, ax, ax mod m(2, 6, 6)
Step 4 — Trial 3
Compute the highlighted cryptography value.
x, ax, ax mod m(3, 9, 2)
Step 5 — Trial 4
Compute the highlighted cryptography value.
x, ax, ax mod m(4, 12, 5)
Step 6 — Trial 5
Compute the highlighted cryptography value.
x, ax, ax mod m(5, 15, 1)
Final Step — Inverse
Compute the highlighted cryptography value.
inverse5
cryptography
The values in this lesson are deliberately tiny so every modular arithmetic step can be checked exactly.