PBKDF2
is a method to create a secure encryption key from a password. PBKDF2
stands for "Password-Based Key Derivation Function 2".
You will also need to provide the number of rounds, see PBKDF2 Calibration.
AES
is an encryption method. AES stands for "Advanced Encryption Standard".
Other things you will need to handle:
- Encryption mode
- IV (Initialization Vector)
- Padding
- Key size
Both PBKDF2
and AES
are supported by iOS CommonCrypto.
What you need to do is a two step process:
- Use PBKDF2 to create an encryption key from a password string.
- Then encrypt the data using the encryption key.
Finally you will need to secure the encryption key.