Skip to content

avalanche noise source notes

bunnie edited this page Apr 19, 2019 · 4 revisions

Deprecation Redirect

These are the original design notes of the avalanche noise source. For the latest information, please see avalanche noise source design.

Original Text

A high quality noise source is necessary for any good crytpographic enclave. In fact, multiple high quality noise sources are preferable, if the budget allows.

On-die RNGs such as ring-oscillator based RNGs leverage the metastability of sampling circuits to translate timing jitter into a random stream of bits. These are area and power efficient but are also tricky to verify. Avalanche noise sources are a popular go-to as an alternate source of entropy, perhaps because of their relatively simple construction and ease of verification (drop a scope probe on the cathode and you can confirm the presence of noise).

Here we discuss the design of a low-power, compact discrete avalanche noise generator for betrusted.io

The challenges of avalanche noise sources include the need for high (10-30V) voltages (and correspondingly high power consumption), and there the amount of noise generated depends on subtleties such as the engineering of the PN junction and the ambient temperature.

Theory: Avalanche Effect

Avalanche breakdown is essentially a miniature particle accelerator, where electrons that enter the depletion region (through mechanisms that include thermal noise) and are accelerated across an electrical field, to the point where new electron-hole pairs are generated when these high-energy electrons collide with atoms, creating an amplification cascade with low reproduceability.

The characteristic of avalanche noise biased by a constant current source is thus a "sawtooth" waveform: a semi-linear ramp up in voltage as the capacitance of the depletion region charges to the point where the electric field becomes large enough to initiate the cascade, and then a sharp drop off in voltage as the cascade rapidly increases the conduction of the junction. The cascade then abruptly halts once the field is no longer strong enough to sustain the cascade effect, leading to a subsequent cycle of charging the depletion capacitance.

Avalanche diodes are high voltage devices because of the physics behind them. The breakdown voltage of the junction is controlled by the doping levels of the P and N regions:

Vbr = (Ecr^2 * Esi / 2q) * ((Na + Nd) / Na * Nd)

  • Ecr is the critical value of the electrical field, a physical constant that ranges from 210^5 V/cm to 810^5 V/cm depending on the doping
  • Esi is the dielectric constant of silicon
  • q is the elementary charge of an electron
  • Na is the doping concentration of the P region
  • Nd is the doping concentration of the N region

Vbr increases as the temperature increases: as temperature goes up, so does lattice vibrations. Electrons are thus more likely to be scattered before they can be accelerated to a sufficient momentum to initiate the avalanche cascade.

In order to engineer a low voltage breakdown, the doping Na and Nd must be so high that the depletion region shrinks to a distance on the order of 10nm, such that quantum tunneling becomes the dominant effect. Quantum tunneling is synonymous with the "zener" effect, and is a different physical process which generates less noise. Thus for reverse-breakdown junctions that operate below 4.5-6.5V, the process is predominantly a zener effect and not as suitable for noise generation. This explains why avalanche noise generators must operate at higher voltages.

Note that Vbr also decreases as temperature increases for the zener effect. Thus "real" zener diodes can be engineered to use a combination of quantum plus avalanche effects, as they have opposite temperature coefficients and can lead to a more temperature-stable voltage reference.

Diodes that are advertised as avalanche diodes to be used as voltage references are engineered to be less suitable as a noise source. Obviously, if the goal of the Vbr is as a voltage reference, reduced noise is highly desired. Generally, noise can be reduced by operating the diode at a higher current: more carriers means more opportunities to initiate the avalanche cascade. However, simply cranking up the current would also waste power. Thus avalanche diodes engineered as a voltage reference are designed so that the junctions are "leaky" compared to a typical rectifier application -- perhaps through a very large area junction, with trace amounts of minority carrier dopants added to seed reverse leakage. Increasing low-level reverse-bias leakage reduces avalanche noise at lower current levels, because the tiny leakage helps "seed" the avalanche effect more consistency.

The B-E junction of an NPN transistor is thus a go-to for avalanche noise sources. B-E junctions are engineered with very heavy doping on the E side, and light doping on the B side. This causes a very narrow depletion region on the emitter, and a large depletion region on the B side. In this case Vbr is dominated by Na, e.g.:

Vbr ~ 1/Na

The heavier the emitter doping, the lower the Vbr, and the emitter of an NPN transistor is heavily doped, so Vbr tends to be in a reasonable range (7-12V). A heavily doped emitter will also drive up junction capacitance, but this is also a function of the junction area, so this parameter may not be a reliable indicator of doping profiles.

