Does Truecrypt corrupt data if the PC hangs while encrypting partition?

2

I installed Truecrypt on a new laptop with Windows 7 and started encrypting the system partition. While encrypting, I ran another program which froze the OS. I had to turn the laptop off and reboot, and after rebooting the encryption process restarted.

Everything seems to be ok, but is there any chance that I lost the data which was being encrypted at the time of the crash of the entire OS, or does Truecrypt perform a verification of the encrypted data before marking a sector as encrypted?

Enrico Detoma

Posted 2011-08-02T10:31:46.420

Reputation: 123

Possibly a better question for security.stackexchange.com ? – akseli – 2011-08-02T10:41:23.760

It's absolutely on topic here -- if it doesn't receive any helpful answers, it could be migrated over. In the meantime, Enrico, please don't double-post the question on another site. If you feel it should be migrated, use the "flag" link to inform a moderator. @aks – slhck – 2011-08-02T10:44:14.217

Answers

3

Is there any chance? Yes, some. Does Truecrypt perform checks? Yes, absolutely. Can you be 100% sure it's all fine? No. Can you be 98-99.9% sure it's okay? Yes.

The Truecrypt FAQ suggests chkdsk is still the right way to check an encrypted volume for issues.

I can't answer as to exactly how Truecrypt ensures data integrity, but I can say that it's unlikely Truecrypt would corrupt the content of a file without a corruption in the underlying filesystem structure itself, due to the nature of what it's doing. So, if chkdsk and Truecrypt think the volume structure is okay, then it's very likely the content is as it was before encryption.

EightBitTony

Posted 2011-08-02T10:31:46.420

Reputation: 3 741

That's ok, but chkdsk doesn't perform any check on the content of a file, in case it has been corrupted... My question is, does Truecrypt encrypt data from sector A to empty sector B, then checks sector B and ONLY if sector B is verified ok, THEN sector A is freed? Or something like that, i.e. data is considered encrypted ONLY after it has been verified. – Enrico Detoma – 2011-08-02T12:48:17.737

Updated to respond to your comment. – EightBitTony – 2011-08-02T14:10:18.977