3 ms·
There is a lot said for making the Linux random number generator configurable. A good entropy (random number) source takes entropy from a number of different so
by strenholme 5y ago
There is a lot said for making the Linux random number generator configurable. A good entropy (random number) source takes entropy from a number of different sources and combines it with a cryptographic strong algorithm: Either a strong hash whose output is made the key and IV for a stream cipher, or directly using an Extendable-Output Function (XOF) such as a cryptographic sponge. [1]
For example, there is some controversy with the RDRAND (the x86 ”give me random bits” op code) operation, with concerns that maybe the numbers weren’t truly random, and at least one known security hole where the RDRAND output could leak under some circumstances. However, it’s widely available and probably makes good random bits. However, if it doesn’t, we want other sources of entropy (microphone output low bits, interrupt timings, etc.) so /dev/random or /dev/urandom still gives us strong entropy even if RDRAND is completely busted.
[1] I personally think a cryptographic sponge is ideal for this, since sponge functions have absorb, output, and duplex (absorb after output, i.e. accept new entropy from the system after outputting bits) functionality
- jstanley 5y agoWhen I first got my Ryzen CPU, it had some bug where RDRAND always returned -1! Fortunately this was fixed in a microcode update.
- 0x0 5y agoExperienced something similar here. NodeJS node-sass would crash with "rdrand failed". Super weird experience to have to apply a BIOS update to fix a node_modules build failure, but that's 2021.
- CJefferson 5y agoWhile having it configurable is one option, I'd prefer to just "chuck everything in". A feature I would like (which would make things more complicated I realise) would be to have a variety of sources, which estimated quality for each source, and then check the quality is still high even if one of the sources is "broken".