Compute phi for a two-prime RSA modulus. This is toy arithmetic only, not deployable security.

Example

Compute phi for a two-prime RSA modulus.

highlighted = computed this step

Step 1 — Set up

Set up the exact toy cryptography values.

p, q(5, 11)\begin{array}{c|c}\text{p, q}&\text{(5, 11)}\end{array}

Step 2 — Factors

Compute the highlighted cryptography value.

p-1, q-1(4, 10)\begin{array}{c|c}\text{p-1, q-1}&\hlmath{\text{(4, 10)}}\end{array}

Step 3 — Totient

Compute the highlighted cryptography value.

phi40\begin{array}{c|c}\text{phi}&\hlmath{\text{40}}\end{array}
cryptography The values in this lesson are deliberately tiny so every modular arithmetic step can be checked exactly.