December 6th, 2011, 10:40 AM
Encryption with sockets
Hey all. With graduation around the bend and a desire to enter the computer security realm, I'm revisiting old projects I've made during the past few years and trying to "secure" them. I never took a proper security class, so I'm winging it on my own a little. This particular project was made for a networking class. I say networking, security people hear "encrypting", so I figured I'd try to encrypt this little program as practice.
Now, I know if you're using TcpClient, it's as simple as replacing "NetworkStream" with "SslStream" and adding a few lines dealing with certificates and encrypting. The problem is that I made this program with Socket and not TcpClient:
Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
So I guess I have two questions:
1) Can I still get SSL working with this type of Socket, or should I recode and use TcpClient if I want to go the SSL route
2) Is there a different type of encryption that would work with Socket class that I'm just not aware of?
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.