perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <>
Subject Re: how to raise entropy
Date Thu, 23 Dec 2004 00:54:05 GMT

Stas Bekman wrote:
> Stas Bekman wrote:
>>in one window start:
>>cat /dev/random
>>in the other:
>>perl -le 'system ("cat /proc/sys/kernel/random/entropy_avail"), sleep 1 
>>while 1'
> and if in the third window I try to feed /dev/random while doing the above:
> perl -le 'system ("echo stas >> /dev/random") while 1'
> it makes no difference at all. no entropy is added. On the other hand 
> /dev/urandom seems to be always full.

Yes, that's documented behaviour, at least for urandom. urandom is a very
pseudo random source and it will never block

/dev/random on the other hand, is supposed to come with entropy guarantees
and can block when it runs out of it. BUT, I believe that writing to /dev/random
is supposed to add to the entropy pool.

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

View raw message