ANSWER: I'm using Mutual SSL Authentication. Now there isn't any problem :)
I'm working on a server project. I've tried authenticate client with a XOR encrypt-decypt method but this isn't secure enough. I decided to use SSL with my sockets but I can't do it. I've a System.Net.Sockets.Socket based connection. Namely I want this: if a Tcp connection is incoming, authenticate is it our client's socket connection. (every socket can't connect our server socket from our port). Can anybody give me a start point or some examples? (This is the dead point of my server. if I can't do it, it'll be cancelled!)
EDIT1: My system currently working like that:
Client connected to server.
Server created 16byte long random key and crypted it with serverKey (XOR), sent it to client
Client decrypted data with serverKey and crypted it with clientKey and sent it back
Server decrypted data and checked are there same
(When client connected, a timer started for auth timeout)
EDIT2: Now I'm using an other cryptology. When a client connected, it'll be sent and client will decrypt it and sends back. Cryptology working like this:
Encrypt byte[] with a special method (not professional). After, get a hash code of byte[]. This hash algoritm is written by me, and if anybody don't know it, never understand our encrypted byte[]. (already hash outputs can't came back). And finally it combines hash and crypted (like a XOR, a special method).
With this method, nobody gets decrypted/cracked data. Otherwise there is a asymmetric encrypt/decrypt method (http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange). I can upgrade my auth system with a (hard) asymmetrice cryptology later (if it isn't enough).