[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [partman-crypto] Trying to understand crypto_do_wipe ( )



On Sun, Sep 07, 2008 at 12:41:14PM +0100, Oei, YC wrote:
I was looking at the code that writes random data to disk as part of
setting up an encrypted partition. The main reason I was interested is
that it seems to be quite a lot faster than something like "dd
if=/dev/urandom of=/dev/sdx", and so I wanted to know how it works.
However, as far as I understand the code now, it seems to be writing
zeroes rather than random data (!).

You missed the interaction between crypto_wipe_device() and crypto_do_wipe().

crypto_wipe_device() will first setup a crypt-device using a random passphrase, then write data to the crypted device. After that is done, the crypt-device is unmounted and the key is effectively lost and forgotten...the result should be indistinguishable from "truely" random data for all practical purposes.

--
David Härdeman


Reply to: