PDA

View Full Version : How is game code encrypted?




happycamper66
Oct 26, 2009, 02:52 PM
Hello,

I just wanted to know how exactly the Apps are encrypted once they go on the App store, i have made a good few Apps now and its just something i am thinking about.


When i go in Apps i own, i can .zip them and see the contents but where is the .xcodeproj with the files in it? I mean if i own the Apps, or i send out my App, then for it to run there is the source code for it to install and work on the iPhone. But that is nowhere in the zip extracted files? is there any way to make them visible or even extract the .xcodeproj onto a mac? and i mean, ANYWAY?


If you have the App on your machine you can run it on your iPhone then the source code must be somewhere in the package. Albeit encrypted i would imagine..



TodVader
Oct 26, 2009, 05:03 PM
When you build, Xcode creates a binary with your code. No one will ever see that code. The resources are wide open though. Every image and sound you use can be easily copied off the app.

happycamper66
Oct 26, 2009, 05:47 PM
Has there been ANY record of anyone actually "reverse engineering" the code? Getting it back from binary code?

admanimal
Oct 26, 2009, 06:00 PM
Has there been ANY record of anyone actually "reverse engineering" the code? Getting it back from binary code?

When you compile your code, the objective-c is turned into equivalent ARM machine code instructions. These machine code instructions can be translated directly into ARM assembly instructions, which are slightly more readable by a human than the machine code. It is still pretty tedious to figure out what this code is doing, but it's certainly possible. Your exact objective-c code can't be directly recovered from the machine code.

PhoneyDeveloper
Oct 26, 2009, 10:54 PM
You guys might be interested in this

http://ericasadun.com/iPhoneDocs312/index.html

Click on the files link and look at some of the header files.

firewood
Oct 27, 2009, 01:59 AM
You can't reverse engineer "the code" HLL source from the compiled binary exactly, but there are often ways to reverse engineer a form of source code that will pretty much create the same app, even though it may not be structured or easy to read.

It's a lot easier to reverse compile more restrictive languages such as Java, than for wild spaghetti C code. Objective C is a mix of those two extremes, so it depends on how (badly) you write your source code.

Objective C apps publish their method names for the language's dynamic dispatch to work. If you don't want method calls to be seen, use straight C functions instead, or even inline macros, and make sure to turn off or strip symbol generation.

Library headers are easy to extract because they HAVE TO publish the interface names in some form in order to be linked.

etc.