Date: Wed, 11 Jul 2018 14:03:56 +0200 From: Dirk-Willem van Gulik <dirkx@webweaving.org> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Limits to seeding /dev/random | random(4) Message-ID: <3A988D26-7B08-4301-8176-B0ED8A559420@webweaving.org>
next in thread | raw e-mail | index | archive | help
When feeding /dev/random from hardware USB devices like Bill = Woodcock=E2=80=99s design in PCB incarnation: https://13-37.org/de/shop/infinite-noise-trng/ Are there any caveats with regard to volume or speed of doing so ? Or is = it always a plus ?=20 Actual code at = https://github.com/dirkx/infnoise/blob/master/software/libinfnoise.c = line 122: if ((devRandomFD =3D open("/dev/random",O_WRONLY)) <0) .. error handling if (write(devRandomFD, bytes, length) !=3D length)=20 .. error handling And is there any case where length would not return the length written = =E2=80=94 it seems that the driver traps/ignores EINT, EAGAIN and short = writes ?=20 Or should one check the entropy available in /dev/random (how?) and hold = off feeding it until it is low enough (this is what the infinite-trng = seems to do on linux). With kind regards, Dw
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A988D26-7B08-4301-8176-B0ED8A559420>