PINE64
do we need jitterentropy-rngd if TRNG is available? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: do we need jitterentropy-rngd if TRNG is available? (/showthread.php?tid=16849)



do we need jitterentropy-rngd if TRNG is available? - jsch - 06-17-2022

Hello

On my mobian phone there is a process named jitterentropy-rngd. Compared with all the other processes running, this one is cumsuming a good amount of CPU.
On the other hand the current kernel 5.15 has the modules sun8i_ce (where CONFIG_CRYPTO_DEV_SUN8I_CE_TRNG is included) and arm_smccc_trng (CONFIG_HW_RANDOM_ARM_SMCCC_TRNG). I don't know if the older kernels have them as well. Based on the description, I would expect them to provide "good" random numbers.
If at least one of these modules is active, is there still a need for jitterentropy-rngd then?
Is there a way to test it?

Code:
dd if=/dev/random of=/dev/null bs=4096 count=1 iflag=fullblock; cat /proc/sys/kernel/random/entropy_avail
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00031496 s, 13.0 MB/s
256

After reading 4k of random data, the pool is still at 256.