/dev/random/urandom question - wireguard related
peterg32
peter at petergarner.net
Mon Jul 20 16:44:28 BST 2020
Platform: Raspberry Pi4B, Raspbian Buster 10. This device dedicated to wireguard.
uname -a: Linux wireguard 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
I've used my OneRNG v3.0 external device to recreate my SSH moduli and am now looking to recreate my wireguard keys.
According to the Wireguard docs at https://gist.github.com/rmoriz/58f1768218a4fbc4b318615bfb85111d
it uses /dev/urandom:
fd = open("/dev/urandom", O_RDONLY);
if (fd < 0)
return fd;
ret = read(fd, out, len);
close(fd);
But, I can only get the LED dimming test to work as described when I cat /dev/random. Is there a reliable way to get OneRNG to use /dev/urandom? I looked at an earlier thread on this subject and can't get it to reproduce the outcome. I'll admit that this topic is steep learning curve but it's a great device and I've had good results so far.
More information about the Discuss
mailing list