views:

47

answers:

1

Hey. I would like to save sensitive user data to my apps sandbox but I know that if the phone is then stolen someone can "rip" (if thats the correct term) data off the device quite easily.

So I need to use encryption. But I can't use standard private-public keys without either storing them in the code. (not good im assuming as if the bundle is cracked they could be discovered)

Or using a secure connection to a server to transmit keys, which will mean my app will have to have internet to encrypt... not the best option for me.

So Im thinking of having the user enter a password or pin that will be used to encrypt the data (is that called a Hash?) but how secure is that? if someone ripped the hard drive of the phone and got my hash out. would they be able to decrypt all/any of it?

Cheers

A: 

This question addresses keeping a password safe for your app. Instead of a password, store a random key for encrypting a file, like this.

Don't roll your own security code, your questions reveal you're nowhere near being able to do that and get it right... keep reading, but for now follow these examples.

Andrew McGregor
Thanks, yes your correct iv only just started out on this, was planning on using those categories, So really I just need to know how secure it is.... If an attacker has all the time in the world to try to decrypt data can they succeed ? Cheers
Chris
If they literally do, then yes. But in practice, the point of cryptography is to make it impractical without resources so huge that nobody will be able to muster those resources. I should have given you a reference for generating the key as well, but I don't have one handy.
Andrew McGregor