Game media x 2

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
TheApprentice
Posts: 15
Joined: Fri May 20, 2005 8:27 pm

Post by TheApprentice »

hybrid wrote:And how do you prevent your application from being altered? If you use Irrlicht and just change the reading function in known ways it is easy to add both your input function and an additional output function writing your "secret mesh" to an unencrypted file...
@hybrid: Well, can I stop people from dissassembling the code?

@AssiDragon : No, my game is not open source. I'm alone, trying to set together all the bits and pieces, then expand it as I learn more.

@FlyHigh: Does that code work directly in Irrlicht? If, then that's cool.

Perhaps I should put the bar at the level where you have to do dissassembling since I can't find easy ways to manage some true encryption :? Could you call the XOR method a form of encryption...?
hybrid

Post by hybrid »

TheApprentice wrote:
hybrid wrote:And how do you prevent your application from being altered? If you use Irrlicht and just change the reading function in known ways it is easy to add both your input function and an additional output function writing your "secret mesh" to an unencrypted file...
@hybrid: Well, can I stop people from dissassembling the code?
It's not that kind of debugging which would always be possible. It's just an update to an external library and thus perfectly legal. What I'm saying is that because everyone has access to vital parts of your application (i.e. access to Irrlicht), it will be very hard to keep them from getting the information they want by access from within Irrlicht.
So if you have a closed source program with no such prominent dependencies you will have to debug the program and recreate the information from assembler code. Besides being time consuming it's usually illegal. But in your case the only protection is in the secret keyphrase you store in your app. Whatever encryption you use it would still be illegal to disassemble your app to revocer that key. But it would be legal to alter the Irrlicht library and add an export at some interesting point. So it would be possible to get legal access to the data you wanted to hide, though your copyright would still exist (but that's another thing).
TheApprentice
Posts: 15
Joined: Fri May 20, 2005 8:27 pm

Post by TheApprentice »

hybrid wrote:But in your case the only protection is in the secret keyphrase you store in your app. Whatever encryption you use it would still be illegal to disassemble your app to revocer that key.
Yes, and them I think I have done what needs to be done. I'll write in the license for my game that no dissassembling is allowed and I'll ask the people willing to contribute it that is enough protection. If not, I'll just do more of the artwork myself.

So how does this XOR method really work?

1. I put all my stuff in a zipfile
(I'll use "None" or "Super fast" compression to make my game mor smooth?)

2. Then I'll edit the header of the .zip-file, how?

3. I modify the .zip loader in the Irrlitch library, how?

4. The .zip-file that was "XOR:ed" will be decoded at runtime?

I appriciate your help guys, thanks for putting up with me... :oops:
FlyHigh
Posts: 111
Joined: Wed Mar 23, 2005 12:05 am

Post by FlyHigh »

Maybe this will explain a few things,
http://www.gamedev.net/reference/articl ... le1630.asp

2. Using a simple 10line program on the archive after creating it (which is identical to the code i posted earlier)

3.Create another zip loader class which mirrors the calls to the original zip loader class except decodes the header after opening it

4.Yes, it will be decoded at runtime, however it will be in plain text somewhere in memory and irrlicht will have a decoded copy of it which would allow very sneaky people to get it.

You got to remember that the harder it is for someone to steal something, then there will be less people who can do it, and these people have got better things to do like crack microsoft products etc.

You can't stop people dissassembling the code however you can obfuscate the code with other programs to make tracing it very hard
TheApprentice
Posts: 15
Joined: Fri May 20, 2005 8:27 pm

Post by TheApprentice »

FlyHigh wrote:Maybe this will explain a few things,
http://www.gamedev.net/reference/articl ... le1630.asp
Thank you for that link FlyHigh. I think I'm beginning to see the light at the end of the tunnel :)

For step 2: I made a .zip-file called file.zip, located in C:\file.zip
now where do I write the code that you posted? In a new "C++ source file"?
How do I set the filepath etc. to compile, run, and XOR the file?
FlyHigh
Posts: 111
Joined: Wed Mar 23, 2005 12:05 am

Post by FlyHigh »

Yeah create a new project.

I think maybe your misunderstanding how XOR works... Its the same code to encrypt and decrypt the data, as opposed zip and unzip which are opposite.

so. MyString == XOR(XOR(MyString)) == XOR(XOR(XOR(XOR(MyString))))

So create a simple project which takes a file (as a command line arg maybe?) and Xor's all or part of it with a string, then when decoding (in your game) xor it again.
Guest

Post by Guest »

In the method "void OpenZip(FILE *fp)" posted earlier, what is the parameter FILE? Is that a string for the filepath? :?
hybrid

Post by hybrid »

Anonymous wrote:In the method "void OpenZip(FILE *fp)" posted earlier, what is the parameter FILE? Is that a string for the filepath? :?
No, the parameter is named fp in this example, and it's a pointer to a FILE. The FILE structure is the C standard access structure for files. So fp stands for filepointer. Pointer to file is the usual thing you pass to C read and write functions. The string is passed to fopen(...) which returns the fp.
Guest

Post by Guest »

From what I've read in this thread you don't have to worry
about someone wanting to steal your code.
TheApprentice
Posts: 15
Joined: Fri May 20, 2005 8:27 pm

Post by TheApprentice »

Anonymous wrote:From what I've read in this thread you don't have to worry
about someone wanting to steal your code.
Why not? And it's mostly the artwork (sure, coding is an art :wink: but I mean models, images, music, etc) I'm concerned about.
TheApprentice
Posts: 15
Joined: Fri May 20, 2005 8:27 pm

Post by TheApprentice »

FlyHigh wrote:3.Create another zip loader class which mirrors the calls to the original zip loader class except decodes the header after opening it
I'm at this step now. This is a n00b question :? Where is the code for the zip loader class?
Post Reply