-
Notifications
You must be signed in to change notification settings - Fork 0
Initialization
In this page, we are going to see how Supa-IRC initiate connection between client and server.

First, the server store the address of the client (as normal socket functioning). Then server generate an RSA key pair (public and private) and an AES key, server send RSA public key to client.
Client generate RSA key pair and send his public key to server. Server and client can now exchange secured message by encrypting them with their RSA key pair, the problem is the data length limit with RSA, here come AES.
The AES key is encrypted by the server using the client's RSA public key and then sent. Client can decrypt AES key using his RSA private key.
Now, client and server can exchange large and secured message using AES, RSA will now serve for signing exchanged message.
For client recognition, server use lists such as CLIENT, RSA_PUB_key, RSA_PRIV_key, CLIENT_PUB_key, AES_key.