So, I'm encrypting list of documents with AES algorithm. I use PBKDF2 to determine key from user password. I have a few question about store data and IV/salt:
How to store documents:
- Encrypt all documents with one AES key, IV and salt
- Encrypt each document with one AES key, but separate IV and salt
How to store/retrive IV and salt:
- Get IV from PBKDF2 (like AES key) and no need to store it somewhere
- Generate IV before every document encryption and store as plain text
- For salt, I think, there are no option - anyway I need to store it as plain text
As I unterstand from that article (http://adamcaudill.com/2013/04/16/1password-pbkdf2-and-implementation-flaws/) and some others:
- It's OK to store IV and salt as plain text, as sometimes attacker even don't need to know them
- Different IV can only "distort" first cipher block (for CBC mode), but not all, so it doesn't bring mush security to AES method.