Encrypted file and decrypted hash What is the risk of storing an MD5 (or similar) hash of a decrypted file alongside the encrypted version of the same file.

Obviously if someone were to attempt a brute force attack against the file having the hash would provide an end condition for the attack.  Does providing the hash make reversing the encryption easier in some other way?
What is the risk of storing an MD5 (or similar) hash of a decrypted file alongside the encrypted version of the same file.


Note that MD5 is not considered secure anymore, especially with regards to hashing or signing files. Please consider SHA-2 or SHA-3 for your hashing needs.

Otherwise, you're answering yourself below. 


  Obviously if someone were to attempt a brute force attack against the file having the hash would provide an end condition for the attack.


Indeed, and that's the main problem.


  Does providing the hash make reversing the encryption easier in some other way?


No, because the hash - even MD5 - is not reversible, so it doesn't leak any other information. Cryptographically secure hashes are one way functions. You can only brute force them.



Note that storing a hash in the same location only provides protection against errors. An attacker may e.g. brute force the plaintext, change a single bit in by e.g. changing the CTR-encrypted ciphertext and recalculate the hash.

Storing a signature over the plaintext data makes a whole lot more sense. Or, if you want to always store the files encrypted and do not want to leak information, store a signature over ciphertext.