Hi!

>  I am starting a project that will require using SSL to transmit data in an 
> encrypted mode. I would like
> to find some simple code that I could use as a model for my program. The 
> program will be a peer to peer
> communication using the same code at each end, an SSL Agent. I want to use 
> "One Time" RSA
> authentication method, That means that for each connection, generate an RSA 
> key before starting the
> connection and use it just once. I have the "Socket" code already, I just 
> need the SSL calls/protocol.

I too developed something similar to this.  I used the Network
Security with OpenSSL book pretty extensively to develop a p2p app
that uses ssl for securing communications.  The book has code examples
and simple client/servers that served as the basis for my own code.

>  From what I have gathered, the calls would something like this:
>
>    Generate RSA Key (call rsa_generate_key?)
>    Request authentication from other side
>    Return my key
>    Loop:
>
>        Encrypt packet
>        Send packet
>        Get response packet
>        Decrypt packet
>        Process Packet
>        Goto Loop

You'll basically do the following:

 1) generate your key pairs first time and stash them away
 2) connect to other side via SSL primitives or hand a connection to
    the SSL library
 3) exchange data
 4) tear down the session

OpenSSL will handle the rest.  It really wasnt that complicated.  I
retrofitted my unsecure app with SSL and the number of modules and
files I had to monkey with were pretty small.

Bobby


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to