6

I need to temporary store images on iphone/ipad during the session. Once session is finished, I need to delete data downloaded during the session. I want to protect the data while it is on iphone/ipad's persistent storage.

I have confirmed that iOS has hardware encryption but that has been broken recently, so I need some encryption technique to securely stored data. PGP has been used by my company previously for whole disk encryption but i don't know whether I can use any API to programatically encrypt/decrypt files.

Thanks,

Jignesh

NetDeveloper
  • 509
  • 1
  • 9
  • 20
  • On top of iOS encryption I use Rijndal encryption with a random key. The key again is protected by application specific ingredients plus user data that is not stored on the device. Then you have twice the security. – Krumelur Oct 21 '11 at 17:22
  • @Krumelur, That sounds like an answer, why did you make it a comment? – NJones Oct 21 '11 at 17:27
  • 1
    Is there any reason you need to persist the downloaded data, then? Just leave it in memory, then release it when done. The only reason to persist is to reload from local storage between app sessions. – Jay Imerman Oct 25 '11 at 13:43
  • What is your threat model? Who is the attacker? – CodesInChaos Oct 27 '11 at 22:21
  • @Jay That is possible but I was concerned about performance issues... Thanks though. and anyway the project is not approved so no more work on this.. – NetDeveloper Mar 09 '12 at 16:54
  • My recent answer to this question addresses some relevant issues: http://stackoverflow.com/questions/14877151/does-ipad-on-disk-encryption-affect-only-one-application-or-whole-system/14878317#14878317 – occulus Feb 15 '13 at 11:00
  • "I want to protect the data while it is on iphone/ipad's persistent storage" -- protect from who? The actual legit user of the app, or from another party coming along and analyzing the data later? – occulus Feb 15 '13 at 11:06
  • It's another party who could analyze data in case of lost device. – NetDeveloper Mar 15 '13 at 21:37

2 Answers2

0

A user with a jailbroken iphone has more control over the device than you do. (A thief who has stolen the device is also a user :) There is no place to hide a secret. Binaries can be decompiled, anything in memory on the device can be viewed, anything transmitted to the device over a network can be intercepted by the user.

Perhaps you are looking for "(in)security though obscurity", but a better approach would be to reevaluate your business model to better reflect the reality of technology.

rook
  • 66,304
  • 38
  • 162
  • 239
  • 2
    Security is not always about "make accessing the data impossible". Sometimes it is about cost and likelihood of retrieval versus importance of the data. – occulus Feb 15 '13 at 10:51
  • Also, "anything in memory can be viewed". Yeah, and how are you going to distract the user of the app from the fact you're there with wires attached to their iOS device while they're using the app? – occulus Feb 15 '13 at 10:53
  • What I'm saying is that although a secret is indeed hard to hide on a device, sometimes you don't need to. If the user has to authenticate with an external web service before fetching (transient) data, for example -- the password is in the users' head, and not put onto device storage. – occulus Feb 15 '13 at 10:59
0

The only thing that has been 'cracked' with regard to the iOS is that they have figured out how to extract the device keys, which are used to encrypt the device data, from the device. The encryption APIs/algorithms that are available are still safe. It is just that normal data, like your contacts, notes etc are no longer safe. unless you encrypt the data before it is put to disk!

So using the crypto libraries will allow you to encrypt the images with industrial strength algorithms and your data will be safe so long as your image key is safe. This is encryption that is is addition to what the phone already does.

Good luck

timthetoolman
  • 4,613
  • 1
  • 22
  • 22
  • "Normal data like your contacts, notes etc. are no longer safe" -- true; it's worth pointing out the built-in Mail app *is* protected by Data Protection API (so if you have set a passcode for your device, mail is protected). – occulus Feb 15 '13 at 10:56
  • How do you mean Rook? He specified "as long as your image key is safe". – occulus Feb 17 '13 at 11:37