Why a Zener diode is truly random

Reverse biased Zener diodes with ratings greater than about 6V will randomly conduct current under a process called avalanche breakdown. All knowledge of Zener design can be found in this ehandbook and Krieger (2017). This is an extremely complex process which we can exploit to make a very good entropy source. The complexity is on such a scale that fundamental principles of the Universe dictate that no one will ever be able to predict the exact current flowing across a Zener diode whilst in avalanche breakdown. The varying current creates the entropy signal.

And it’s the last part that’s crucial. Any method of questioning requires us to see electrons if we’re to predict their trajectories and positions. If we see an electron, we interact with it. If we interact with it, we affect it. This is called the Observer effect in quantum mechanics, and such measurements are subject to the Heisenberg Uncertainty principle like so:-

$$ \Delta x \Delta p \geq \frac{\hbar}{2} $$

where $ x $ = position, $ p $ = momentum and $ \hbar $ is the reduced Planck constant which is unsurprisingly, constant. So if you know one, you can’t possibly know the other. If you know how fast an electron is travelling ($ p $), nature will simply not allow you to know it’s direction ($ x $) with any certainty. And visa versa.

“We have to remember that what we observe is not nature in itself but nature exposed to our method of questioning.” - Werner Heisenberg.

Since this is the Internet, we can just plagiarise someone else’s much simpler analogy:-

“This principle also has common classical examples, like how you can never accurately take your temperature using a mercury thermometer. Because the heat from your mouth flows into the thermometer and slightly cools your body, you can never get a truly accurate measurement.” - Brett Goldman.

Further non determinism arises from the diode’s atoms being like fluffy little cotton balls, rather than the traditional schoolbook notion of a miniature solar system. The electrons constituting the atom still kinda orbit the nucleus, but their position is no longer thought of as being within exact circular orbits. Their position at any time is currently described by a probability distribution/ wave function, whose value changes with polar coordinates related to the nucleus. So any electron within the Zener diode’s atoms might be literally anywhere (with diminishing probability). It might even be behind you! The following figure illustrates the consequence for a (not to scale) free electron shooting through an atom’s orbital (type 2):-

Potential electron collision and deflection within an atom's orbital.

Potential electron collision and deflection within an atom's orbital.

We can’t possibly predict the exact path of the loose electron due to the Observer effect and Heisenberg Uncertainty. And we can’t possibly predict if it will pass though unaffected or be deflected by another electron within an orbital. And finally, there is no mathematical way to predict the exact angle of deflection if it were to collide with another electron. Thus, the angle $\theta$ is stochastic in nature as well. And from a macro perspective:-

Entire PN Junction in Avalanche Breakdown.

Entire PN Junction in Avalanche Breakdown.

As electron strikes electron and so on, the cumulative effect is a (relatively) large surge of current across the Zener’s PN junction in a form of impact ionisation. This is the Zener avalanche effect, and whether you’ve achieved it is easily confirmed by the sampled current distribution. A log normal distribution indicates avalanche, and a typical normal distribution means that you have insufficient breakdown voltage, only managing to achieve the much quieter Zener effect. We demonstrate it here.

Quantum indeterminacy is also related to the electron’s wave particle/duality. Momentum $p$ is related to the frequency $f$ of the electron, but measuring that frequency gets increasingly more difficult and inaccurate as one looks to identify it’s location ever more precisely. The following childish metaphor shows the unavoidable uncertainty in trying to measure a frequency over a small distance:-

Quantum indeterminacy: Unavoidable uncertainty in localised frequency measurement.

Unavoidable uncertainty in localised frequency measurement.

And since we can’t exactly locate nor predict the number and direction of loose electrons within the diode, the width/duration of the sawtooth like breakdown delay is also unpredictable.

Random 0.96 ”s breakdown delay during the Zener Avalanche effect.

Random 0.96 ”s breakdown delay during the Zener Avalanche effect.

Swapping out electrons for snow flakes and ice crystals, the Zener Avalanche effect is surprisingly similar to the snow avalanche. And the intensity of the avalanche depends (amongst others) on the mountain slope, which is analogous to the gradient of the electric field across the Zener’s PN junction. And snow layer accumulation could be a metaphor for charge build up within the diode’s capacitance…

Everything can change in just a few nanoseconds. This might all seem somewhat abstract with little relevance to the physical world and a TRNG. But the important thing to realise is that due to the above, the electrical noise on a Zener diode in Avalanche breakdown is fundamentally unpredictable by science. It can only be described stochastically through probabilities, or in terms of statistics such as mean and standard deviation. Or observed on an oscilloscope. But it cannot be predicted exactly. It’s not a question of measurement accuracy, or the sensitivity of the measuring instruments. It is truly random by nature and even God himself cannot predict it, much less three or four letter named agencies (NSA /BBC /GCHQ). This implication is worth dwelling upon. So a very simple home made entropy source can be just as fundamentally random as the very best commercial or laboratory quantum RNGs. Yes, they will be slightly faster (a laboratory 2.7Tbit/s TRNG is here), but still only as random as yours.

On an entropic level, this quantum tunnelling TRNG:-

Quintessence 1Gbit/s commercial TRNG that's just as random as a Zener diode.

Quintessence 1Gbit/s commercial TRNG costing ÂŁoodles.

is exactly as random as:-

A 0.4 pence glass encapsulated Zener diode.

A glass encapsulated Zener diode costing 0.4 pence.

We focus on this equivalence as the marketing departments of the various TRNG providers would have you believe that unless a laser is involved in some quantum fashion, an entropy source built around a simple diode cannot be as random as theirs. That’s called FUD (Fear, Uncertainty & Doubt). Rubbish. The NIST organisation stretches this “only by quantum laser” mantra to ridiculous lengths promoting their randomness beacon. Infallible measurements on laser beams outside of light cones sound very convincing, but appreciate the inner quantum effects within a humble diode and their inherent unequivocal randomness. The TRNG with a personality ERNIE has been generating true random numbers via diode noise on behalf of the British government since 1956, and has safely awarded ÂŁ20 billion in prize money. Perfectly randomly.


Update: ERNIE has gone optical. He’s been “upgraded” to a Quantis optical TRNG. It’s not any more random now, just faster.

P.S. This quantum uncertainty has been witnessed since the early 20th century, just not called such. If you swap the negative electrons for positive alpha particles and the Zener diode for gold foil, you will be repeating the Geiger–Marsden experiments (also called the Rutherford gold foil experiment) . $\theta$ was tallied in those circumstances, but could not (and still cannot) be predicted for each alpha particle loosed.

P.P.S. An vaguely similar observational effect in the fields of psychology and management also exists. The Hawthorne Effect describes the change of behaviour of individuals knowing that they are being observed or are taking part in research. So as the external researcher observes (measures) the individuals (electrons), they consciously or subconsciously change their own behaviour and are thus unpredictable.