1

I'm developing a networked game, and this game will require players to authenticate to the server. The both client and server are written in Java. I'm trying to find an efficient password transmission method.

I remember looking at SRP-6 a few years ago, and reading that it was what Blizzard uses for World of Warcraft, and thought that perhaps it might work.

Then a friend of mine told me that the way he deals with transmission is to ask the login server for its public key, then send the username, password, and the client's public key (where the keypair is generated each time the user opens the client) encrypted to the server. This seems a bit heavy to me in terms of the processor usage and networking required.

Once the user has authenticated, the login server sends the client a unique login token, that can be thought of as a session id. After authentication has completed, the rest of the game packets are unencrypted between the client and the game server.

Another thing to take into consideration is that this game will be released to the public, in a similar manner to Minecraft, where users can download the server, start it, and allow users to connect to it. This bit is was kind of dissuaded me from using SSL/TLS between the client and server, as I don't want to burden the user with certificates.

Is there any reason to prefer the asymmetrical encryption over SRP? Is there something else that's proven to be secure to transfer just username/password data?

  • You can use normal TLS. Regarding asymmetrical encryption it makes sense if the receiving server is just receiving data and then that data is copied over to another server where it is encrypted. This way you would have another java server instance serving keys for encryption. This way, if one of any of servers is compromised then the keys / passwords are unreadable. – Aria Sep 1 '16 at 9:08
  • @Aria the reason I didn't want to use the TLS route is because of the requirement for users to setup certs and register them. I don't want to have the users need to do this, because some of the server operators may not be knowledgeable enough to set it up themselves. – Zymus Sep 2 '16 at 5:27
  • I'd go with the TLS really. It is easy option and if you are using TCP that should not be big deal. Sending encrypted packets has lots of issues like MITM attacks and other hacks which are easy to do since it involves a bit networking only. You can use self-signed certificates which are generated during installation. This still allows MITM but you can maybe remember cert signature after first login like SSH does. – Aria Sep 4 '16 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.