I have a flash game with a php backend and MySQL database.
To play the game, users must login. During gameplay the client will also periodically send updates to the database. For example, when the user purchases a new in-game item.
I have two concerns. Firstly the username and password are being sent in plain text to the server (it's encrypted in my database however). Secondly, after logging in, the client will be sent a user ID to be used in all subsequent requests. These requests are also being sent in plain text.
Both of these communications are at risk from packet sniffing. Once someone gets an idea of the structure of the requests to the server, they could create their own bogus requests, substitute their own values/user IDs and generally cause a lot of upset.
What are my options? would buying an SSL cert and using https be a solution? Could I use a public/private key type thing?