Core data Encryption

Discussion in 'iOS Programming' started by Soulstorm, Jul 19, 2009.

  1. Soulstorm macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #1
    I have an application almost ready, which relies heavily on Core Data. I was wondering what is the best way to use encryption with core data. I know that CommonCrypto is available for the iPhone, but what would be the best method to use it?

    I lean towards encrypting the .sqlite file that Core Data uses with AES-128 on application quitting, and decoding it on application Launch.

    Do you agree that is the best method, or is there a better method?
     
  2. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
    AES-128 is breakable on modern hardware in a fairly short space of time, so depending on how sensitive the data you're encrypting is you might consider AES-256 (though presumably a serious attacker would just freeze the device and extract the key from memory).

    How are you enforcing a strong key if users have to type it every time the app launches?
     
  3. Data Encryption macrumors newbie

    Joined:
    Nov 5, 2010
    #3
    I also used .sqlite file and it works great on me. That's right, you have to make sure that using the data encryption tool won't sabotage it's main purpose, which is to securely encrypt data.
     

Share This Page