Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A radioactive-based random number generator surely is fun. But a friendly reminder to those readers who want a quantum device but prefer a low-power, solid-state implementation: A "quantum" random number generator doesn't always have to be fancy, it can be as boring as a diode. Diodes only allow current to flow to one direction, but if you reverse bias a diode hard enough, they'll eventually breakdown, conduct, and produce a fixed voltage drop across it. This principle is used to make voltage references and regulators. But on a closer look, the diode also produces a significant amount of random noise in this process. And the mechanisms responsible for the breakdown of a diode, either Zener Effect or Avalanche Effect, although are semi-classical, but ultimately quantum mechanical in nature - the electrons received enough energy to randomly pass through the forbidden bandgap, and the noise is effectively unpredictable. (There are also tunnel diodes that use real Quantum Tunneling, which doesn't have any classical explanation, fancier than Zener or Avalanche Effect, but general-purpose tunnel diodes are no longer in production of large quantity.)

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



You could also simply use an FM tuner and tune it in between stations for atmospheric noise. Like random.org did for a long time. [0]

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...


Thanks for this interesting follow up post! :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: