Tell me more ×   The application I am working on lets the user
encrypt files. The files could be of any format (spreadsheet,
document, presentation, etc.).  For the specified input file, I
create two output files - an encrypted data file and a key file.
You need both these files to obtain your original data. The key
file must work only on the corresponding data file. It should
not work on any other file, either from the same user or from
any other user.  AES algorithm requires two different parameters
for encryption, a key and an initialization vector (IV).  I see
three choices for creating the key file: 1. Embed hard-coded IV
within the application and save the key in the key file. 2.
Embed hard-coded key within the application and save the IV in
the key file. 3. Save both the key and the IV in the key file.
Note that it is the same application that is used by different
customers.  It appears all three choices would achieve the same
end goal. However, I would like to get your feedback on what the
right appr