From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Filling a disk with random data - question
Date: Thu, 10 Apr 2014 17:15:16 +0200 [thread overview]
Message-ID: <20140410151516.GA6662@tansi.org> (raw)
In-Reply-To: <20140318023351.GA20894@tansi.org>
Just added this to the Wiki-Version of the FAQ as Item 2.19, if
anybody wants to have a look and comment.
Arno
On Tue, Mar 18, 2014 at 03:33:51 CET, Arno Wagner wrote:
> On Mon, Mar 17, 2014 at 19:55:05 CET, Cpp wrote:
> > Hello,
> >
> > I noticed a lot of online articles recommend to overwrite your hard
> > disk with random data before creating an encryption volume on it.
> > Normally this is done by:
> >
> > # dd if=/dev/urandom of=/dev/sda bs=4096
>
> This is slooooooooooow.... ;-)
>
> > This will of course take a while, and there is also the badblocks
> > alternative. However recently I've seen another approach that uses an
> > encrypted (non-luks) container that is later filled with blank data.
> > It's said that this approach is much faster than the urandom method
> > above.
>
> I came up with that when I had to securely wipe 50 disks
> a few years ago. Other people may have had a similar idea.
>
> > I haven't used this yet, so I hope I got the command line
> > right:
> >
> > # cryptsetup -c aes-xts-plain64 -h sha512 -s 512 -d /dev/urandom open
> > /dev/sda --type plain cryptroot
>
> Make ist easier on you, the defaults are really quite enough:
>
> # cryptsetup create -d /dev/urandom /dev/sda cryptroot
>
> > # dd if=/dev/zero of=/dev/mapper/cryptroot bs=4096
>
> And you can get a progress meter like this:
>
> # dd_rescue -w /dev/zero /dev/mapper/cryptroot
>
> or like this
>
> # cat /dev/zero | wcs > /dev/mapper/cryptroot
>
> (uses my sream-meter "wcs" from: http://www.tansi.org/tools/index.html)
>
> > My question is are there any serious drawbacks of using this method in
> > place of the urandom one?
>
> None.
>
> Arno
> --
> Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
> GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
> ----
> A good decision is based on knowledge and not on numbers. - Plato
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. - Plato
next prev parent reply other threads:[~2014-04-10 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 18:55 [dm-crypt] Filling a disk with random data - question Cpp
2014-03-17 23:17 ` .. ink ..
2014-03-18 2:33 ` Arno Wagner
2014-03-18 22:20 ` Robert Nichols
2014-03-18 23:41 ` [dm-crypt] Filling a disk with random data - use a hige bs= to speed it up Chris Drake
2014-04-10 15:15 ` Arno Wagner [this message]
2014-04-10 15:50 ` [dm-crypt] Filling a disk with random data - question .. ink ..
2014-04-10 16:09 ` Arno Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140410151516.GA6662@tansi.org \
--to=arno@wagner.name \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.