When dealing with full disk encryption a lot of utilities I've worked with will provide the option to fill the disk with random data to make distinguishing the encrypted contents harder to identify.

I've always wondered why do this when the process is extremely slow and often time requires that the system not be powered in to the main OS?

My leaning has always been to leave that option off and then use a free space shredding utility within the OS. Sometimes one that finishes by zeroing out the disk, other times with random contents.

Is there some kind of benefit to the pre encryption wipe that I'm not seeing? It doesn't seem that the overhead is worth it?


2 Answers 2


There are two distinct reasons why a disk encryption might fill the storage area with random data.

If you're encrypting in place, or more generally if there's a chance that the storage area contains plaintext data that you don't want to expose, then the existing data needs to be wiped, otherwise traces of old data may remain in space that hasn't been overwritten by encrypted data yet.

Wiping with zeroes is enough against all attacks that don't use specialized hardware such as an electron microscope. Wiping with zeroes is enough even against all published attacks with specialized hardware for most storage media. In the 1990s, Peter Gutmann demonstrated that data could be recovered to some extent after overwriting it with zeroes, due to magnetic remanence. The effect is rather small and each bit has an independent chance of not being recovered correctly, so it's difficult to recover data, but theoretically possible, leading to the recommendation of random overwrites. In any case, the remanence effect is so small on contemporary hard disks that overwriting with zeroes is good enough.. For EEPROM, but not other flash technologies, I've seen recommendations to overwrite with multiple passes of random data. For NAND or NOR flash, overwriting with zeroes is good enough.

To put it simply, overwriting with random data instead of zeroes is useless paranoia in almost all cases where it's used.

There's a different reason to fill the disk space with random data, which is if you consider the size of the encrypted data to be confidential. Encrypted data is indistinguishable from random data if you don't have the key. Therefore, in a disk filled with random-looking data, it's impossible to tell which bits are random and which are encrypted. This is only a very small privacy concern since revealing how much disk space is free is rarely a concern.

If you want to start storing data before wiping, it's more complicated: the wiping tool and the disk encryption tool have to know which area they can use and which area is the domain of the other guy. Also, if you were relying on the free space being wiped or randomized, then your disk does not meet your security requirements until the free space has been properly disposed, so you shouldn't be using it.

In summary, overwriting with random data is rarely useful. But if you do want it, you need to wait until it's done.

  • Thanks. This is helpful. I still don't see the difference about the wiping tool even if confidential data is already present. Once the data is encrypted and rewritten by the in place tool it's no longer free space. The OS knows this. Overwriting all the free space should still result in the entire drive being encrypted. Right? Aug 6, 2013 at 19:32
  • @TimBrigham Yes, it isn't an insurmountable difficulty by any means, I only meant that the disk wiping software and the storage encryption software need to be coordinated. Aug 6, 2013 at 20:31

I think that totally depends on what you are trying to hide as well.

For 99/100 cases you're right its probably not worth the overhead, although if you are really concerned about making sure that none of the data is recoverable (using something like DBAN - https://en.wikipedia.org/wiki/Darik%27s_Boot_and_Nuke) then it may be worth the overhead of performing the wipe first.

You've got to remember that data can be recovered even after wiping over the harddrive even up to 12 times (I believe, I cannot find the article I was reading about this, if I do, I'll edit this answer), so its only safe when you wipe it over 12 times.

However, if you are trying to hide the data, you also have to remember that data from the RAM can be recovered if properly preserved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .