12Jan2008 (UTC +8) On 1/12/08, Gerald Timothy Quimpo <[EMAIL PROTECTED]> wrote: > On Fri, 2008-01-11 at 23:42 +0800, Drexx Laggui[personal] wrote: > > [EMAIL PROTECTED] ~]# time badblocks -c 512 -s -w -t random -v /dev/sdd > > real 0m31.177s > > > [EMAIL PROTECTED] ~]# time dcfldd if=/dev/urandom bs=512 of=/dev/sdd > > real 1m7.754s > > > [EMAIL PROTECTED] ~]# time dd if=/dev/urandom bs=512 of=/dev/sdd > > real 1m7.519s > > I think that's due to reading from /dev/urandom. badblocks > probably has a cheaper way to get randoms.
Thanks for the lead. I read the source, and found that badblocks uses srandom() with current time as the seed. "dd if=/dev/urandom" meanwhile re-uses the internal entropy pool. So you're right! I guess that with regular PCs, "badblocks -c 512 -s -w -t random" will be good enough and a bit more useful. With with higher-risk computers however, I'd recommend the use of "dd if=/dev/urandom". For the truly secure machines that have the luxury of more preparation time, "dd if=/dev/random" is the way to go. Drexx Laggui -- CISA, CISSP, CFE Associate, CCSI, CSA http://www.laggui.com ( Singapore / Manila / California ) Computer forensics; Penetration testing; QMS & ISMS developers; K-Transfer PGP fingerprint = 6E62 A089 E3EA 1B93 BFB4 8363 FFEC 3976 FF31 8A4E _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

