Performs the first step of a Diffie-Hellman key exchange by generating
private and public DH values based on given prime number $p and
generator $g. Both sides of key exchange MUST have the same prime number
and generator. In this case they will able to create a random shared
secret that is never send from one to the other.