Dirk-Willem van Gulik
2018-07-11 12:03:56 UTC
When feeding /dev/random from hardware USB devices like Bill Woodcock’s 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 ?
Actual code at https://github.com/dirkx/infnoise/blob/master/software/libinfnoise.c line 122:
if ((devRandomFD = open("/dev/random",O_WRONLY)) <0)
.. error handling
if (write(devRandomFD, bytes, length) != length)
.. error handling
And is there any case where length would not return the length written — it seems that the driver traps/ignores EINT, EAGAIN and short writes ?
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
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 ?
Actual code at https://github.com/dirkx/infnoise/blob/master/software/libinfnoise.c line 122:
if ((devRandomFD = open("/dev/random",O_WRONLY)) <0)
.. error handling
if (write(devRandomFD, bytes, length) != length)
.. error handling
And is there any case where length would not return the length written — it seems that the driver traps/ignores EINT, EAGAIN and short writes ?
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