6 ms·
"Optionally, at this point you might want to overwrite any preexisting data on your hard drives with zeroes or, preferably, random values." Am I being silly, o
by keithpeter 11y ago
"Optionally, at this point you might want to overwrite any preexisting data on your hard drives with zeroes or, preferably, random values."
Am I being silly, or could a hard drive full of random data be confused with a hard drive full of encrypted data by some member of the security services in the future? Would zeros not be a better bet?
The Debian installer attempts to write random data to the whole drive when you elect to encrypt the hard drive (except for the small /boot partition as mentioned in OA). I always quit out of that. My security needs are of the 'laptop left on bus' variety, not enterprise level.
- Terribledactyl 11y agoAt that point, you are trying to remove the ability to read the old files on the disk you are about to use for new encrypted data. Wiping with all zeros will make it extremely difficult to recover files and random will be even more so. But by writing down zeros, you leak metadata about the encrypted parts of your drive. Zeros almost certainly don't contain data, but the noise will. If I can see you have 30gb of noise on a drive, rest zeros then I know something I probably shouldn't, namely that you have written at least 30gb to that drive. But that same 30gb of noise wouldn't be discernible in a drive full of random data. What you might be thinking of is when decommissioning the drive after having encrypted it. At this point, I don't think it matters. I'm not sure drives come with all zeroed status from the manufacturer anyways.
- Someone 11y agoIf you are concerned about leaking 'this was written earlier', you have to mimic what a factory-new disk looks like. It seems likely that is either all zeroes, all ones, or uniform noise, but is that true, and if so, which is it? I would not know. Does anybody on HN?
- buy_used 11y agoBuy a used platter of off eBay or from your favorite reseller of refurbished equipment (and keep the receipt). Replace the disk's controller with one of your own (the one it came with was broken). Ummm, I dunno what the previous owner of this drive has done with it!
- justinjlynn 11y agoIn this era of strict liability crimes that won't help you. In fact, it may actually be more risky.
- buy_used 11y agoHow so? By future laws that outlaw resales? Make do-it-yourself repairs illegal? Yeah, that would suck.
- dasyatidprime 11y agoI think ey probably meant “finding illegal content on the parts of the platter you haven't touched yet”.
- justinjlynn 11y agoYes, that's what I meant. It's possible that merely having some forms of data in your possession would be considered prima facie evidence of crime -- there is no need for the state to demonstrate that you put it there or that you had any idea it was there to be convicted. That you might take content from somewhere and not look at what it is before carrying it is reckless -- and much like carrying, through airport security, luggage packed by someone unfamiliar to you.
- mey 11y agoPer your security concerns, yeah it would be overkill. What they are attempting to protect is two fold, information leakage about how much data is available (size of non-zero data, even if encrypted) and trying to ensure previously deleted data is harder to pull from the magnetic field. On the second point, it is possible to extract previously written data even if it has been overwritten with disassembly of the harddrive and speacial tools. This is why things like Boot and nuke exist and why the DoD requires harddrives be physically destroyed by incineration rather than reused. Either way, both of those particular concerns are overkill for keeping a random thief from accessing your passwords.
- c0nducktr 11y ago> On the second point, it is possible to extract previously written data even if it has been overwritten with disassembly of the harddrive and speacial tools. Has this ever been demonstrated?
- kryptiskt 11y agoHere is a paper about it: http://www.vidarholen.net/~vidar/overwriting_hard_drive_data.pdf http://www.vidarholen.net/~vidar/overwriting_hard_drive_data... "The purpose of this paper was a categorical settlement to the controversy surrounding the misconceptions involving the belief that data can be recovered following a wipe procedure. This study has demonstrated that correctly wiped data cannot reasonably be retrieved even if it is of a small size or found only over small parts of the hard drive. Not even with the use of a MFM or other known methods. The belief that a tool can be developed to retrieve gigabytes or terabytes of information from a wiped drive is in error."
- mey 11y agoThanks, that is an excellent paper.
- duaneb 11y ago> Am I being silly, or could a hard drive full of random data be confused with a hard drive full of encrypted data by some member of the security services in the future? Would zeros not be a better bet? I was under the impression zeroing, well, didn't fully zero—specialized tools can recover the former bits. If you write a truly random stream to the drive, it's much harder to recover the former bit versus the new, random one. To my understanding it's the same reason why XORing one-time-pads are utterly effective as a form of encryption (and you can throw away the pad).
- cuckcuckspruce 11y agoZeroing should be sufficient on any recent drive[0]. The remanence of modern magnetic drives is so low that zero should be sufficient to wipe out whatever is there. [0] http://security.stackexchange.com/questions/10464/why-is-writing-zeros-or-random-data-over-a-hard-drive-multiple-times-better-th/10474#10474 http://security.stackexchange.com/questions/10464/why-is-wri...
- duaneb 11y agoGood to know!
- xenophonf 11y agoWhile the original poster doesn't enable it, GEOM_ELI can authenticate the storage using a HMAC, with HMAC/SHA256 the recommended algorithm. If you don't overwrite the entire encrypted volume (e.g., `dd if=/dev/zero of=/dev/da0s1a.eli bs=4k`), reads from uninitialized sectors fail due to data integrity verification errors, which might be interpreted by the file system as a bad sector instead of an empty one.