1

I'v been doing some research and it seems it is recommended to zero out / wipe / overwrite the disk before full disk encryption.

Why would that be necessary even when encrypting the entire disk?

1
  • I usually put full disk encryption on recently purchased computers (without wiping the disk). The computer is fresh. There is no sensitive material on it. This recommendation must be for the case that you are encrypting a disk with sensitive information. Even so, I don't understand it.
    – emory
    Mar 3 '16 at 19:58
2

I think one source of confusion is about the order of operations. This page may help (or not).

Basically, this comes from a situation where the encryption is about to be applied on a complete, logically empty partition. Applying the encryption is easy because you just have to ask the OS to thereafter apply encryption whenever it is going to write something on the disk. However, there is no preparatory step for existing partition contents: these are all unused sectors anyway, so nothing will read them in the course of normal file management.

If the partition contained non-random data, then sectors that have been written to are encrypted and "look random", while sectors that have not been written to yet retain the bytes that were originally there, i.e. the non-random bytes. Observers may then infer which sectors have never been used. Whether this gives them any advantage is anyone's guess, but it seems that it is sufficient for some people to panic a bit and ask for a preparatory wiping.

The point of such a "wiping" is to populate the physical disk with bytes that will be undistinguishable from encryption output, i.e. they must "look random" since encryption output is supposed to en undistinguishable from random bytes. There are two main methods for that:

  1. You overwrite the complete partition with random bytes (e.g. from /dev/urandom) before you apply the encryption.

  2. You overwrite the complete partition with arbitrary data (typically zeros, because /dev/zero is there and just begs to be used) after you enabled encryption, because then the write on the physical medium will be done with encrypted data, that really looks like encrypted data, which was the point.

2
  • This makes sense, but in my use case (which I thought was the common use case) of encrypting brand new equipment, there is no advantage. I don't care if an attacker can make out was on the disk at time of purchase. Am I missing something?
    – emory
    Mar 3 '16 at 20:18
  • If you don't "wipe" the disk then the attacker can make out which sectors you actually rewrote in the course of machine usage, which might (just might) leak a tiny bit of information about your usage pattern (average size of created files, or something like that). It is not a very serious leak.
    – Tom Leek
    Mar 3 '16 at 21:13
0

This could also have something to do with relocated sectors. These sectors may contain unencrypted copies of data and cannot be overwritten with normal user programs like full disk encryption software. Only vendor-specific low level formatting tools will be able to wipe them.

This is especially relevant to SSDs which remaps sectors all the time to do wear levelling. However, to save the extreme wear coming from a full disk wipe, most recent SSDs are already full-disk-encrypted out of the factory. A wipe can be simulated by generating a new random key with the manufacturers' tools.

With most of these SSDs, you can also set an "IDE password" through the BIOS which encrypts the encryption key with the password. Bitlocker on Windows 8.1 and later can transparently use this feature to offload encryption work to the disk itself for compatible SSDs ("eDrives").

TL;DR: low-level format if you had sensitive data on an HDD. Enable IDE password for SSDs (or Bitlocker on compatible SSDs) to achieve equivalent protection.

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.