Alice
Eve sees
Bob
g = 5, p = 23
agreed in public
g = 5, p = 23
g = 5, p = 23
agreed in public
a =
4
secret
?
b =
3
secret
5
4
mod 23 =
4
sends A →
A = 4, B = 10
5
3
mod 23 =
10
← sends B
10
4
mod 23 = 18
shared secret
?
4
3
mod 23 = 18
shared secret
public
secret
Eve would need a or b: the discrete logarithm of 4 or 10.