Mazki516
Mazki516

Reputation: 1027

Send data over the net between a client and server

I've built software that connects to a database and does stuff (does not really matter what). You can also connect from a remote computer to the server but this way is wrong because if it's over the net, the connection string is not encrypted.

What I want to do is actually build a sniffer that decrypts data, waiting for a "call" from a client that sends encrypted data, any kind of data, then i can send an encrypted connection string, and get encrypted data (the software will know how to decrypt it and it doesn't really matter how strong the encryption is).

The "sniffer" should know all the commands I send to it, so it's probably hard to build it unless it is already built; but it's a nice challenge.

Upvotes: 1

Views: 529

Answers (3)

slugster
slugster

Reputation: 49985

What you need to do is use WCF web services (these have been covered extensively on SO, so just do a search).

With WCF, you have a web service end point that is hosted on the server, and you make function calls to it from your client. The communication channel can be encrypted if you want, all you have to do is change the configuration file for it. The server knows about the connection to the database, but the client doesn't know and nor does it need to - this means you will not have connection strings sent across the web.

Upvotes: 0

AxelEckenberger
AxelEckenberger

Reputation: 16936

If you use WCF you can configure that the transmission and the message should be encrypted. Here is a description about the security fundamentals of WCF.

Upvotes: 1

Tony The Lion
Tony The Lion

Reputation: 63270

Not sure what you're trying to do, but I think what you want to use is Asymmetric Encryption, using Public Key to encrypt and Private Key to decrypt.

The client has the public key to encrypt data to send, and server owns private key. Now you can securely send data.

I hope this is of some help. If not, please clarify your question?

Upvotes: 1

Related Questions