Hi,

I have a question regarding file encryption. I have read many posts here but cant find one that answers my question. If I have missed an existing post please point me in the right direction.

My question:

I am trying to send a file between two computers. I have a winsock routine that does this nicely and can send and transmit binary files etc.

The problem however is that I wish to encrypt the file before it is sent and the decrypt it on the recieveing machine. I could build some encryption into my program with an encryption key that stays the same but ultimately it would be possible to break it.

I have heard about private and public key encryptions, I assume it would be possible to have the recieveing machine generate both the keys and the sending machine uses the private key to send the file but I dont have nearly enough knowledge or experience to do this.

Any help or source code would be great.