Projects:2015s1-13 A One-Time Pad Generator

From Projects
Revision as of 15:05, 17 November 2015 by A1608430 (talk | contribs)
Jump to: navigation, search

Background

The One Time Pad generator project aimed to create a true random hardware generator in conjunction with a software interface to produce a device capable of generating "one time pad" keys and true random bit streams. The project consisted of several critical elements which included the design and implementation of both hardware and software subsystems into a fully functional true random hardware generator (TRNG) which could output the random data via a software interface and the subsequent testing of data using statistical test suites. The One Time Pad technique itself is a relatively simple and old crytographic method[1] used to encrypt plain text messages using a "pad" or key which comprised of truly random bits or numbers. This key along with the encrypted message would be sent to another person at different times to achieve secure communications.

Aims

1. Apply a series of statistical tests to certify that the random number generator satisfies the Federal Information Processing Standards for Secure Communications (FIPS 140-2).

2. Construct a software interface for the generator to interact directly with an external secure computer and extend the hardware number generator beyond One Time Pad through the use of software and hardware interfacing.

3. Capture data from a white noise source in order to produce random bit streams for use within the One Time Pad algorithm by using a hardware based sampling method.

4. Design the circuit such that it can fit into a form factor of a USB stick, by using an on-board processor instead of a developer board.


Significance

The One Time Pad generator allows for true random bit streams to be produced using a cheap and convenient form factor with very robust and relatively high throughput when compared to some of the commercial true random number generators available on the market currently. These random bit streams are able to feed a large variety of software based applications which use random numbers as their primary input. These applications are implemented across a wide range of different industries such as security, medical and academic research, testing suites and entertainment. Some examples of these applications include being used security and safety critical systems to feed encryption algorithms to academic research where truly random data is needed to test the response of a certain phenomena to record unpredictable output. Another aspect of the generator is how it sends the data in real time to the PC. By using analogue to digital conversion technique it is possible with some modifications to perform real time analysis of various analog signals by simply by connecting it the the generator. The uses of having a real time analysis hardware tool to observe different real time sources can be significant in many industries as well.

Hardware Components

Noise Source

The noise source needed to be a physically based phenomenon due to the fact that anything produced by software would be inherently deterministic and thus predictable causing correlations in the random bit streams. The phenomenon which was chosen to be the source of the noise is called avalanche noise, this type of noise was chosen as it was found to be the best source of white noise[2]. and was produced in this generator by putting two bipolar junction transistors (BJTs) in reverse biased p-n junction at a low voltage. This would result in an effect called quantum mechanical tunneling which would produce an "avalanche" (truly random) noise source. As this technique uses low power it does not require large electrical components to power the generator and at least 15V is needed to produce a suitable amount of noise.

Amplifier

The noise source itself only produces a voltage source of around 250-350 mV which is not large enough to be sampled by the ADC in the generator. Thus there needed to be amplification of the noise source to produced a suitable voltage range that would be properly captured by the ADC. This amplification was done by using another BJT to amplify the noise source. This was able to amplify the noise source output to around 4-5V which was adequate for the noise source. One important caveat of amplification is that it can potentially introduce bias into the signal it is amplifying causing correlations within the noise signal to be sampled. The effects of the introduced correlation in the generator was done through some compensation design of the amplifier circuit by using a bypass capacitor.

ADC

One of the main components that was critical to the throughput and performance of the generator was the ADC circuit which uses the SPI protocol. The actual ADC component in the generator is a ADCS7476 from Texas Instruments. The key properties of this ADC is that it has 12 bit sampling, able to sample at 1 Mega Samples per second and requires 2.7V to 5.2V to be powered which it also uses as a voltage reference for the analog input. These properties allowed for the noise source to be sampled at around 1000 times per second, providing very good throughput of the random data.

FTDI SPI to USB I/O

The FTDI chip was the F232H variant of a well known SPI to USB chip available at FTDI and is implemented in a module which also includes an EEPROM for data operations. It supports more than just SPI however, as it uses an MPSSE engine which can interface with other serial communication standards such as JTAG and I2C. The reason it was chosen was that it supported clock speeds of up to 20MHz which would be more than sufficient to drive the SPI clock requirements of the ADC. The data sampled from the ADC would be captured and then sent through the SPI communications into the EEPROM of the FTDI module and then pushed to the host PC via the USB communications. This data would be able to processed in real time, allowing for bit stream data to be stored directly into a file or passed directly into any software applications requiring random bit streams.

DC-DC converter

The last component of the generator is the DC-DC converter which steps up the voltage of the input voltage into the noise source circuit. As mentioned before the noise source requires at least 15V of power and as the USB standard only allows up to a maximum of 5V then a DC-DC converter was required. There was a custom designed converter used using a DC-DC chip in conjunction with the appropriate power circuit but they kept failing. Ultimately a DC-DC module was implemented instead which allowed us to step up the voltage of 5B from the USB input to around 16-17V which was enough to power the noise source.

Software Components

Software Interface for SPI sampling

A critical part of the generator was to ensure that the Host PC could interact with the generator in order to receive and process the random bits streams. This was done by using both the FTDI library and the relevant API functions along with the SPI protocol for communicating with the ADC. By using the API functions various attributes of the SPI communications could be set such as the number of bits to transfer per sample, the number of samples per second and the speed of the serial clock. This software was developed in Windows and the driver was supplied by FTDI which uses the generic Windows USB standard driver as a foundation.

Graphical User Interface

Statistical Suites

Results

Hardware Testing

Software Testing

Future Work

Team Members

Students:

Andrew Khuu Yanni Karvouniaris

Supervisors:

Dr. Andrew Allison Prof. Derek Abbott

Consultant:

Lachlan Gunn

References

[1] Shannon, Claude (1949). Communication Theory of Secrecy Systems, Bell System Technical Journal 28 (4): 656–715. [2] R.Sarpeshkar, T Delbruck and C.A. Mead (1993). White noise in MOS transistors and resistors, IEEE Circuits Devices Mag. pp. 23-29, 1993