lkml.org 
[lkml]   [2009]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: dd if=/dev/random of=data.bin bs=512 count=1
From
Date
On Sat, 2009-05-23 at 20:12 +0100, Jon wrote:
> Hello KOSAKI,
>
> Thank you for your reply.
>
> KOSAKI Motohiro wrote:
> >> Hello
> >>
> >> Issuing this command, I expected to get a file 4096 bytes in size.
> >> Could someone let me know if I have missed something..? Or is there a
> >> problem with using /dev/random this way?
> >>
> >> if I have a count=10 it hangs forever (several hours).
> >>
> >> Changing to use /dev/urandom and it generates the file ok.
> >
> > you already have the answer. /dev/random might blocked, /dev/urandom doesn't.
>
> Is this a "feature" of /dev/random ? ..it does not seem very useful to
> have it able to block for so long.

Yes. The theory is that it will be secure even in the event of a
catastrophic failure of the cryptographic compression function. But
don't worry about that; use /dev/urandom.

--
http://selenic.com : development and support for Mercurial and Linux




\
 
 \ /
  Last update: 2009-05-23 21:43    [W:0.133 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site