In order to encrypt communications from our (custom) client to our (custom) servers our current scheme is a bit like this:
- Client uses the bundled public key A to encrypt some random key material.
- Lobby server decrypts it with the private key, uses the encrypted key material to set up an encrypted channel with symmetric encryption.
- Client gets another public key B1 from the lobby server for login to game server 1, over the encrypted channel. (Game Server 2 would have public key B2 etc, each of these are generated at server restart)
- Client connects to game server and follows same scheme as 1-2 to secure communications.
Leaving aside how how the key material is generated and used, would there be any change in security we change it to:
- Client uses bundled public key A to encrypt key material
- Lobby server decrypts with private key, uses the encrypted key material to set up an encrypted channel with symmetric encryption.
- Client connects to game server and follows same scheme as 1-2 to secure communications with THE SAME PUBLIC KEY "A" the lobby used (so both lobby and game servers use the same private key)
In other words, do we get any enhanced security from only using the bundled public key for the lobby login?
A final alternative would be with a separate login server:
- We create a login server which the client connects to in the manner of 1-2
- The client is then awarded a new symmetric key C and an identifying number D
- The client connects to the lobby server, presents the number D in plain-text.
- The lobby and client now continues communication using the key (assume C is in a shared db or similar) C
- The client connects to the game server, again follows 3-4 to set up an encrypted channel.
Are any of these schemes significantly worse or better than the other? I can't see any huge difference.