2

A few decades ago, I've known hard disks and floppy disks which developed bad sectors or crashed. So now when I want to use an external hard disk for backups for a startup company, the first thing that worries me is that if I do a full disk encryption and the disk develops a single bad sector in due time, won't all data be lost?

Is it really better to do full disk encryption or store separate projects in encrypted Truecrypt containers? If there is any better way of doing it, please do mention it.

  • 1
    Is this a backup, or is it something like an archival copy? A backup by definition cannot be the only copy of anything, so if you lose the backup, no great harm done; just get a new disk and make a new backup from the primary. Of course, plan for the backup disk to only last a few years, and certainly not longer than the manufacturer's warranty period. – a CVn Aug 14 '17 at 11:01
  • By that definition, it's an archival copy (which we will be using if other backup copies and Git repositories are lost). – Nav Aug 15 '17 at 14:46
6

This depends on the type of encryption you are using and possibly how it is configured. You are correct that certain types of stream cipher require all previous data to continue to decrypt, due to the encryption operation modifying the key stream, however not all encryption works in this mode.

In particular, for file system level encryption, it is obviously not viable to have to sequentially decrypt the entire drive as one giant stream in order to access any particular file. The exact mechanism of encryption can vary, but can be anything from stream ciphers of individual files (which might still cause performance issues with larger files that need random access) or simply applying sector or cluster level encryption that limits the amount that needs to be decrypted to a minimal data retrieval from the drive.

There is always a trade off in the security and uniqueness of the keystream vs the speed of access, just like there are trade offs in different cipher modes, but full disk encryption is not inherently tied to a single bad sector causing a complete loss of data. The exact amount of data loss would depend on the type of encryption being used.

The same applies to your scenario with smaller containers being used on the drive as files. Depending on the mode of those containers, it could either require sequential decryption of the whole thing (which would mean a single sector used in the file dying could wipe it out) or it could be done at a file level where only the involved files would be lost. The container could also potentially work in a level of redundancy to avoid this, though I'm not sure if any encrypted containers currently implement a feature like this.

  • Could you help me with the name of any free disk encryption softwares you know for which bad sectors won't result in loss of the entire data? – Nav Aug 18 '17 at 15:42
  • If you have the right version of windows, BitLocker will work fine. That's what I personally use on my devices that I run encrypted drives on. – AJ Henderson Aug 18 '17 at 16:33
  • I use Linux and Mac :) – Nav Aug 19 '17 at 10:13
1

Whole-disk vs. per-file encryption address different threats, and aren't really comparable.

YES: Most filesystem-level backups (ZFS a possible exception, not sure) are vulnerable to the kind of data corruption or device failure you're talking about. If you don't have all the pieces you don't have a chance of decrypting. Filesystem resiliency (let's just call it availability) and infosec (confidentiality, and they can share integrity) don't always have common ground.

If you're seriously worried about a few bad blocks (or tracks, or sectors, or salt-water soaked boot tapes, whatever is appropriate) there are definitely ways to work around that, erasure codes and appropriately sized and distributed chunks of data come to mind (taohe-lafs, for example).

It seems that what you're really asking is should there be one big basket or a lot lot more little ones. It's difficult for anybody to answer that for you.

EDIT: The above answer is obviously incorrect. A single damaged sector will not result in complete loss of data. Recovery of files from an encrypted filesystem on physcially damaged media is unquestionably more complicated and less reliable than from an unencrypted one. Regardeless, backups should always be encrypted.

  • 2
    You're answering the question "If a single sector goes bad on an encrypted disk, will all data be lost", and that's simply not the case. – Tobias Aug 14 '17 at 10:32
  • @Tobias: Why is that not the case? If the beginning of the disk develops a bad sector, then the decryption program won't even know where to start, right? – Nav Aug 14 '17 at 14:56
  • 3
    @Nav Knowing where to start in the context of disc encryption doesn't really make sense, each sector is encrypted individually. If certain parts of the LUKS header (or comparable data for TrueCrypt or others) were corrupted then the recovery may not be possible, but it seems like the question is concerned about a flipped bit in one sector affecting the entire drive like a flipped bit in certain encryption modes would change everything after the affected block, but as sectors are encrypted individually this is not the case. – AndrolGenhald Aug 14 '17 at 15:35
  • @Tobias yes you are of course right, I should clarify my response and the assumptions I was making about the OP's question. – quadruplebucky Aug 15 '17 at 6:34
0

No, worst case is that the data in that particular sector is lost, and even that may not be the case.

  • Discussion of if this is an answer or not was moved to chat. – AJ Henderson Aug 15 '17 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.