On 29/06/16 14:54, Etienne Champetier wrote:
If we want to be safe, we have to use /dev/urandom only after its initialised
A simple tests adding this in an init script on a LEDE (OpenWrt) VM:

getrandom 1 > /dev/null
echo "### getrandom ###" > /dev/kmsg
dd if=/dev/random of=/dev/null count=1 bs=1
echo "### dd ###" > /dev/kmsg

gives:
[   14.321536] ### getrandom ###
[   42.603677] ### dd ###

And this can be worse on real hardware ..

Not clear it the above shows that dd behaves differently to getrandom or if the difference is merely due to less frequent interrupts after system is booted...

What timings to you get if you reverse the commands?

~~~
dd if=/dev/random of=/dev/null count=1 bs=1
echo "### dd ###" > /dev/kmsg
getrandom 1 > /dev/null
echo "### getrandom ###" > /dev/kmsg
~~~


Daniel.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to