3 ms·
I'm of a mixed opinion on this. If the rest of the system used a secure PRNG that allowed for accumulating entropy, then such a thing couldn't hurt. However, ma
by NateLawson 17y ago
I'm of a mixed opinion on this. If the rest of the system used a secure PRNG that allowed for accumulating entropy, then such a thing couldn't hurt. However, many designers might depend only on that source, and without careful review, that might be a mistake.
Here's a paper on the Via hardware RNG I helped write. I have not seen this level of analysis from vendors of other hardware RNGs. In summary, the entropy source is pretty good but has some bad modes if you mess with some of the config bits.
http://www.cryptography.com/resources/whitepapers/VIA_rng.pdf http://www.cryptography.com/resources/whitepapers/VIA_rng.pd...
I crusaded for a long time for FreeBSD to not use this source directly. Instead, someone put in a Davies-Meyer AES hack that just whitens the last few bytes of output. So if you can get a predictable series of sequential bytes out of the Via RNG at any point, you've broken /dev/random on that machine.
Oh look, that code is still there:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/random/nehemiah.c?rev=1.5 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/random/neh...
Here's where it swaps out the decent Yarrow PRNG for this ad-hoc one:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/random/probe.c?rev=1.7 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/random/pro...
So running FreeBSD on a Via machine is actually LESS secure because other entropy, such as disk IO, timers, etc. doesn't get hashed in. This is exactly what I'm arguing when I say a single hardware source can sometimes lead to less secure system choices.
BTW, I doubt this constitutes vuln disclosure since I wrote core@ about this about 4 years ago and the maintainer decided it wasn't important. Ironically, the reason given was that this is higher-performance than Yarrow and the hardware RNG appears good.
- cperciva 17y agoI agree, FreeBSD's entire approach to entropy could do with being thrown out and rebuilt from scratch; I'd love to do this myself, but I don't have the time/energy right now. That said, I'd say that there are probably bigger issues in FreeBSD than this.
- bh23ha 17y agoCan you make a note to yourself to do it after tarsnap makes you filthy rich? And btw, tarnsap is awesome!