PINE64
Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? - 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: Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? (/showthread.php?tid=12808)



Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? - LibrePhoneUser - 01-16-2021

The 5.10 kernel release brought support for the Pinephone A64 processor’s true hardware random number generator under the sun8i-ce module. However, even after I load the module I am not getting a working /dev/hwrng.

The patch adding this support to the 5.10 kernel provides a new kernel option that must be activated before building the kernel:

Code:
+config CRYPTO_DEV_SUN8I_CE_TRNG
+    bool "Support for Allwinner Crypto Engine TRNG"
+    depends on CRYPTO_DEV_SUN8I_CE
+    select HW_RANDOM
+    help
+      Select this option if you want to provide kernel-side support for
+      the True Random Number Generator found in the Crypto Engine.

Is this option selected in Mobian's kernel build? If not, could I request that it be activated?


RE: Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? - evilbunny - 01-16-2021

You may need to file this on the mobian bug tracker


RE: Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? - Maus - 01-17-2021

(01-16-2021, 02:16 PM)LibrePhoneUser Wrote:
Code:
+config CRYPTO_DEV_SUN8I_CE_TRNG
+    bool "Support for Allwinner Crypto Engine TRNG"
+    depends on CRYPTO_DEV_SUN8I_CE
+    select HW_RANDOM
+    help
+      Select this option if you want to provide kernel-side support for
+      the True Random Number Generator found in the Crypto Engine.

Is this option selected in Mobian's kernel build? If not, could I request that it be activated?

No, Mobian stock kernel does not have this set. You can easily find out for yourself:

Code:
mobian@pinephone:~$ zgrep SUN8I_CE /proc/config.gz
CONFIG_CRYPTO_DEV_SUN8I_CE=m
CONFIG_CRYPTO_DEV_SUN8I_CE_DEBUG=y
# CONFIG_CRYPTO_DEV_SUN8I_CE_HASH is not set
# CONFIG_CRYPTO_DEV_SUN8I_CE_PRNG is not set
# CONFIG_CRYPTO_DEV_SUN8I_CE_TRNG is not set



RE: Is the A64’s true hardware random generator activated in Mobian’s 5.10 kernel build? - LibrePhoneUser - 01-17-2021

Thanks, I have filed a bug on the Mobian tracker. Sorry that I forgot all about /proc/config to see what kernel options had been selected at build time.