1

I have two applications. The client application is written in .NET and the server application is written in native C++. I am using TCP sockets for data communication between the two applications.

However, this data is sent over plain text and therefore can be intercepted. What is the best way to protect this information? I guessed that I would need to use some form of asymmetric encryption however I'm not entirely sure about how to implement such a system and I'm looking for some guidance.

Thanks

  • What kind of attack do you need to protect against? Are you sending private messages to your friend, and want to keep his/her sibling from intercepting it, or do you want to stop even serious attackers who might have millions of dollars to spend? – Jerry Coffin Oct 19 '16 at 0:31
  • The design is for a database application so the data sent across the network will contain private information such as phone numbers and addresses (no financial information) so the data needs to be protected in transit from point A to point B so that it cannot be intercepted and read by an attacker. Implementing TLs encryption is only one method of data protection and given enough time an attacker would be able to crack the key used to encrypt it. Any other methods of protection that spring to mind? – RedBullNinja Oct 20 '16 at 9:48
5

How about TLS (SSL)?

I'm not familiar with the details, but I do know it's a pretty transparent layer that will allow you to use whatever protocol you are already using.

Use the protocol over TLS instead of TCP, it will require some changes to API calls but the sockets methodology will remain.

  • Thanks very much for this recommendation. I've now implemented TLS using the OpenSSL API. – RedBullNinja Oct 20 '16 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.