How-to-simply...

Enable hardware random number generator on Rarpberry PI 3b Plus (Centos 7)

  • 1 yum install rng-tools
    vim /etc/default/rng-tools:
    HRNGDEVICE=/dev/hwrng
  • 2 systemctl enable --now rng-tools && shutdown -r now
  • 3 # Fix SE Linux permissions:
    journalctl -b | grep rng
    ausearch -c 'rngd' --raw | audit2allow -M my-rngd
    semodule -i my-rngd.pp
  • 4 # Check Hardware RNG Device is enabled:
    sudo rngd -l
  • 5 # Check it is working:
    sudo cat /proc/sys/kernel/random/entropy_avail
    sudo rngtest -c 1000 < /dev/hwrng
  • N Check /usr/lib/systemd/system/rngd.service rngd -f ... Changed fill-watermark from 0 to 2048

References