[clug-talk] Random numbers in Linux: an example

Gustin Johnson gustin at echostar.ca
Thu Sep 8 11:56:19 PDT 2005

A practical application is wiping a hard drive so that data recovery is not 
possible.  The following should be repeated 4 to 8 times depending on ones 
level of paranoia.

dd if=/dev/zero of=/dev/hdx
dd if=/dev/full of=/dev/hdx
dd if=/dev/urandom of=/dev/hdx

On Thursday 08 September 2005 10:33, Mark Carlson wrote:
> Hello everybody,
> This is my first email to the list, so forgive me if this is off-topic
> or formatted incorrectly.
> Last night at the meeting during the GPG demonstration someone asked
> why you should move your mouse around during the key generation.  I
> had mistakenly said that it was the standard C library that offers two
> methods of obtaining random numbers.  When I got home I looked for the
> functions and found out I was incorrect.  It is the kernel itself that
> offers these two methods.  And if you want to check it out, it's
> pretty cool (and it only takes a couple seconds to do.)
> At your shell, type in the command:
> od -t x1 /dev/random
> Notice that it only spits out a small amount of data (if nothing else
> on your system is doing any I/O).  Now move your mouse around (from
> corner to corner on your screen) or hit a bunch of keys on your
> keyboard.  Hopefully there will be more data generated as you do this.
> The other way of obtaining random numbers using the kernel is to get
> it from /dev/urandom.  To test this out, get ready to hit Ctrl+C to
> kill the program as it generates a lot of data very quickly.  Now type
> into your shell:
> od -t x1 /dev/urandom
> Anyways, I had fun at the first meeting I attended and I hope to see
> you all next month :-)
> -Mark Carlson
> _______________________________________________
> clug-talk mailing list
> clug-talk at clug.ca
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/clug-talk_clug.ca/attachments/20050908/68e095e7/attachment.bin

More information about the clug-talk mailing list