Hello!!
I am trying to implement Diffe-Hellman Key exchange protocol between Client and server. I am using openSSL dh.h library for that. The problem is how to send the publickey generated by DH_generate_key() function to client/server. My idea is to get the shared secret which I can use for further encryption of communication between client and server. I have followed the following steps 1. Generate the parameters uysing DH_generate_parameters() 2. DH_check() for checking the parameters generated. 3. Then to use DH_compute_key() I should be able to get the peer's public key. How can I get this? What is the private value DH_generate_key uses for generating public key? I dint find any sample programs for this problem. It would be great if anyone suggest some sample programs related to my above mentioned task!! Thanks and Regards, Yamini.