Of course, NPN transistors are not specified as noise sources, nor are the doping profiles and junction profiles revealed in the datasheet. However, a "good" noise generator will probably rely on figures of merit related to these parameters:

  • low emitter cutoff current Iebo, also low base cutoff current (Ibl or Ibev, current into base as measured when Vbe is negative) may be a proxy for this: this indicates less leakage available to initiate the avalanche, thus increasing the voltage swings for the avalanche event
  • low emitter-base breakdown voltage Vbr(ebo) or Vebo

Some examples of parameters (ranked in order of more likely to generate noise):

  • MMBT2222A by Diodes inc: Ibl = 20nA @ -3V bias, Iebo = 10nA @ -5V, Vbr(ebo) = 6V @ 100uA, Cib = 25pF @ 0.5V
  • BSR14 by On Semi: Iebo = 15nA @ -3V, Vbr(ebo) = 6V
  • MMBT2484LT1G by On Semi: Iebo = 10nA @ -5V, Vbr(ebo) = 5V, Cib = 6pF @ 0.5V
  • MMBT3904 by On Semi: Ibl = 50nA @ -3V bias, 30V VCE, Vbr(ebo) = 6V @ 10uA, Cib = 8pF @ 0.5V
  • FMB5551 by On Semi: Iebo = 50nA @ -3V, BVebo = 6V @ 10uA
  • MMBT3416L by On Semi: Iebo = 100nA @ -5V, Vbr(ebo) = 4V @ 100uA, Cib = 6pF @ 0.5V
  • MMBT100A by On Semi: Vbr(ebo) = 6V @ 10uA, Iebo = 50nA @ 4V
  • BC107 by NJS: Iebo = 1uA @ -4V bias, Vebo = 6V
  • BC547 by Hottech: Vebo = 6 @ 10uA, Iebo = 100nA @ -5V bias
  • 2N4401 by On Semi: Vbr(ebo) = 6V @ 100uA, Ibev = 100nA @ -0.4V
  • MMBT5089L by On semi: Iebo = 100nA @ -4.5V, Vbr(ebo) = 4.5V

(should be bad noise sources, use as negative tests of hypothesis, may be zener mode breakdown):

  • MMBT10L by On Semi: Iebo = 100nA @ -2V, Vbr(ebo) = 3.0V
  • MMBT918LT1G by On Semi: Vbr(ebo) = 3V @ 10uA, Icbo = 50nA

Circuit

In the avalanche configuration, the collector is left unconnected. Presumably since the collector is floating, all the current generated due to the avalanche should sweep out the base contact, but perhaps some loss happens due to spontaneous recombination in the collector region.

In theory, lower currents should lead to greater amounts of avalanche noise. Most circuits I've seen pick 100uA for the bias point. While the listed breakdown voltage of most transistors is in the 5-8V range, literature indicates that a higher voltage may be required to initiate the avalanche and/or the noise may have a peak amplitude higher than the average breakdown.

The generator for the bias voltage ideally controls for current and can produce a voltage well above 11V. Since this is targeting a mobile application, the current generator needs to be extremely efficient to avoid excess load on the battery and encourage contiuous operation of the noise source for improved entropy quality.

Observe that LED backlight controllers (such as the TPS61158) are designed explicitly to deal with compliant voltage loads while controlling for constant current (as is the property of the typical white LED). Thus in betrusted.io, the first draft of our circuit leverages the TPS61158 to generate a constant-current bias that clamps at a peak of 30V.

Literature indicates we're doing well if a transistor can generate 0.4V of noise in this mode. Some compliance headroom is needed for this voltage to develop, so we must add a load resistor above the transistor to provide the headroom. Theory indicates unlike most BJT effects, this is a voltage-triggered effect, so the impedance of the compliance load should not be so important (if it were a current-mode effect, the output voltage would be proportional to the compliance resistance). As more headroom means more power, pick a 2V compliance headroom between the regulator capacitor and the transistor emitter as an initial first guess.

The resulting voltage is AC-coupled into a bias network that centers the noise to the ADC's sampling range, and then passed through an op-amp that principally provides drive strength for the DAC but is configured with some gain in case the avalanche noise is too small. The ADC then samples the analog value generated and this should then be hashed into an entropy pool with other potential entropy sources.

Potential pitfalls:

  • The boost converter's closed loop control cancelling out noise generated within the control bandwidth of the boost converter: The TPS61158 notes that the "Vref filter time constant" is 230us nominal, or 4.3kHz. This means events faster than 4.3kHz will be outside the control loop's bandwidth. Perhaps all analog circuitry including the ADC should have a bandwidth higher than this to capture noise.
  • Potential stability issues if the avalanche effect ends up in some sort of resonance with the boost converter's control loop.

However, so long as the boost converter does not exit a safe operating range, these effects are unlikely to completely cancel out the noise generation property of the circuit. The sensitivity of the circuit to these potential problems needs to be characterized through thorough testing.

References: