News for hackers. Stuff that matters.
Re:NUID – An entropy friendly and highly performant unique i... by tptacek on Wednesday February 24, 2016 @05:00PM (#11170581)
There is no such thing as "entropy draining".

If it's higher-performance than other UUID generators, fine, that's a win. But it's not doing anything useful for the system as a whole by sparing the "entropy pool".

Re:NUID – An entropy friendly and highly performant unique i... by derekcollison on Wednesday February 24, 2016 @06:12PM (#11171011)
I disagree, either the entropy is drained and the randomness of what the pool returns (based on OS) is compromised or you get stalled waiting for more of it and decrease performance of the generator.

https://www.google.com/webhp?q=draining+entropy+pool

Re:NUID – An entropy friendly and highly performant unique i... by tptacek on Wednesday February 24, 2016 @06:32PM (#11171118)
A simple thought exercise to show you how false this is:

Instantiate AES-128-CTR with a random key. Encrypt 100 megabytes with it. Have you "drained" "key" from AES? No, not in any meaningful sense. If you could, the AES-CTR recommendations would say "don't encrypt more than 100 megabytes with AES-CTR". In practice, people routinely encrypt many gigabytes with it.

Every modern OS uses a DRBG for its kernel CSPRNG. You can think of a DRBG as a stream cipher, just like AES-128-CTR, where random events are hashed to form the key, and the output is the raw keystream. Asking for 100 megabytes of additional keystream doesn't "drain" the "key" from the keystream.

Linux has a terrible misfeature, born of a failure to understand the crypto primitives they're using in their CSPRNG. /dev/random keeps an "estimator" that tries to determine how much "entropy" has been fed to the CSPRNG, and it decrements that estimator when requests come in for random bytes. Linux claims you can drain its CSPRNG. Linux is wrong; that is not how crypto works.

Linux should lose that feature, but they will not. But there's no reason you should have to go along with it; just use urandom, which will not block for the estimator.

Re:NUID – An entropy friendly and highly performant unique i... by nullc on Wednesday February 24, 2016 @06:15PM (#11171023)
In the immortal words of Timecube: "You have been educated stupid".

Fortunately, salvation is readily at hand: http://www.2uo.de/myths-about-urandom/

Re:NUID – An entropy friendly and highly performant unique i... by derekcollison on Wednesday February 24, 2016 @09:43PM (#11172017)
I think entropy, in however you measure it, does influence something like a UUID generator differently than the cryptographic algorithms. What you are trying to achieve, or more importantly the condition you are trying to avoid, is different.