move diffie-hellman key exchange to misc/crypto