What
- Publicly transport a large prime number
p
and it’s primitive root g
- Alice chooses a secret
a
and compute A = g^a mod p
- Bob chooses a secret
b
and compute B = g^b mod p
- Publicly trnasport
A
and B
- Now Ab and Ba are the same after modp, this is the secret key.
Why
Eve only know ga and gb, to know gab we need to solve the Discrete Logarithm problem
Implementation