No, a hash of the password is not stored in the file. AES Crypt does compute a hash, though, and that is used as the encryption key. I'll explain...
A 16-octet initialization vector (IV) is generated and used as part of the CBC process. This IV is first inputted into an SHA-256 hash function. Then the user-provided password is added to the SHA-256 hash function 8192 times (overkill, likely, but... that's what is done). The hash computation is the 256-bit key used with the AES encryption algorithm. That's definitely not stored in the file.
To decrypt an encrypted file (that's not split into two pieces), one would have to try any of the 2^256 different possibilities that might be created by the SHA-256 hash function.
If you split the file into two pieces, it becomes a bit more complex to break. You would still have to determine the 256-bit encryption key. But, you also need the 128-bit initialization vector. Without that, when you decrypt the first 16-octet block, the block would look like random octets. Those octets would need to be XORed with the IV to get the plaintext. That basically means one would have to try 2^384 different values (the AES key and the IV). At least that would be the case with a brute-force attack.
If you don't have the header and the first 2MB of the file, the difficulty of a brute-force attack is the same as just not having the header. One would need to determine the key (256 bits) and the 128-bit random string of bits that would be used to XOR the first 16-octet block. Thus, again, one needs to consider 2^384 possible combinations with a brute-force attack.
Of course using cryptanalysis, it might be possible to eliminate some key and IV combinations to crack the encrypted file faster. I'm not aware of any such weaknesses, though. A brute-force attack on a 256-bit key would take the fasted commercially available password cracker 1.049×10^58 years to crack. That's a long time. Even if exploits made it possible to eliminate half of the possible combinations, trying 2^128 combinations would take the fastest password cracking hardware 3.083×10^19 years to crack.
One question we all have is "what exploits does the governments of the world have?" Nobody will tell us if there is one, but at least we can take some comfort in the fact that experts in cryptanalysis do try to find weaknesses and would publish any such exploits.
While you're trying to find a way to make this even more secure, here's another idea:
- Split the header from the encrypted body.
- Compute an SHA-256 hash of the header.
- XOR the encrypted body with the that hash. (Basically, read 256 bits and XOR those with the 256-bits produced by SHA-256 from the beginning of the file to the end.)
Now if somebody got the encrypted part of the file, the person would need to figure out the 256-bits of data used to XOR with the encrypted file part to re-generate the cyphertext even before one can try to crack the encryption. The only weakness with that is that 33 octets from the end of the file is a "modulo" octet that is always in the range of 0..15. So, this knowledge could be used to more quickly determine the hash used in the XOR operation. To prevent that exploit, you could move the last 33 octets of the encrypted part and put that in the header just to keep it private. Or, you could do this:
- Split the header from the encrypted body.
- Compute an SHA-256 hash of the header.
- Compute an SHA-1 hash of the header.
- XOR the encrypted body with the that SHA-256 hash.
- XOR the encrypted body with the that SHA-1 hash.
That's security through obfuscation, but it certainly would be an obfuscated mess to try to decrypt. Decrypting would require the header, re-computing those hashes, performing the XOR operations in reverse, then merging the header and encrypted body, then decrypting.
And, wow, if you will then have another layer of encryption under all that... I'd love to meet the person who might possibly be able to exploit your encrypted files.