Diffie Hellman Protocol implementation in Python