edit : maybe im using a stupid way to ask about stuff or maybe you don't want to bother helping me out which to why im helping myself and changing the way im asking about stuff , maybe that will work out and i get some help
here is what i got so far
subject was about how conquer cryptology/cryptography works since server start until client is fully connected with the private shared key
[Only registered and activated users can see links. Click Here To Register...]
please someone confirm/continue what i've understanded
from my personal notes (forgive me for my bad english and bad information but all that have been done in 10 hrs of reading and trying)
client send a connecting request
server send password seed
client reply with a packet of length 240 with acc , pass and server
if information is correct server send a packet of length 52 and type 1055 Identifier on offset 4 and game ip on offset 20 and game port on offset 12 also type on offset 8
the client connect to the game server
then server send to the client the dh packet (p , g , result)
client reply with it's result
now both client and server got the shared private key
more over
server encrypt/drypt everything with blowfish key but the auth packet of client which it encrypt/decrypt it with AuthCryptography class (i duno what encryption it's using and sure it's not dh key because the dh key comes after the auth. process)
assuming all what i said is perfectly fine , i got some questions
what is the use of the dh key exchange ? i can't find any use for the private shared key they had
is there anything else i should know about client/server cryptography ?
does AsyncSocket automatically creates thread per connection ? or in another words how one socket connects all clients ?
thanks
here is what i got so far
subject was about how conquer cryptology/cryptography works since server start until client is fully connected with the private shared key
[Only registered and activated users can see links. Click Here To Register...]
please someone confirm/continue what i've understanded
from my personal notes (forgive me for my bad english and bad information but all that have been done in 10 hrs of reading and trying)
to sum up what i've got so farQuote:
TL;DR
AuthServer_AnnounceNewConnection
generating a new PasswordCryptographySeed then send it using the authcryptography encrypt method which i
duno what encryption it's using , it encrypt them using the 4 keys (2 constant and 2 prolly is generated
each time)
that's how it encrypt the packets (decrypt is the reverse)
each byte power 171
byte >> 4 OR byte << 4
byte power ((byte)(_cryptKey1[this._encryptCounter.Key1] ^ _cryptKey2[this._encryptCounter.Key2])));
then it increase the encrypt counter
conclusion:
once on announce new connection event raised we do the following
define new authstate object using the ISocketWrapper object socket with a new AuthCryptography
then get the current PasswordCryptographySeed send it after encrypting it ,then change it for other
clients
then set the ISocketWrapper object "Connector" to the authstate object we created using that
ISocketWrapper socket
then the client reply to raise the event of AuthServer_AnnounceReceive with a packet of length 240
then we decrypt this packet using the decrypt method which i duno what cryptology it is
we get user name at offset 8 and password at offset 72 which both need to be converted using system text
encoding class
then server reply with a packet of lengeth 52 and type 1055 with Identifier on offset 4 and game ip on
offset 20 and game port on offset 12 also type on offset 8
types are
Banned = 0,
InvalidInfo = 1,
Ready = 2
if the length isn't 240 then the server will disconnect this connection
then at CreateServerKeyPacket
string P =
"E7A69EBDF105F2A6BBDEAD7E798F76A209AD73FB466431E2E 7352ED262F8C558F10BEFEA977DE9E21DCEE9B04D245F300EC CBBA03
E72630556D011023F9E857F";
string G = "05";
the prime is that number and generator is that 5
then it create the server key packet and send it to client
client replies with it's own result so the server use it to know client private key and figure out the
final shared private key
server decrypt this client packet with the blowfish GameCryptography decrypting method
if it's the first packet the game server recieve it decrypt it and get the shared private key , else it just decrypt it and start processing that packet
client send a connecting request
server send password seed
client reply with a packet of length 240 with acc , pass and server
if information is correct server send a packet of length 52 and type 1055 Identifier on offset 4 and game ip on offset 20 and game port on offset 12 also type on offset 8
the client connect to the game server
then server send to the client the dh packet (p , g , result)
client reply with it's result
now both client and server got the shared private key
more over
server encrypt/drypt everything with blowfish key but the auth packet of client which it encrypt/decrypt it with AuthCryptography class (i duno what encryption it's using and sure it's not dh key because the dh key comes after the auth. process)
assuming all what i said is perfectly fine , i got some questions
what is the use of the dh key exchange ? i can't find any use for the private shared key they had
is there anything else i should know about client/server cryptography ?
does AsyncSocket automatically creates thread per connection ? or in another words how one socket connects all clients ?
thanks