Hayden Kreuter
Hayden Kreuter

Reputation: 11

Storing Keychain Keys in Core Data?

I'm using CoreData framework to store all the data for my iOS app. Some attributes contain sensitive data and need to be protected. Does it make sense to store the sensitive data in keychain and the keys to the data in CoreData? Is this secure or should I consider a different approach? Thank you for the help!

Upvotes: 0

Views: 209

Answers (1)

Rob Napier
Rob Napier

Reputation: 299595

Keychain is designed to protect "secrets," which are small amounts of sensitive information that are generally used to access other things. This includes things like symmetric and private keys, access tokens, and passwords. To store larger amounts of sensitive information, you should encrypt it and store the keys in Keychain. You would store the encrypted data in Core Data, not the keys.

Upvotes: 2

Related Questions