Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Your random numbers are not that random

by Anonymous Monk
on Jul 22, 2012 at 15:21 UTC ( #983071=note: print w/ replies, xml ) Need Help??

in reply to Your random numbers are not that random

Do you have anything installed to feed randomness into the system? I seen a number of ArchLinux posts about installing keys onto a Pi, and needing to have haveged running in order to get enough entropy to make a key.

Comment on Re: Your random numbers are not that random
Re^2: Your random numbers are not that random
by davies (Vicar) on Jul 22, 2012 at 15:43 UTC

    As you may see above in my reply to Cavac's post, there are random "devices" and I can get apparently random numbers. But I'm not actually trying to do anything with random numbers, which is why I find the response to perl -v idiosyncratic. The difference between the working card and the problem cards is that Perl was compiled on the working card and copied from there to the problem cards. Both cards had the same image copied to them using the same computer. Apart from Perl, everything works perfectly on both cards. I cannot see how the problem can be anything other than my failure to copy something from the working card to the problem cards, as the Perl creation process is the only difference. Sorry if my frustration is showing again.


    John Davies

      But on startup, perl is doing something with hashes i presume. Having no working random number generator is a big problem with hashes. Without it, there is a big problem with Denial of Service attacks. A simple use CGI; my $q = CGI->new; or using any other kind of hashes with user-supplied content can be a problem.

      So, if getting random numbers doesn't work, it is much better for perl to fail at startup than to fail silently and expose the system to all kinds of security problems.

      "I know what i'm doing! Look, what could possibly go wrong? All i have to pull this lever like so, and then press this button here like ArghhhhhaaAaAAAaaagraaaAAaa!!!"

      /dev/random and /dev/urandom are used to supply entropy (randomness) to the system. They both come from the same pool of randomness in the kernel. One blocks until enough randomness is obtained to provide a number. The other tries to make due with however much randomness the kernel has (and doesn't block).

      Haveged (and other programs) are means to supply the kernel with randomness. By default, haveged manages a 1M buffer of randomness. Haveged does not appear to keep open a file for this buffer of randomness, so perhaps it doesn't write the buffer to disk on shutdown.

      But in any event, it seems to build the pool of randomness in the kernel faster than most other things I've tried.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983071]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-10-02 00:47 GMT
Find Nodes?
    Voting Booth?

    What is your favourite meta-syntactic variable name?

    Results (41 votes), past polls