I'm working on a project to build software for file encryption with AES in Java, it's operation is quite simple, but I was wondering if it is really safe.
The program prompts the user for a passphrase to encrypt the selected file, after entering the passphrase, it's secured with a Key Derivation Function PBKDF2 With Hmac-SHA256, salt is a Pseudorandom Number Generator to
8-byte SHA1 PRNG, iterations are 100,000 and key length is 256-bit.
The secure key generated is used to encrypt the file.
The Initialization Vector for the AES is a Pseudorandom Number Generator of
16 byte SHA1 PRNG, the file is now encrypted.
The first 16 bytes of the encrypted file is saved to the IV and for the past 8-bytes to store the salt of PBKDF2.
The salt and IV are not encrypted along with the files, but are added later. Are these operations are safe?