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)
Step 2 — Public key
Compute the highlighted cryptography value.
B19
cryptography
The values in this lesson are deliberately tiny so every modular arithmetic step can be checked exactly.