I try to really securely encrypt a file with OpenSSL. I´m new to OpenSSL and just read here, that it´s not very secure due to it´s behavior in generating salt & IV, and storing it within the encrypted file.
I use a Server, where OpenSSL is the only tool available for file encryption (currently I have V1.0.1t).
Let´s say, I use a password with 256 or more bytes of random data, including all kind of special chars and aes-256-cbc for encryption.
I know, the md5 of password + salt is stored in the first 32 bytes of the enrypted file now. Quite weak so far...
What if I use a little trick and read out that first 32 bytes and store them in a different location (DB, etc.). Then overwrite them in the file with random data... Later for decrypting I put the original bytes back into the file, prior to decrypting.
As far as I understand, this would be a huge increase of security, as long as no one gets access to the stored fragments.
Is this correct? What do you think?