Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How safe is the apple binary (secret key saftey)

I'm developing an application for iPhone which uses a HTTP request to get quote data from a webserver.

I am working with another developer who is managing the web service. We are using an MD5 encryption (simple xor) to pass the data between iPhone and webserver.

He posed a question to me this morning which is quite frankly way out of my pool of knowledge.

'How safe is the apple binary?'

He is worried about whether someone could obtain the .app bundle via iTunes, and then decode that bundle and access my source code directly, allowing them to obtain the secret key we are using to encode the data.

I personally, wouldn't even know where to begin, but i'm sure there are more knowledgeable/crafty fellows out there.

So, is it possible? if is it, what can I do to try and safe guard my source?

like image 272
Bongeh Avatar asked May 31 '11 12:05

Bongeh


1 Answers

The binary is not even remotely safe. Whether through the iTunes download or on a jailbroken iPhone, there's nothing you can do other than obfuscation, which a determined adversary will always get past. Do not ever rely on the "secrecy" of something embedded in a client application, it is not secret. Ever. On any platform, in any language, with any technique.

If you need to limit who can access your system, you need per-user accounts. There is no other safe mechanism. Apple does provide ways to "authenticate" users via their iTunes accounts, you may want to look into that.

Also, "MD5 encryption" means nothing. MD5 is a hash function with cryptographic applications, but saying you're doing "MD5 encryption" and "simple XOR" is just meaningless. I can use XOR and MD5 to do any number of things, few if any would serve as a meaningful encryption scheme, and would have no advantages whatsoever over a real algorithm designed by experts, such as AES.

Use HTTPS (HTTP over SSL). There is no reason not to, the iPhone fully supports it. If you need to, you can get free SSL certificates for your server from at least http://www.startssl.com/ . There are lots of cheap SSL certificate providers out there these days, too. Google a bit.

I'd strongly recommend you and your co-developer start reading up on information security, both in theory and practice, because it appears you have very little grounding in the subject, and probably several significant misconceptions that will lead to easily-broken systems.

like image 166
Nicholas Knight Avatar answered Oct 11 '22 15:10

Nicholas Knight