/dev/urandom is too slow to fill a drive

I can never remember how to use OpenSSL to generate randomly seeded garbage. Thankfully, there’s a post on netzgewitter.com:

Speed wiping a hard drive with crypto garbage generated by openssl

Update: netzgewitter.com seems to be down. Here’s the important bit:

$ openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero > /dev/sda

replace /dev/sda with the block device you wish to erase

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s