Jump to content
  • Advertisement
Sign in to follow this  
ilwG

Authentication and Encryption

This topic is 1367 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

 

I'm currently designing the networking library for my game, and I'm curious about the standard methods people use for authentication and encryption in games.

 

This is more of a poll than a question I suppose. Do most games not worry about encrypting the packets? I'm pretty paranoid so I excessively worry about cheaters being able to determine what another player is doing or seeing, but I suspect most games don't worry about this as much as I do.

 

What are some general authentication methods games use? Do they imbed the public key of the game server in the game code, and do a simple SSL/TLS implementation? I've looked at the WPA2 authentication scheme, but I don't know if this is overkill either.

 

Any insights and tips are appreciated.

 

Thanks,

Jeremiah

 

Share this post


Link to post
Share on other sites
Advertisement

Those are two different things.

 

For authentication the general standard is to generate a session ID that gets thrown away after a short time. Within the library (where developers can forget about it) each connection just sends the session key rather than negotiating with the login server.

 

Encryption on the connection has some overhead, some games do it, some games don't. We've had games where we did it only because it was a requirement from legal, stemming from insurance. If you are working on console games the systems have requirements about encryption.

 

 

 


Do most games not worry about encrypting the packets? I'm pretty paranoid so I excessively worry about cheaters being able to determine what another player is doing or seeing, but I suspect most games don't worry about this as much as I do.

 

In practice that is not an issue.

 

If one cheater is somehow able to monitor another person's internet traffic then they are a badly-configured network where all their traffic is already compromised.

 

In real life most network devices use switched routers rather than the very old hubs that broadcast all traffic to everybody. We've found it is actually quite hard to find old dumb hubs that let you eavesdrop easily, these days it is cheaper and easier to use a PC as a hub so you can log, throttle, and otherwise tamper with their traffic.

 

While encryption does offer some protections (use it when you log in to your bank, for example) it provides almost no protection against attacks generally.  

 

Bad guys can intercept and modify data within their executable regardless of the presence of encryption. They can view received data after it is decrypted. They can feed modified values into the stream to be sent through the encrypted channel.

 

If they a bad guy wants to intercept some traffic and they have some network access, TLS/SSL can easily be intercepted with a MitM attack, it is commonly a requirement in corporate environments. System admins install a trusted certificate on the machine. When the communications come in, corporate overlords can unwrap what the server sent, scan it with antivirus, throw it into a cache or log it or whatever, then wrap it in a new encrypted connection to your machine. TLS was designed in part with this weakness in mind. 

Edited by frob

Share this post


Link to post
Share on other sites

For authentication the general standard is to generate a session ID


This is half of the truth -- the other half is that you must authenticate as some particular identity (else the authentication is not that useful.)

To do that, typically an encrypted connection is established (typically using SSL/TLS) and a name or other identity token (such as e-mail address) and a password (secret only known by the player) is provided to prove identity, after which an authentication token is issued that ties this identity to this session.


A second question I'd like to ask: What attacks are you worried about? What attackers are you worried about? If your game is popular and have incentive for cheating, it's much more likely that bad players will host forums where they ask your other players for their name and password "to help them out" as it is that someone would snoop the network. It's also more likely that someone would attach a debugger to the running game, and lift game state from in-RAM state, than it would be for someone to sniff the network packets to try to build up an image of game state. Your executable already did this -- why should they re-invent that, when it's already right there!?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!