user1833028
user1833028

Reputation: 943

Sending Data Securely over Sockets

I have, after a a hard work, managed to compose a functioning chat server that checks a SQL database for a username and password, and then let's you in if your authentication is good.

Alas, I present the password to the server...... in plaintext, with a sendto() command.

Can you say man-in-the-middle attack?

In this very nascent stage, I can warn people to use a unique password, never use it for anything else, ect. But this is really unacceptable.

What popular methods exist for securely transporting data over sockets?

I hope this question is not unacceptably open-ended, but I can't be the only one who would benefit from such a list/resource!

Upvotes: 1

Views: 154

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 595320

Encrypt the connection, such as via the OpenSSL library, or Microsoft's SChannel framework. If that is not an option, then you will have to at least encrypt the password before sending it.

Upvotes: 2

Related Questions