I have a backup script that encrypts everything using AES 256
Every day, I generate a random binary file as the password, and encrypt this random file with my public key.
Until now, I printed the SHA256 hash of the unencrypted file on the log, but today I thought that, maybe, the SHA256 of unencrypted data can be used to help a brute force attack to decrypt the password file.
This is how I encrypt the random file:
openssl rsautl -encrypt -pkcs -inkey key.pub -pubin -in random.bin -out random.enc
do you think this has some sense?