7 ms·
It's not hard by itself. These interfaces are actually pretty straightforward to design and implement; Linux made things hard for itself by designing a weirdly
by tptacek 5y ago
It's not hard by itself. These interfaces are actually pretty straightforward to design and implement; Linux made things hard for itself by designing a weirdly complicated interface with an entropy credit system, an idea that's more or less discredited now.
What's hard is accurately surveying the last 15 years of systems built on top of Linux's needlessly-complicated LRNG and making changes that don't violate the expectations of those systems. Nobody should be running "jitter entropy daemons" in userland (userland RNGs are essentially the source of all practical CSPRNG vulnerabilities in the past 2 decades), but people do, and if those systems exceeded some threshold of security before Donenfeld's patches, you can't merge those patches if they push security below that threshold.
It's a really irritating problem.
- cperciva 5y agoan entropy credit system, an idea that's more or less discredited now ... no pun intended, I'm sure.
- tptacek 5y agoNope, just coming off a migraine and not catching stuff like that. :)
- yxhuvud 5y agoAlso,the problems seems mostly to be around Linux running in a VM rather than on actual hardware. Would it be possible to have the host urandom show up as a hw random number generator to the VM and then use that for initiating things? Seems less hacky than having to fiddle with seeds. Dunno how possible that is though.
- loeg 5y agohttps://wiki.qemu.org/Features/VirtIORNG https://wiki.qemu.org/Features/VirtIORNG
- AnssiH 5y agoYes, and that is commonly used. But Linux must continue to work even on VMs without that, and that is the hard part.
- pm215 5y agoYou can do that where for instance the VM has PCI and can plug in a virtio RNG device. But a lot of the QEMU setups Guenter Roeck reported issues with are emulating real (usually old) hardware which didn't have a PCI bus, or any other hardware RNG interface.
- mjevans 5y agoAlso lighter systems such as routers (E.G. many OpenWRT targets)
- loeg 5y agoThe VMs described in the article are (faithfully) emulating real hardware lacking unpredictable timers or other sources of entropy. It’s not exclusively a VM problem; it’s a weird/old hardware problem, too.
- rocqua 5y ago> userland RNGs are essentially the source of all practical CSPRNG vulnerabilities in the past 2 decades Is your point that CSPRNGs should not be implemented in userland, but instead should just read from /dev/random or do the equivalent on non-linux opperating systems?
- loeg 5y agoYes, that’s been Thomas’s position for many years[1]. And I mostly agree with him on that. [1]: https://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ https://sockpuppet.org/blog/2014/02/25/safely-generate-rando...
- amelius 5y ago> Nobody should be running "jitter entropy daemons" in userland (userland RNGs are essentially the source of all practical CSPRNG vulnerabilities in the past 2 decades), but people do, and if those systems exceeded some threshold of security before Donenfeld's patches, you can't merge those patches if they push security below that threshold. Why not break their code? Seems justified in this case.
- Quekid5 5y agoFor better or worse Linux doesn't break userland.
- raverbashing 5y ago> What's hard is accurately surveying the last 15 years of systems built on top of Linux's needlessly-complicated LRNG and making changes that don't violate the expectations of those systems. Sounds like they need a compatibility or feature (cmdline) flag. Add the flag and you can use the new improved system. Establish dates for when the old method will not be the default anymore (but can be used with the flag) and when it will be deprecated for good
- larusso 5y agoThat won‘t align with the never break the user mantra. And honestly I hate these timebomb solutions some API vendors put up. In a never breaking system you can‘t remove anything only add things or change stuff internally to make it work like before. They never said to get rid of /dev/random or /dev/urandom just that both would practically be the same. From reading about the problem and the different usecases and expectations it looks like it will stay like this for another decade or more.