Note that there are some explanatory texts on larger screens.

plurals
  1. POSecure App Data on iPhone
    primarykey
    data
    text
    <p><strong>EDITED</strong></p> <p><em>Ok, putting aside that voting negative doesn't really help in solving the problem. If you don't have anything helpful to say and you are not interested in the problem, just change page. If you instead have ideas or you are simply interested in knowing different approaches, then your comment is welcome even if it is not perfect or it is simply an idea to experiment</em></p> <p><strong>Problem:</strong></p> <p>I need to store application data in an iPhone app.</p> <p>We were initially storing the data using the classic NSDocumentDirectory path... but how "secure" is this method?</p> <p>Without considering jailbroken devices (I am not interested in fighting this at the moment), it seems that any user (on any genuine device) can, using a simple iPhone browsing software, navigate into this folder and mess up the content, hacking it effectively.</p> <p>If this is the case, what is the best "place" or "method" to use in order to store secure generic data (that are not necessarily passwords in this case).</p> <p>Is it KeyChain a correct way even in these cases or is there a better/alternative way?</p> <p><strong>Note and Core Question:</strong></p> <p>I know about encrypting and securing data with keys etc. I not talking about "obfuscating or protecting their content" </p> <p>Here the problem is different. So let put it in this way:</p> <p>"How do you avoid that the user can access the folder where the files (data, encrypted, sql files, anything you like) are stored, and just mess them up in any way (this could be removing them, copying them, accessing them with an hex editor and modifying values, whatever).</p> <p>It is not <em>what they do with it</em> the point, but instead an even more restrictive <strong>how be sure that the user cannot reach them</strong> at all"</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COI understand your frustration in getting a down vote (especially from those who refuse to leave constructive feedback), but down votes do help future visitors assess questions. Many of us have had unexplained or controversial down votes and all I can say is that it all comes out in the wash. Don't worry about the isolated down vote. In this case, I can only guess that they thought it didn't conform to the [FAQ guidelines](http://stackoverflow.com/faq). I don't know. If you want feedback on why this was voted the way it was, you can solicit feedback on [Meta](http://meta.stackoverflow.com/).
      singulars
    2. COIn answer to your question, I think the solution is generally a combination of encryption and/or digitally signing or otherwise introducing some CRC of your app's data so you can ensure that the data hasn't been altered, or if it has, allow you to identify this situation and generate the appropriate error. It's probably prudent to assume that you can't prevent access/alteration, but at least identify it and handle it gracefully. Usually, though, the process of encryption functionally accomplishes both preventing unscrupulous people from reading your data and identifying if it has been altered.
      singulars
    3. COThanks for your time Rob :). About the votes the frustration comes from the fact that too often someone that doesn't know enough about the topic, thinks that the question is obvious, and there is no effort (or capabilities) in thinking that maybe there is something less obvious that represent the real question. If you want a parallel, it is like when someone score itself as 10/10 in the knowledge of C++, simply because they actually don't know it at all, and only because they think that what they know is actually everything needs to be known :) And we know that this ir rarely true instead.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload