Binary File Writing (Making It Unreadable) C++

Started by
12 comments, last by swiftcoder 14 years, 4 months ago
Quote:Original post by swiftcoder
Quote:Original post by theOcelot
Quote:Original post by ApochPiQShort answer: it's not worth the effort.
That's not entirely true. It will stop a lot of people who aren't really determined.
Right up until one of the 'determined' people posts a tool to decrypt your file on the internet - probably about 5 minutes after they write it for themselves.


True.
Advertisement
Quote:Original post by frob
If somebody wants them they will get them. There are laws in place to protect you when attackers steal your stuff and cause direct harm.

In my experience, just dumping them in the format you will use in game is enough.

Your tools can load the data and dump it out in the same arrays, trees, or other structures you use in game. Then you simply stream the data in and set your pointers within it. Load times are faster and there is no time spent processing the data. Plus most people won't bother trying to get it back out. The downside is that it takes a bit more space, but storage is cheap these days.


Frob you bring up a good point about the laws.

There are laws in place that make encryption breaking illegal.

If you write your game data files out in the format you use them, im not sure if the courts would consider that encryption or not so you may not be protected (??).

If you do even simple encryption though (add a constant to every byte of the data), that encryption - as weak as it is - should give your data legal protection :P

(although i think that reverse engineering file formats may also be illegal??)
Encryption is its own bag man. Even professionally made encryption such as SSL has been cracked. I applaud your effort, if you pull it off your sure to learn some new tricks, just remember everything electronical is bound to the analog hole. If someone really wants to hack into you files, they'll find a way.
Quote:Original post by jmau0438
Even professionally made encryption such as SSL has been cracked.
Cracking file encryption when you have access to the decryption software (i.e. the game) is 100x easier than cracking a public key transport system, where you have access to neither key involved.

No one will be trying to brute force the encryption. They will crack open your game in a debugger, and either pull out the decryption algorithm to use separately, or let the game do the decryption and then dump out from memory.

I think the best idea is to just use a plain file unless you have license restrictions (i.e. commercial assets with a protection clause), and then take the minimum effort to meet the requirements. And if you do use encryption for your own assets, provide an unencrypted path - many games live and die on the modding community, s not much point locking them out from creating their own assets.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement