Socket Connection - Python
In making a project and the data that is being transferred is being encrypted with Asymmetric Encryption. My program also has a Login System. What packets do I need to send from the client to server and vice versa? My original thought was: 1. Client asks the server if he needs to send his public key or he already has it. 2. Server responds with his public key or with a 'no'. 3. If the server responded with his public key, the client sends the server his public key and the server saves it in a table that contains the socket and the public key. If the server responded with a 'no', the user can just login... 4. If the user didn't login yet till here, he will login now. Now, when the user is logged in, the server will move the public key that he saved back in part 3 to the 'users' table. He can now do that because he has the username and password of the user and the current socket - do he can link these by taking the public key where the socket == the current socket, and insert it where the username is...