[PATCH] getrandom: new applet
Michael Conrad
mconrad at intellitree.com
Tue Jul 12 17:09:42 UTC 2016
On 7/7/2016 11:49 AM, Rob Landley wrote:
> On 07/06/2016 11:41 AM, Etienne Champetier wrote:
>> >Now you really hate the fact that getrandom() is a syscall.
> I do not hate the fact getrandom is a syscall. I'm asking what the point
> is of a new applet to call this syscall. You have suggested it could
> block to show when /dev/urandom is producing a higher grade of
> randomness than it does before being properly seeded. That is, as far as
> I can tell, the only reason for your new applet to exist rather than
> upgrading $RANDOM in ash/hush.
>
Actually in my opinion the syscall is inferior to a new character
device, because blocking syscalls interfere with event-driven programming.
Suppose you want to write a single-thread event-driven web server which
initializes its SSL library with this randomness source (i.e. won't
allow SSL until enough entropy is collected for a good initialization)
but you still want it to be able to accept non-SSL connections. In
order to use the syscall you need a thread, or child process. (haha,
such as pipe to a "getrandom" applet...)
-Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160712/c47f0558/attachment.html>
More information about the busybox
mailing list