stan - 2017-12-01

Starting in 4.13 kernel, the cryptographic pseudo random number generator used by the kernel changed from a modified mersenne twister (I think) to chacha20. The way that entropy is used was also changed, so that it isn't utilized as much as it used to be. rtl2832-entropyd still works because the api it calls is still there, but the entropy it provides is not fed continuously into the kernel entropy pool, because entropy only leaves the pool now when the kernel get_random function is called.

This was done because servers were having problems accumulating entropy. The periodic update mechanism that used to be used to add entropy to the pool was deprecated, but left in place. I have a patch that re-enables that interface to re-seed the chacha20 CPRNG from the entropy pool at a user selectable interval. That ensures that a hardware entropy generating device like rtl2832-entropyd, or any other, will be periodically called because the entropy pool will drain.

I have been using that patch for a while now, and it seems to work fine. Unfortunately, it requires that the kernel be built in order to use it because the random.c file has to be patched. I'll probably post it as a download for anyone interested. Unless the update interval was set to a very long time, it wouldn't be suitable for hardware that doesn't have a source of entropy available, so its unlikely to ever make it into the main kernel.