encripting / securing resources

Started by
2 comments, last by wilhil 20 years, 8 months ago
Hi I was wondering when I am making programs, that use direct x, and I compine, I have the .x files and the skins in the director, and I was wondering is there any way to build them in the .exe or encrypt the files, I know that there is always going to be the hacker / cracker that can get the resources, but I just want to make it hard! so if anyone can tell me that would be appreciated! Thanks Wil
>wilhil<
Advertisement
Use your own file extensions. That''ll hide it from the ''regular user''.

Compile it into the .exe (check your compiler manuals on how to do that). Not very practical if you want to change your art on the fly without wanting to recompile... Think about doom having all textures inside the .exe... would make moding a bit difficult.

Invent your own graphics format. Keep the documentation about it to yourself.

Use an encryption algorithm (Problem is: the key has to be stored inside the programm, so it doesn''t matter how secure the algorithm is, but more how good your key is hidden inside the app).
How do I set my laser printer on stun?
you can make a little external program that uses DES encryption or even triple DES to excrypt your file. then reverse the algorithm that you are using, put it inside your main program and everytime you load something, decrypt it first.


Like the other guy mentionned, it's not encrypting your file that's hard, it's finding a good way to hide your key...

for the key to en/de-crypting your file or buffer, you can either choose to either write it as a string (very easy to find because when you compile your code, the string stay as is), you can write your key in hex (which will disguise it in your code ei..

static des_cblock key = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 };

this way, you can't run a program to extract strings from your .exe and find the key quiclky BUT it is still findable with a little more effort..) OR from inside your program, write a small function that grabs a part of your key from multiple files. what I mean is take the 105th charac from one file, the 78th charac from a second file.. and so on to make your key and this will make it a lot harder to figure out your key. you can even make multiple functions with other bogus ones to create your key... you can only do so much to throw someone off who really wants what your hiding..


or you can probably just put your files in some sort of a text buffer in a library or object file and only you know how to put it back together in tmp files or jsut in a buffer to load them in your app after...

anyways, hope this helps a bit...

ashtray..


[edited by - ashtray on August 8, 2003 10:09:39 AM]

[edited by - ashtray on August 8, 2003 10:12:03 AM]
...
If you do go for encryption, I''d advise to go for AES though. A lot more secure then (Tripple-)DES and way faster.
How do I set my laser printer on stun?

This topic is closed to new replies.

Advertisement