Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I am creating an application which runs on a mobile node with Ubuntu, which does not generate enough entropy bytes to the /dev/random, and does not always stay connected on the Internet to use typical socket entropy-gathering solutions such as EGD.

Are there any good tools for gathering the needed entropy in my situation?

Just to clarify, trying to get 1024 bytes (which seems to be the recommended value by the OpenSSL book) via /dev/random took nearly two hours...

share|improve this question
add comment

1 Answer

up vote 11 down vote accepted

The proper way is to use /dev/urandom, not /dev/random. There are very few cryptographic algorithm for which /dev/random is even theoretically better than /dev/urandom (this would be information-theoretic secure algorithms, not mundane things like AES or RSA). /dev/urandom produces randomness of cryptographic quality provided that it could get at some point at least 20 bytes or so of "true randomness", something which the OS took care of during installation. /dev/urandom happily extends that initial seed into megabytes of pseudo-alea which is computationally indistinguishable from true randomness (that's all you need), and it will never block.

share|improve this answer
Thanks, this at least worked. If someone has anything to add regarding the strength/entropy of the bytes produced I would apreciate it, as it only seems to be (at least) 20 byte entropy to me (from your statement?) –  ephrack Apr 23 '11 at 13:54
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.