lkml.org 
[lkml]   [2016]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 0/5] /dev/random - a new approach
Date
Am Mittwoch, 15. Juni 2016, 18:17:43 schrieb David Jaša:

Hi David,

> Hello Stephan,
>
> Did you consider blocking urandom output or returning error until
> initialized? Given the speed of initialization you report, it shouldn't
> break any userspace apps while making sure that nobody uses predictable
> pseudoranom numbers.

My LRNG will definitely touch the beginning of the initramfs booting until it
is fully seeded. As these days the initramfs is driven by systemd which always
pulls from /dev/urandom, we cannot block as this would block systemd. In Ted's
last patch, he mentioned that he tried to make /dev/urandom block which caused
user space pain.

But if you use the getrandom system call, it works like /dev/urandom but
blocks until the DRBG behind /dev/urandom is fully initialized.
>
> I was considering asking for patch (or even trying to write it myself)
> to make current urandom block/fail when not initialized but that would
> surely have to be off by default over "never break userspace" rule (even
> if it means way too easy security problem with both random and urandom).
> Properties of your urandom implementation makes this point moot and it
> could make the random/urandom wars over.

That patch unfortunately will not work. But if you are interested in that
blocking /dev/urandom behavior for your application, use getrandom.

>
> Best Regards,
>
> David Jaša


Ciao
Stephan

\
 
 \ /
  Last update: 2016-06-15 19:21    [W:0.178 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site