Winfried de Heiden
2018-11-13 10:13:38 UTC
Hi all,
Using Fedora 29 on Raspberry Pi 3 I seem to have a problem using rndg:
uname -aLinux replica.blabla.bla 4.18.16-300.fc29.aarch64 #1 SMP Sat Oct 20 23:12:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linuxcat /etc/redhat-release Fedora release 29 (Twenty Nine)
rngd is running:ps -ef | grep rngroot 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 rngbcm2835_rng 16384 0
However, rng is painfully slow:
time rngtest -c 10 < /dev/randomrngtest 6Copyright (c) 2004 by Henrique de Moraes HolschuhThis 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: 200032rngtest: FIPS 140-2 successes: 10rngtest: FIPS 140-2 failures: 0rngtest: FIPS 140-2(2001-10-10) Monobit: 0rngtest: FIPS 140-2(2001-10-10) Poker: 0rngtest: FIPS 140-2(2001-10-10) Runs: 0rngtest: FIPS 140-2(2001-10-10) Long run: 0rngtest: FIPS 140-2(2001-10-10) Continuous run: 0rngtest: input channel speed: (min=2.201; avg=5.458; max=380.585)Kibits/srngtest: FIPS tests speed: (min=28.132; avg=28.328; max=28.468)Mibits/srngtest: Program run time: 35792670 microseconds
real 0m35.801suser 0m0.001ssys 0m0.071s
Running CentOS 7.5 on an older Raspberry Pi 2 will do much much faster:
ps -ef | grep rngdroot 14024 1 1 10:54 ? 00:00:14 /sbin/rngd -f -r /dev/hwrng -o /dev/random
time rngtest -c 10 < /dev/randomrngtest 5Copyright (c) 2004 by Henrique de Moraes HolschuhThis 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: 200032rngtest: FIPS 140-2 successes: 10rngtest: FIPS 140-2 failures: 0rngtest: FIPS 140-2(2001-10-10) Monobit: 0rngtest: FIPS 140-2(2001-10-10) Poker: 0rngtest: FIPS 140-2(2001-10-10) Runs: 0rngtest: FIPS 140-2(2001-10-10) Long run: 0rngtest: FIPS 140-2(2001-10-10) Continuous run: 0rngtest: input channel speed: (min=135.793; avg=166.586; max=191.200)Kibits/srngtest: FIPS tests speed: (min=22.076; avg=22.243; max=22.334)Mibits/srngtest: Program run time: 1181718 microseconds
real 0m1.192suser 0m0.002ssys 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
Using Fedora 29 on Raspberry Pi 3 I seem to have a problem using rndg:
uname -aLinux replica.blabla.bla 4.18.16-300.fc29.aarch64 #1 SMP Sat Oct 20 23:12:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linuxcat /etc/redhat-release Fedora release 29 (Twenty Nine)
rngd is running:ps -ef | grep rngroot 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 rngbcm2835_rng 16384 0
However, rng is painfully slow:
time rngtest -c 10 < /dev/randomrngtest 6Copyright (c) 2004 by Henrique de Moraes HolschuhThis 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: 200032rngtest: FIPS 140-2 successes: 10rngtest: FIPS 140-2 failures: 0rngtest: FIPS 140-2(2001-10-10) Monobit: 0rngtest: FIPS 140-2(2001-10-10) Poker: 0rngtest: FIPS 140-2(2001-10-10) Runs: 0rngtest: FIPS 140-2(2001-10-10) Long run: 0rngtest: FIPS 140-2(2001-10-10) Continuous run: 0rngtest: input channel speed: (min=2.201; avg=5.458; max=380.585)Kibits/srngtest: FIPS tests speed: (min=28.132; avg=28.328; max=28.468)Mibits/srngtest: Program run time: 35792670 microseconds
real 0m35.801suser 0m0.001ssys 0m0.071s
Running CentOS 7.5 on an older Raspberry Pi 2 will do much much faster:
ps -ef | grep rngdroot 14024 1 1 10:54 ? 00:00:14 /sbin/rngd -f -r /dev/hwrng -o /dev/random
time rngtest -c 10 < /dev/randomrngtest 5Copyright (c) 2004 by Henrique de Moraes HolschuhThis 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: 200032rngtest: FIPS 140-2 successes: 10rngtest: FIPS 140-2 failures: 0rngtest: FIPS 140-2(2001-10-10) Monobit: 0rngtest: FIPS 140-2(2001-10-10) Poker: 0rngtest: FIPS 140-2(2001-10-10) Runs: 0rngtest: FIPS 140-2(2001-10-10) Long run: 0rngtest: FIPS 140-2(2001-10-10) Continuous run: 0rngtest: input channel speed: (min=135.793; avg=166.586; max=191.200)Kibits/srngtest: FIPS tests speed: (min=22.076; avg=22.243; max=22.334)Mibits/srngtest: Program run time: 1181718 microseconds
real 0m1.192suser 0m0.002ssys 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