I need to encrypt the data that will be sent/received, client <> server and vice-versa.
Since I can't use SSLStream right now, I am looking for other alternatives.
While thinking about the alternatives I have, I got stucked on how would I send the data to the client in a way it can't be read/intercepted.
Here is how I thinked of doing it:
Client/Server will have a RSA private key inside the application that will be loaded from a string to encrypt/decrypt the data received from the server.
After the initial connection request, the server will send a session id along with a inner AES key/iv.
From here on the client will communicate using both, the RSA and the AES.
I would like to hear from experienced people some new ideas or better ways to do what I need here which is:
Send encrypted data from client to server and vice-versa without using SSLStream and yet having a good level of security.
I understand that having the private key on the client is risk but I am yet to find a better solution.