TheAnalogKid
|
 |
«
Posted
2005-04-07 19:20:54 » |
|
Maybe this topic is not in the good section but I'm remembering a thread where people were talking about doing encryption for images and maybe other files such as sounds/music. Anyway, how do you protect your content such as images and sounds? I intend to use png images and ogg files for sound (still don't know for music). I'd like to use them in an unsecured fashion at dev time and encrypt them at distribution time only and the game knows that it has to decrypt them for production use. I know that many companies define their own image format but I'd like to avoid this as much as possible. Same idea for sound...
|
|
|
|
Markus_Persson
|
 |
«
Reply #1 - Posted
2005-04-08 11:44:20 » |
|
I would write my own classloader that pipes everthing through a javax.crypto.CipherInputStream, then access the standard type files as normal via getResource() and getResourceAsStream().
Of course, keep in mind that encrypting data gives you FAR from as much security as you might think. There's no way to make it secure, so the only question is how many trivial hoops you make people jump through before getting the content. (and you need to jump through those hoops as well when implementing it)
|
|
|
|
TheAnalogKid
|
 |
«
Reply #2 - Posted
2005-04-08 16:02:49 » |
|
OK thanks for the ideas. What do you do in Wurm Online?
|
|
|
|
Games published by our own members! Check 'em out!
|
|
darkprophet
Senior Member   
Go Go Gadget Arms
|
 |
«
Reply #3 - Posted
2005-04-09 00:31:45 » |
|
Not sure if this is a good idea or not. But why dont you corrup the files? I.e. Add a little key at the top/bottom (or both) of the png file (in bytes) and just read if that key is valid or not. If so, then read whats in between. I can see alot of problems with that to. I.e. you dont use the normal ImageIO stuff, you can probably find a back way through....
Its an idea nonetheless...
DP
|
|
|
|
TheAnalogKid
|
 |
«
Reply #4 - Posted
2005-04-09 02:49:58 » |
|
I've already thought about that but it's not really secure. Thanks for your help.
|
|
|
|
tom
|
 |
«
Reply #5 - Posted
2005-04-09 12:10:40 » |
|
The most secure thing would be to currept the files in some way. That will prevent people form just opening the files in their favorite viewer. It do not mather if you use the most advanced encryption in the world, or basic xoring. They got your code and can decrypt it no mather what.
But why bother at all?
|
|
|
|
swpalmer
|
 |
«
Reply #6 - Posted
2005-04-09 23:54:40 » |
|
I've already thought about that but it's not really secure. Thanks for your help. There is no secure way to do this. You might as well use XOR rather than some complex crypto.. since your program itself will contain the code to decrypt the images it's like locking a door but leaving the key in the lock.
|
|
|
|
Markus_Persson
|
 |
«
Reply #7 - Posted
2005-04-11 09:56:42 » |
|
/me agrees with swpalmer.
Ironically, "just xoring" the files might end up being more work in java since we have all those fancy crypto classes built in in the language. =D
As for wurm, we currently don't obfuscate(*) the art at all.
(* btw, you're not encrypting if you're doing anything suggested in this thread.. you're obfuscating)
|
|
|
|
TheAnalogKid
|
 |
«
Reply #8 - Posted
2005-04-11 13:10:43 » |
|
OK thanks for ideas. I ask the question because in the future when my game will go live, I don't want companies to stole images and sound/music contained in the game and reuse it for their own commercial purposes. I don't know if this could happen.
|
|
|
|
Matzon
|
 |
«
Reply #9 - Posted
2005-04-11 14:04:48 » |
|
As a general rule: No such thing as client side security. Just wrap the resources in something like an xor stream that makes it harder to get than pure images.
If they ever use your media in a production game, you can sue them.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
TheAnalogKid
|
 |
«
Reply #10 - Posted
2005-04-11 14:24:18 » |
|
OK then I think that I will simply put some sort of signature at the begining and end of each file using image io. My game would have to just ignore them and read the content.
|
|
|
|
turquoise3232
Junior Member  
Java (games) rock!
|
 |
«
Reply #11 - Posted
2005-06-06 22:28:25 » |
|
What about watermarking? It may be useful?
|
|
|
|
|
swpalmer
|
 |
«
Reply #12 - Posted
2005-06-09 04:20:50 » |
|
Watermarking is probably the more useful thing. Since you can't prevent someone from stealing the content, the next best thing is being able to prove that they did 
|
|
|
|
princec
|
 |
«
Reply #13 - Posted
2005-06-09 11:54:48 » |
|
I'd just like to point out that your art and sound, individually... are pretty worthless, from a commercial perspective. In other words no commercial entity is going to dream of taking your graphics and sounds without permission because the risks are big and the rewards trivial. That just leaves hobbyists and modders and so on... and what's the harm in letting them play with your stuff? A few bleeps and boops and a grass texture ain't so much to give away is it? Cas 
|
|
|
|
TheAnalogKid
|
 |
«
Reply #14 - Posted
2005-06-09 21:03:22 » |
|
and what's the harm in letting them play with your stuff? A few bleeps and boops and a grass texture ain't so much to give away is it? I hope you're not refering to the prototype/demo I've done. I don't consider those graphics as professional stuff.
|
|
|
|
princec
|
 |
«
Reply #15 - Posted
2005-06-12 20:29:08 » |
|
Even if it were professionally developed graphics and sound... in fact especially if it were professional. It's just something that you're worrying about that isn't really a problem. Like piracy: there is nothing realistic that can be done about stopping it, so you just need to work out how to make money regardless of piracy. Cas 
|
|
|
|
woogley
|
 |
«
Reply #16 - Posted
2005-06-12 20:46:40 » |
|
Image obfuscation/encyrption/whatever is pretty pointless anyways. Anytime you're drawing the Image to the screen in your game, the "print screen" key can be pressed.. (at least on Windows)
|
|
|
|
|
turquoise3232
Junior Member  
Java (games) rock!
|
 |
«
Reply #17 - Posted
2005-06-13 10:39:31 » |
|
Image obfuscation/encyrption/whatever is pretty pointless anyways. Anytime you're drawing the Image to the screen in your game, the "print screen" key can be pressed.. (at least on Windows)
Watermarking is preserved in that case, but as princec stated out, you have to be certain that if somebody wants to steal your work, he will succeed...
|
|
|
|
|
woogley
|
 |
«
Reply #18 - Posted
2005-06-13 14:35:16 » |
|
Watermarking is preserved in that case
You wouldn't watermark every sprite on the screen.. that would be hideous! but as princec stated out, you have to be certain that if somebody wants to steal your work, he will succeed...
Quite right, MOST watermarks can easily be removed with something similiar to the "clone brush" on Photoshop. Either way the thief might not want the part of the image that has the watermark and would just crop what he wants out 
|
|
|
|
|
|
|
|