NetworkDesign: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>StephenIerodiaconou |
imported>StephenIerodiaconou mNo edit summary |
||
| Line 147: | Line 147: | ||
==Message C2S Login Promise== |
==Message C2S Login Promise== |
||
This is the first real action of authentification from the client. It computes a nonce (a random number) and |
This is the first real action of authentification from the client. It computes a nonce (a random number) and sends a hash of its nonce to the server. This message contains the hash as a bytes array. |
||
==Message S2C Login Send Nonce== |
==Message S2C Login Send Nonce== |
||
| Line 153: | Line 153: | ||
==Message C2S Login Send Nonce Name and Password== |
==Message C2S Login Send Nonce Name and Password== |
||
The client now sends its nonce, its username and the value Crypt(xor(xor(client nonce, server nonce), password). This message contains 3 fields. The first one is a bytes array containing the client nonce, the second one a string containing the username and the third one a bytes array containing the |
The client now sends its nonce, its username and the value Crypt(xor(xor(client nonce, server nonce), password). This message contains 3 fields. The first one is a bytes array containing the client nonce, the second one a string containing the username and the third one a bytes array containing the encrypted password. On reception, the server checks that the hash he received at first is the hash of the nonce he just received. It then decodes the password field, and having the value of the client nonce and its nonce, it gets the value of the password. If the username/password combination is correct then the Server must send a Login ACK Message to indicate to the Client that the message has been correctly processed. However, if the username/password is wrong the Server will send a Login NACK (Not ACKnoledge). |
||
==Message S2C Login ACK== |
==Message S2C Login ACK== |
||