Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Image and sound encryption  (Read 3609 times)
0 Members and 1 Guest are viewing this topic.
Offline TheAnalogKid

JGO Coder


Projects: 2



« 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...

Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« 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)

Play Minecraft!
Offline TheAnalogKid

JGO Coder


Projects: 2



« 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!
Legends of Yore - The Casual Retro Roguelike
Offline 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


Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline TheAnalogKid

JGO Coder


Projects: 2



« 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.

Offline 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?

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #6 - Posted 2005-04-09 23:54:40 »

Quote
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.

Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« 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)

Play Minecraft!
Offline TheAnalogKid

JGO Coder


Projects: 2



« 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.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« 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!
Legends of Yore - The Casual Retro Roguelike
Offline TheAnalogKid

JGO Coder


Projects: 2



« 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.

Offline turquoise3232

Junior Member




Java (games) rock!


« Reply #11 - Posted 2005-06-06 22:28:25 »

What about watermarking? It may be useful?
Offline swpalmer

JGO Coder




Where's the Kaboom?


« 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  Smiley

Offline princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« 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 Smiley

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #14 - Posted 2005-06-09 21:03:22 »

Quote
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.

Offline princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« 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 Smiley

Offline 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)
Offline 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...
Offline 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 Tongue
Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« Reply #19 - Posted 2005-06-14 16:35:58 »

Watermarks aren't visible to the naked eye.

Play Minecraft!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (33 views)
2014-07-18 06:55:21

Zero Volt (29 views)
2014-07-17 23:47:54

danieldean (24 views)
2014-07-17 23:41:23

MustardPeter (26 views)
2014-07-16 23:30:00

Cero (41 views)
2014-07-16 00:42:17

Riven (43 views)
2014-07-14 18:02:53

OpenGLShaders (31 views)
2014-07-14 16:23:47

Riven (30 views)
2014-07-14 11:51:35

quew8 (29 views)
2014-07-13 13:57:52

SHC (64 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!