by DenisM · 14y ago · 0 comments
1. Using iOS keychain. The nice thing about it is that it's transparent to the user and easy to explain - "we store it he same way Mail app stores your email password".
2. Asking the user to enter a pass phrase and use it as an encryption key. The key here is to resist the urge to hash the phrase to turn it into a key, and instead use a well known key derivation function for the same purpose.
With regard to the second point, one added benefit of SQLCipher over a roll-your-own solution is that SQLCipher automatically applies PBKDF2 derivation. It handles most of the security under the hood so that the application doesn't need to worry about it.