Is it possible to encrypt the haxe code for casino sort of games?

I have been programming casino game in OpenFl. In such games, it’s required, players may not be able to tamper with data being sent and received. In Flash, I remember, we used 3rd party encryption tool that was able to encrypt the client side AS3 code. And made it difficult to reverse engineer. Is something like that possible with Haxe output too ?

In any case know that you can’t prevent people from doing what they want with your client or even code their own to talk to the server. So the server must be fully authoritative.

Since you mention encryption and you say it’s a casino game I suggest encrypting the communication, something like private/public key. Won’t secure you but your player against tempering. (ok a little you, since you can’t just look at the network data to figure out what happens)

With that in place adding obfuscation to the client is the only thing you can do, to at least prevent everyone from reverse engineering. If you are targeting flash I guess the 3rd party encryption tool you mention should still work.
If you target c++ a c++ obfuscation tool should work also.

1 Like

I would suggest you to follow the instructions that ibilion mentioned.

However if you still want to protect the IP of your game or make more complicated the process of reverse engineer your client code (or avoid make to easy to a customer to build a bot), try to serialize, compress and encrypt the parts of the client you want to protect and send them to the client via network before the game starts with a token identifying each user on server side (the client has to reverse the process and load the serialized parts before start the game). For sure this architecture has lots of inconvenients and there are lots of variations.

For sure that still doesn’t prevent that an actual (un)security expert tampers your game (client), so you should really focus on building a bullet proof backend.

1 Like