Impossible to predict the next number - no matter how much information about the universe you know.
Not a dumb question! I tried this approach using 4-microsecond ticks and was surprised to catch a (subtle) bias. So I in the end I basically used two different RNG algos (both with slight biases) and XOR’d them together.
Would love to isolate why these on their own appear to have a bias but testing is a super laborious process (takes roughly 3 days to generate a 1 megabit file).
Of course, I could always speed up the testing cycle by using a more radioactive sample ;)
> A fast clock (down) is used to increase a counter. Whenever a detection is made (up), the counter is read and reset, generating one random number.
> We restrict to a counter that generates values from 0 to M −1, a modulo M counter. When M = 2 we have a binary random number generator.
It doesn't have to be a millisecond timestamp, any clock that's much faster than the rate of decay should work. Every time a decay is detected, take the elapsed time in clock units mod 2 and that's your random bit.
Sorry about that! I’ll push a plaintext CSV version of the part list later today.
There are some really expensive avalanche or tunnel diode noise sources you can buy, that are made by electronics giants like Keysight, that are designed to produce perfectly calibrated white noise across a few GHz of bandwidth for RF test, measurement, or cryptographic purposes. But you can build a simple one, the only problem is that the ordinary diodes are not designed to breakdown, they will, but it's thousands of volts and potentially a destructive event, thus they are not really useful. You can buy Zener diodes, but it's likely that you don't already have one and you don't want to wait for shipping. But there's another neat choice - use a transistor. The base-emitter junction of any bipolar transistor is effectively a diode for DC signals. And the most common transistors are small-signal transistors, it's easy to apply a low reverse voltage, typically 6.0 V [0] to make it go breakdown.
Then connect it to an amplifier and a ADC, you are done. And you don't even have to use an ADC, you can use a 74ALS04 logic gate (the faster, the better, 74LS is not recommended) and connect a feedback resistor to force the logic gate to work as an amplifier rather than a switch, and you get an amplified and digitized output. This idea was originally posted to the sci.crypt newsgroup. And many have built variations of this circuit with success.
Although some warned that this circuit is vulnerable to external radiofreqency interference, which can be used by the NSA to attack your generator, so good RF design practices, such as heavily shielding the noise source and the amplifier, good power supply decoupling and filtering are recommended. It's also recommended to add a builtin self-test routine to your microcontroller and disable the output in case the circuit fails the randomness check - it's an industrial standard safegaurd.
* https://www.csshl.net/sites/default/files/downloadable/hw/hw...
* https://makezine.com/projects/really-really-random-number-ge...
* http://www.cryogenius.com/hardware/rng/
On the other hand, readers who are interested in extremely fancy quantum number generators should take a look of the double-slit experiment, single-photon light sources, interferometry, and photomultiplier tubes. A simple idea would be making a single-photon light source first (e.g. adding a heavy attenuation filter in front of a dim laser, so at any time, it's very likely that only a single photon can get out on average, it's not strictly a single-photon source, but close). Then the single photon hits a beam-splitter (e.g. a half-silvered mirror), when the photon leaves the mirror, there are photomultiplier tubes working at a thousand volts and enormous gain to detect a single photon. There's a 50% chance that the photon will hit detector A, and 50% chance that it will hit detector B. Take notes of the result, and you have built an amazing quantum random number generator.
[0] e.g. See the datasheet of the 2N3904 transistor, https://www.onsemi.com/pub/Collateral/2N3903-D.PDF
Cosmic quantum noise for all your random number needs (after some filtering). Disclaimer: if you are under NSA attack you might have issues with this $5 setup.
[0] https://www.hostingadvice.com/blog/random-dot-org-true-rando...
Doesn't answer your question, but might be a start.
They’re not actually that radioactive so they’re very easy to get ahold of. Amazon and eBay might work (I got mine from one of those sources, I think), but I also put a more specialized supplier in the parts list.