
On Tue, Jan 7, 2020 at 3:30 PM Mauro Condarelli mc5686@mclink.it wrote:
...
I also have problems with entropy pool in Linux, do you happen to know if (and how) MT7628 supports HWRNG?
what problems exactly?
On a embedded device you usually can only add randomness from interrupts sources to the entropy pool due to lack of disk or input devices. On a router the most interrupts are typically generated by drivers for ethernet and SPI/NAND/MMC controllers. You could use user-space daemons like haveged [1] to add more randomness from hardware events.
Also have a look at the documentation in Linux's drivers/char/random.c for more information, especially the paragraph "Ensuring unpredictability at system startup".
PS: In my day job (embedded router devices) I use a hash like SHA256 over the U-Boot MTD partition where also some device specific information like MAC addresses and serial numbers are stored to generate the initial seed for the entropy pool on first boot. Afterwards I manage the random seed over reboots as described in drivers/char/random.c.
[1] https://linux.die.net/man/8/haveged