Well I implemented something very similar recently but using tcp rather than udp. In my case, alice creates a public-private key pair and sends public key to bob. Bob then encrypts randomly generated symmetric key (.e.g blowish, dsa or aes etc.) with public key and sends the result to alice. Alice then decrypts with her private key. Both alice and bob have knowledge of symmetric key which can then be used for secure communication.
A clear problem with this is a man-in-the-middle attack. There are functions built into the open ssl framework that allows you do create such keys manually. If that's what you need to do, I can give a more concrete ( albeit probably naive) example... Cheers, Ben. On 21 July 2010 15:02, Harshvir Sidhu <hvssi...@gmail.com> wrote: > Hi All, > I am trying to use encryption over Client/Server machines. My > requirement is that i have to use winsock UDP functions to send and receive > data. Is there some mechanism to perform key and cipher exchange in this > case, like normally SSL_Connect will do this, but in my case i cannot use > that. Is there some suggestion for this? > > // Harshvir > >