iphoneiosios5

Store information inside keychain


How much amount of data can be stored inside the iOS key-chain?

When research online, I can see the URLs which talks about storing username and password, not storing the db inside.

Can we store db inside the keychain? How to store the db more securely?


Solution

  • No, it's not intended as a general-purpose secure datastore. From the iOS App Programming Guide (emphasis mine):

    Keychain Data

    A keychain is a secure, encrypted container for passwords and other secrets. The keychain is intended for storing small amounts of sensitive data that are specific to your app. It is not intended as a general-purpose mechanism for encrypting and storing data.

    What you probably could do is store the data in more conventional places, and secure the decryption key in the keychain.