On Thu, Sep 19, 2019 at 8:20 AM Linus Torvalds wrote: > > The silly "reset crng_init_cnt" does absolutely nothing to help that, > but in fact what it does is to basically give the attacker a way to > get an infinite stream of data without any reseeding (because that > only happens after crng_read()), and able to extend that "block at > boot" time indefinitely while doing so. .. btw, instead of bad workarounds for a theoretical attack, here's something that should add actual *practical* real value: use the time of day (whether from an RTC device, or from ntp) to add noise to the random pool. If you let attackers in before you've set the clock on the device, you're doing something seriously wrong. And while this doesn't add much "serious" entropy, it does mean that the whole "let's look for identical state" which is a _real_ attack, goes out the window. In other words, this is about real security, not academic papers. Of course, attackers can still see possible bad random values from before the clock was set (possibly from things like TCP sequence numbers etc, orfrom that AT_RANDOM of a very early process, which was part of the Android the attack). But doing things like delaying reseeding sure isn't helping, which is what the crng_count reset does. Linus