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

Example

Compute Bob's public Diffie-Hellman value. Bob raises the shared base to his own secret exponent, modulo the shared prime, and publishes just that result. The secret exponent stays hidden because reversing this step means solving the discrete logarithm, thought to be intractable, while Alice can still fold his public value into her secret to derive the same shared key.

highlighted = computed this step

Step 1 — Set up

Set up the exact toy cryptography values.

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

Step 2 — Public key

Compute the highlighted cryptography value.

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