Trying to implement DH key exchange and symmetric key encryption for something like OTR-over the HTTP(s)