Example
Use Euclid's algorithm to find a greatest common divisor.
highlighted = computed this step
Step 1 — Set up
Set up the exact toy cryptography values.
a, b(84, 30)
Step 2 — Euclid row
Compute the highlighted cryptography value.
a, b, q, r(84, 30, 2, 24)
Step 3 — Euclid row
Compute the highlighted cryptography value.
a, b, q, r(30, 24, 1, 6)
Step 4 — Euclid row
Compute the highlighted cryptography value.
a, b, q, r(24, 6, 4, 0)
Final Step — GCD
Compute the highlighted cryptography value.
gcd6
cryptography
The values in this lesson are deliberately tiny so every modular arithmetic step can be checked exactly.