Does the entropy pool /dev/random used the same to /dev/urandom?

I want to

mknod /dev/random 1 9

to replace the slow random, I think the current entropy is randomly enough, if urandom is based on the same entropy, and all succeed random numbers are generated based on that entropy, I don't think there'll be any vulnerable.

link|improve this question

feedback

2 Answers

up vote 5 down vote accepted

At the end of the day, what urandom gives you may well be implementation-specific, but the man page says that it will use the available entropy if it's there, and only fall back to the PRNG when it runs out of entropy. So if you have enough entropy, you should get as good a result as if you'd used random instead.

But, and this is a big but: You have to assume you're getting a purely pseudo-generated value with no genuine entropy at all, because the entropy pool may be empty. Therefore, you have to treat urandom as a PRNG, even though it may do better than that in any given situation. Whether it does is not deterministic (within the confines of your code) and you have to expect that the worst case will apply. After all, if you were sure there's enough entropy in the pool, you'd use random, right? So the act of using urandom means you're okay with a PRNG, and that means a potentially, theoretically crackable result.

link|improve this answer
feedback

random uses only the collected entropy, and urandom is a PRNG. While both may be "secure enough", I seriously would not use urandom for generating keys, for example.

link|improve this answer
Yes I know urandom is a PRNG, but is it seeded from the entropy which random uses? – Xie Jilei Jun 10 '10 at 12:13
feedback

Your Answer

 
or
required, but never shown

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