Compute Alice's public Diffie-Hellman value. This is toy arithmetic only, not deployable security.

Example

Compute Alice's public Diffie-Hellman value. Alice raises the shared base to her secret exponent, modulo the shared prime, and sends only the result. This can travel in the open because recovering her secret from it would require solving the discrete logarithm, which is believed hard, yet Bob can still combine it with his own secret to reach the shared key.

highlighted = computed this step

Step 1 — Set up

Set up the exact toy cryptography values.

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

Step 2 — Public key

Compute the highlighted cryptography value.

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