Find d so ed is congruent to one modulo phi. This is toy arithmetic only, not deployable security.

cryptography The values in this lesson are deliberately tiny so every modular arithmetic step can be checked exactly.

Example

Find d so ed is congruent to one modulo phi.

highlighted = computed this step

Step 1 — Set up

Set up the exact toy cryptography values.

e, phi(3, 40)\begin{array}{c|c}\text{e, phi}&\text{(3, 40)}\end{array}

Step 2 — Candidate

Compute the highlighted cryptography value.

d27\begin{array}{c|c}\text{d}&\hlmath{\text{27}}\end{array}

Step 3 — Check

Compute the highlighted cryptography value.

ed mod phi1\begin{array}{c|c}\text{ed mod phi}&\hlmath{\text{1}}\end{array}