Hardware random number generator? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85) +--- Forum: Rock64 Hardware and Accessories (https://forum.pine64.org/forumdisplay.php?fid=89) +--- Thread: Hardware random number generator? (/showthread.php?tid=6118) Pages:
1
2
|
Hardware random number generator? - scalextrix - 05-30-2018 Does the Rock64 have a real hardware random number generator that can be used as a source of entropy with rng-tools? RE: Hardware random number generator? - scalextrix - 05-30-2018 Looks like the answer is no, rng-tools.service fails to start unless the source of entropy is set to /dev/urandom which is the pseudo-random number generator. RE: Hardware random number generator? - pfeerick - 05-30-2018 (05-30-2018, 12:23 AM)scalextrix Wrote: Does the Rock64 have a real hardware random number generator that can be used as a source of entropy with rng-tools? The datasheet for the CPU (RK3328) on page 9 (excerpt below) suggests that it does support both pseudo and true random number generation. I don't know what's needed to get it working though. Quote:Cipher engine RE: Hardware random number generator? - scalextrix - 05-30-2018 (05-30-2018, 03:33 AM)pfeerick Wrote:(05-30-2018, 12:23 AM)scalextrix Wrote: Does the Rock64 have a real hardware random number generator that can be used as a source of entropy with rng-tools? OK let me do a little more research, perhaps the device isnt detected RE: Hardware random number generator? - scalextrix - 05-30-2018 Ok so /dev/hwrng is available, but when I either let it auto-detect or set HRNGDEVICE=/dev/hwrng in /etc/defaults/rng-tools the rng-tools.service always fails: -- Logs begin at Wed 2018-05-30 15:37:55 UTC, end at Wed 2018-05-30 15:41:21 UTC. -- May 30 15:41:10 rock64 systemd[1]: rng-tools.service: control process exited, code=exited status=1 May 30 15:41:10 rock64 systemd[1]: Failed to start (null). -- Subject: Unit rng-tools.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit rng-tools.service has failed. -- -- The result is failed. May 30 15:41:10 rock64 systemd[1]: Unit rng-tools.service entered failed state. RE: Hardware random number generator? - scalextrix - 06-01-2018 (05-30-2018, 03:33 AM)pfeerick Wrote:(05-30-2018, 12:23 AM)scalextrix Wrote: Does the Rock64 have a real hardware random number generator that can be used as a source of entropy with rng-tools? OK I think the problem might be that there is no tpm-rng module available that can be added in /etc/modules, it might be something the maintainer may need to compile and add to the kernel? Dunno, out of my depth here, but somethin' aint working right. RE: Hardware random number generator? - evilbunny - 06-01-2018 (06-01-2018, 10:20 AM)scalextrix Wrote: OK I think the problem might be that there is no tpm-rng module available that can be added in /etc/modules, it might be something the maintainer may need to compile and add to the kernel? Dunno, out of my depth here, but somethin' aint working right. If you want to file an issue you can do this on github... https://github.com/ayufan-rock64/linux-build/issues RE: Hardware random number generator? - scalextrix - 06-02-2018 Issue raised, thanks RE: Hardware random number generator? - MichaelRock - 06-02-2018 (06-01-2018, 10:20 AM)scalextrix Wrote: OK I think the problem might be that there is no tpm-rng module available that can be added in /etc/modules, it might be something the maintainer may need to compile and add to the kernel? Dunno, out of my depth here, but somethin' aint working right.Hi, which distro do you use ? (I'm guessing it's a debian based) it may be not too hard to compile your own kernel based on ayufan's source package if there are any available; there are plenty of documentation on how to do it (a quick search with "debian compile kernel" gives me the common docs.) At configuration step, just need to browse to reach the relevant item, then run the build, wait, install the new kernel, reboot, pick this kernel on boot, then rng-tools might work. You should also see the module loaded if you have done things right (with 'lsmod' command) I could provide some assistance if you need, I'll also have to play a bit with mine . RE: Hardware random number generator? - scalextrix - 06-03-2018 (06-02-2018, 01:17 PM)MichaelRock Wrote:(06-01-2018, 10:20 AM)scalextrix Wrote: OK I think the problem might be that there is no tpm-rng module available that can be added in /etc/modules, it might be something the maintainer may need to compile and add to the kernel? Dunno, out of my depth here, but somethin' aint working right.Hi, Thanks, I did think of it and have compiled some software (not kernel though) on linux/ARM before, what I couldnt find was the driver or module code for the TRNG on this chipset. One thing you could do to help is just install rng-tools on your board and see if you can get it running, perhaps its something unique to mine? Im on the official ROCK64 Debain Jessie Minimal build. I just noticed 2 packages have been held back > The following packages have been kept back: > linux-rock64 linux-rock64-package I wonder if thats connected. EDIT: Updated and restarted but rng-tools still fails. |