iosencryptionstoragebundleencode

How can I encrypt file in the iOS app's bundle to prevent data from copy?


How can I encrypt file in the iOS app's bundle to prevent data from copy? I can suggest to encode/decode it by simple rules. But it will take too much time to encode on every app start and it's not safe enough.

P.S. We should not cause export restrictions. So encrypting algorithm must be not strong.


Solution

  • The App Bundle can not be changed by the app so that option is not available.

    If it is something that is included at build time you can encrypt it prior to building the app and decode it in the app when you need it.

    The problem is that the encryption key must be provided to the app in some manner. Just including the key in the app code is not secure but may meet your needs. Providing the key from a web site with authentication might work for your needs.

    You need to evaluate the level of security you require, who you are protecting against and how much effort/money they are willing to expend to get your data.

    Note: encryption with Common Crypto is very fast. On an iPhone6 I benchmarked the speed as 1MB in 10.8 mSec or 92MB/sec.