5 ms·
Curious how exactly this generates truly random numbers (and didn't see an explanation in the link). Can anyone explain this in technically-inclined laymen's te
by jordanlev 10y ago
Curious how exactly this generates truly random numbers (and didn't see an explanation in the link). Can anyone explain this in technically-inclined laymen's terms?
fwiw, I'm a programmer but don't know anything about random number generation (other than I'm not supposed to rely on the built-in random functions of most languages/libraries for security purposes because they're not truly random).
- kasbah 10y agoThe key components are the two transistors connected back to back. The first (Q1, pins 1, 2 and 6) is effectively used as a zener diode which will exhibit breakdown noise at low currents [1]. The second transistor (also labelled Q1 but on pins 3, 5 and 4) is used as an amplifier of said noise. A similar circuit is explained in more technical detail here: http://www.nutsvolts.com/magazine/article/bipolar_transistor_cookbook_part_5 http://www.nutsvolts.com/magazine/article/bipolar_transistor... (look for the "WHITE NOISE GENERATORS" chapter title) [1]: https://en.wikipedia.org/wiki/Noise_generator#Zener_diode https://en.wikipedia.org/wiki/Noise_generator#Zener_diode
- adrusi 10y agoWe think that cosmic background radiation and certain subatomic mechanics are truly random. If you attach extra hardware to a computer, you can observe these and send a stream of bits to the computer. You don't usually want to use truly random numbers for cryptography though; /dev/random is more appropriate. I've never understood why, exactly, but that's generally the advice.
- witty_username 10y agoYou can use "truly" random numbers for cryptography. /dev/random is not recommended (except for perhaps long-term keys if you're worried about the randomness algorithms having a vulnerability), use /dev/urandom.
- atoponce 10y agoThere is no difference between /dev/random and /dev/urandom in the Linux kernel, other than /dev/random blocks when the entropy estimate is low or depleted. Both source them same CSPRNG, which is based on SHA-1. /dev/urandom is absolutely recommended for long-term keys.
- floatboth 10y ago> except for perhaps long-term keys On most systems, urandom and random are the exact same thing. Only Linux does this weird "blocking random" thing, based on some weird estimate of "running out of entropy" which is not an actual thing. (u)random is powered by a CSPRNG which is seeded by "truly random numbers" gathered from multiple hardware sources.
- maaku 10y agoCosmic background radiation as observed by a sensor connected to the computer is not random. All I'd need to mess with the randomness is to put a focused radiation source near the device. Sampling randomness from the environment surrounding the physical installation of the device is not good. I hope no one is doing this. There's no reason why you wouldn't want to use truly random numbers for cryptography. That's what /dev/random is supposed to provide.
- DanBC 10y agoThey tend to generate electrical noise (often from a semiconductor), amplify that noise, sample it, de-skew the stream, and present that to a port for reading. Here's some information I had from a while ago. (Not all of this is about hardware RNGs) https://news.ycombinator.com/item?id=6060636 https://news.ycombinator.com/item?id=6060636
- tlrobinson 10y agoI don't know much about this stuff, but it looks like it's a reverse-biased noise generator of some kind. https://en.wikipedia.org/wiki/Noise_generator https://en.wikipedia.org/wiki/Noise_generator http://holdenc.altervista.org/avalanche/ http://holdenc.altervista.org/avalanche/ http://freenrg.info/Physics/Scalar_Vector_Pot_And_Rick_Andersen/Rick_Andersen_Noisegen.htm http://freenrg.info/Physics/Scalar_Vector_Pot_And_Rick_Ander...
- deleted 10y ago[deleted]