With the proliferation of satellite receivers, cable systems, and Internet commerce, there’s a real need for secure encryption. A pseudorandom code generator that filled the bill several years ago is now considered “hackable” by many knowledgeable people.
Presented here is a truly random code generator that operates from a single supply. The circuit allows operation from a single 5-V supply with a minimum of adjustments.
The circuit produces random ones and zeros by comparing a stream of random noise generated in a Zener diode to a reference voltage level. If the threshold is set correctly and the time period is long enough, the noise will consist of a random but equal number of samples above and below the threshold setting.
The circuit shown is the random noise generator (Fig. 1). Optimum noise performance is obtained from a 1N753A Zener diode, which has a 6.2-V Zener “knee.” The diode is used to generate random noise. We have found that optimum noise output for this diode occurs at the “knee” of the IV curve, where the Zener diode just starts to limit voltage to 6.2 V.
Operating a 6.2-V Zener diode from a 5-V supply required some thought. Obviously, some type of voltage-boosting scheme was needed to provide the diode with the 8 V or more that it requires in this circuit. U1, an LTC1340 low-noise, voltage-boosted varactor driver, provides 9.2 V at 20 µA from an input of 5 V. This is the optimal Zener current for noise output from the diode (at 20 µA the output is about 20 mV p-p).
The 1M and 249k resistors bias the input to op amp U2 to 1.25 V to match the input common-mode range of comparator U3. The 1-µF capacitor provides an ac path for the noise. Note: Be careful where you place any additional capacitors in this part of the circuit, or the noise may be unintentionally rolled off. This is one circuit where noise is desirable.
U2 is an LT1215 23-MHz, 50-V/ms dual op amp that can operate from a single supply. It’s used as a wideband, gain-of-eleven amplifier to amplify the noise from the Zener diode. U3, an LT1116 high-speed, ground-sensing comparator, receives the noise at its positive input. A threshold is set at the negative comparator input and the output is adjusted via the 2k potentiometer for an equal number of ones and zeros. The 5k resistor and the 10-mF capacitor provide limited hysteresis so that the adjustment of the potentiometer isn’t as critical. Latch U4, a 74HC373, ensures that the output remains latched throughout one clock period. The circuit’s output is taken from U4’s Q0 output.
There’s also a way to adjust threshold without manual knobs or potentiometers. In this case, the microprocessor counts the number of ones and zeros over a given time period and adjusts the threshold (perhaps via a digital pot) to produce the required density of ones.
A more “analog” method of adjusting threshold might be to implement an integrator with reset. This circuit integrates the number of ones and zeros over time to produce a zero result for an adjustment that produces equal numbers of ones and zeros. Again, a digital pot could be used to adjust threshold, with the threshold being decreased for the case of “not enough ones” and increased for the case of “too many ones.”
After many conversations with the “cyber illuminati,” the circuit in Figure 2 was devised. This circuit can be used to replace the pot shown in the dashed box in Figure 1. In operation, an LT1004-2.5 is used as a reference at the front end of a precision voltage-divider string. A series of voltages is generated along the divider string and a jumper is used to connect this voltage to a buffer and then to the negative input of the LT1116 comparator. As was the case with the 2k pot, the voltage at pin 2 (the negative input of the comparator) sets the threshold for the comparator.
The selection of voltage taps on the resistor string is arbitrary. They were selected to allow a good adjustment range (defined as allowing jumper adjustment to 50% ones and 50% zeros) for a sample of ten 1N753A Zener diodes used to produce noise. The jumper could (and probably should) be replaced with analog switches controlled by a microprocessor in medium to high-volume applications.