List powers of a public base modulo a prime. This is toy arithmetic only, not deployable security.

Example

List powers of a public base modulo a prime.

highlighted = computed this step

Step 1 — Set up

Set up the exact toy cryptography values.

p, public base g(23, 5)\begin{array}{c|c}\text{p, public base g}&\text{(23, 5)}\end{array}

Step 2 — Power 1

Compute the highlighted cryptography value.

k, g power k mod p(1, 5)\begin{array}{c|c}\text{k, g power k mod p}&\hlmath{\text{(1, 5)}}\end{array}

Step 3 — Power 2

Compute the highlighted cryptography value.

k, g power k mod p(2, 2)\begin{array}{c|c}\text{k, g power k mod p}&\hlmath{\text{(2, 2)}}\end{array}

Step 4 — Power 3

Compute the highlighted cryptography value.

k, g power k mod p(3, 10)\begin{array}{c|c}\text{k, g power k mod p}&\hlmath{\text{(3, 10)}}\end{array}

Step 5 — Power 4

Compute the highlighted cryptography value.

k, g power k mod p(4, 4)\begin{array}{c|c}\text{k, g power k mod p}&\hlmath{\text{(4, 4)}}\end{array}

Step 6 — Power 5

Compute the highlighted cryptography value.

k, g power k mod p(5, 20)\begin{array}{c|c}\text{k, g power k mod p}&\hlmath{\text{(5, 20)}}\end{array}

Step 7 — Power 6

Compute the highlighted cryptography value.

k, g power k mod p(6, 8)\begin{array}{c|c}\text{k, g power k mod p}&\hlmath{\text{(6, 8)}}\end{array}
cryptography The values in this lesson are deliberately tiny so every modular arithmetic step can be checked exactly.