Hi all,

Using Fedora 29 on Raspberry Pi 3 I seem to have a problem using rndg:

uname -a
Linux replica.blabla.bla 4.18.16-300.fc29.aarch64 #1 SMP Sat Oct 20 23:12:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
cat /etc/redhat-release 
Fedora release 29 (Twenty Nine)

rngd is running:
ps -ef | grep rng
root      4710  4409 13 10:57 pts/1    00:00:47 rngd -f -r /dev/hwrng -o /dev/random

The module to support bcm2835 hardware is loaded:
lsmod | grep rng
bcm2835_rng            16384  0

However, rng is painfully slow:

time rngtest -c 10 < /dev/random
rngtest 6
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 200032
rngtest: FIPS 140-2 successes: 10
rngtest: FIPS 140-2 failures: 0
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 0
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=2.201; avg=5.458; max=380.585)Kibits/s
rngtest: FIPS tests speed: (min=28.132; avg=28.328; max=28.468)Mibits/s
rngtest: Program run time: 35792670 microseconds

real 0m35.801s
user 0m0.001s
sys 0m0.071s


Running CentOS 7.5 on an older Raspberry Pi 2 will do much much faster:

ps -ef | grep rngd
root     14024     1  1 10:54 ?        00:00:14 /sbin/rngd -f -r /dev/hwrng -o /dev/random


time rngtest -c 10 < /dev/random
rngtest 5
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 200032
rngtest: FIPS 140-2 successes: 10
rngtest: FIPS 140-2 failures: 0
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 0
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=135.793; avg=166.586; max=191.200)Kibits/s
rngtest: FIPS tests speed: (min=22.076; avg=22.243; max=22.334)Mibits/s
rngtest: Program run time: 1181718 microseconds

real 0m1.192s
user 0m0.002s
sys 0m0.141s

WhatÅ› happening here? It seems like the bcm2835_rng is not picked up; despite the module is loaded.

Hope someone can help!

Winfried