Skip to content

Initialization

Kr0dÿ edited this page Aug 20, 2022 · 1 revision

In this page, we are going to see how Supa-IRC initiate connection between client and server.

Initialization


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.

Clone this wiki locally