generation of true random numbers based on radioactive...

4
POSTER 2017, PRAGUE MAY 23 1 Generation of True Random Numbers based on Radioactive Decay Daniel R ¨ USCHEN 1 , Moritz SCHREY 2 , Johannes FREESE 3 , Iris HEISTERKLAUS 4 1 Chair for Medical Information Technology, RWTH Aachen University, Aachen, Germany 2 Chair for Integrated Analog Circuits and RF Systems, RWTH Aachen University, Aachen, Germany 3 RWTH Aachen University, Aachen, Germany 4 Institut f ¨ ur Nachrichtentechnik, RWTH Aachen University, Aachen, Germany [email protected], [email protected], [email protected], [email protected] Abstract. Unpredictable random numbers are a prerequi- site for the safety of many cryptographic applications. Truly random numbers can only be generated using observations of a stochastic physical process. This paper presents a true random number generator (TRNG) based on radioactive de- cay. Decay events of a Thorium dioxide sample are detected with a Geiger-M¨ uller tube and transformed into a random bit stream on a Raspberry Pi single-board computer. A random bit is generated from each decay event, hence the efficiency of the TRNG is 100 %. On average, the system produces a random bit every 90 ms. The entropy of the generated bit stream is optimal with 1 bit per bit, the serial correlation coefficient is close to zero. A set of statistical tests for ran- domness were applied to show that the system produces high quality random numbers. Keywords Geiger-M¨ uller Tube, Radioactive Decay, Random Bi- nary Noise, Statistical Testing, True Random Number Generator 1. Introduction Random numbers have numerous applications, for in- stance, in cryptography [11], the identification of dynamical systems [9], and the estimation of π [1]. Especially cryp- tographic applications rely on the unpredictability of these random numbers to generate keys or to use them as initial- ization vectors [6]. These number sequences can either be generated using pseudorandom number generators (PRNG) or true random number generators (TRNG). Badly designed PRNGs make various attacks on otherwise secure crypto- graphic algorithms possible [6]. It is impossible to generate unpredictable number se- quences using computer programs, as these are inherently deterministic. The numbers generated with computer pro- grams are called pseudorandom, because they only approx- imate the properties of sequences of random numbers. In order to generate truly unpredictable number sequences, as- pects of a stochastic physical process have to be observed and converted into an electrical signal. Examples for such processes are noise sources or radioactive decay [5]. In this paper, we present a TRNG that consists of a ra- dioactive source and a corresponding detector. The decay impulses are measured for further digital processing. Ran- dom bits are obtained by deciding whether the time interval between two pulses consists of an odd or even number of time units. The statistical properties of the resulting random bit stream were analyzed, showing that the overall system generates high quality true random numbers. 2. Materials and Methods 2.1. Geiger-M¨ uller tube Geiger-M¨ uller tubes are used to detect ionizing radia- tion [3]. A generic tube is depicted in Figure 1. It consists of a gas-filled chamber and two electrodes with a high potential difference. When an ionizing particle enters the tube, ions and electrons are created and accelerated towards the cath- ode and anode, respectively. The electrons gain enough ki- netic energy to ionize more gas atoms, which causes a chain reaction that can be measured as a voltage U m outside the tube. Cathode Anode Isolator 400 V U m Fig. 1. Schematic diagram of a Geiger-M¨ uller tube.

Upload: others

Post on 10-Oct-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Generation of True Random Numbers based on Radioactive …poseidon2.feld.cvut.cz/conf/poster/poster2017/... · random numbers can only be generated using observations of a stochastic

POSTER 2017, PRAGUE MAY 23 1

Generation of True Random Numbersbased on Radioactive Decay

Daniel RUSCHEN1, Moritz SCHREY2, Johannes FREESE3, Iris HEISTERKLAUS4

1Chair for Medical Information Technology, RWTH Aachen University, Aachen, Germany2Chair for Integrated Analog Circuits and RF Systems, RWTH Aachen University, Aachen, Germany

3RWTH Aachen University, Aachen, Germany4Institut fur Nachrichtentechnik, RWTH Aachen University, Aachen, Germany

[email protected], [email protected], [email protected],[email protected]

Abstract. Unpredictable random numbers are a prerequi-site for the safety of many cryptographic applications. Trulyrandom numbers can only be generated using observationsof a stochastic physical process. This paper presents a truerandom number generator (TRNG) based on radioactive de-cay. Decay events of a Thorium dioxide sample are detectedwith a Geiger-Muller tube and transformed into a random bitstream on a Raspberry Pi single-board computer. A randombit is generated from each decay event, hence the efficiencyof the TRNG is 100 %. On average, the system produces arandom bit every 90 ms. The entropy of the generated bitstream is optimal with 1 bit per bit, the serial correlationcoefficient is close to zero. A set of statistical tests for ran-domness were applied to show that the system produces highquality random numbers.

KeywordsGeiger-Muller Tube, Radioactive Decay, Random Bi-nary Noise, Statistical Testing, True Random NumberGenerator

1. IntroductionRandom numbers have numerous applications, for in-

stance, in cryptography [11], the identification of dynamicalsystems [9], and the estimation of π [1]. Especially cryp-tographic applications rely on the unpredictability of theserandom numbers to generate keys or to use them as initial-ization vectors [6]. These number sequences can either begenerated using pseudorandom number generators (PRNG)or true random number generators (TRNG). Badly designedPRNGs make various attacks on otherwise secure crypto-graphic algorithms possible [6].

It is impossible to generate unpredictable number se-quences using computer programs, as these are inherentlydeterministic. The numbers generated with computer pro-grams are called pseudorandom, because they only approx-

imate the properties of sequences of random numbers. Inorder to generate truly unpredictable number sequences, as-pects of a stochastic physical process have to be observedand converted into an electrical signal. Examples for suchprocesses are noise sources or radioactive decay [5].

In this paper, we present a TRNG that consists of a ra-dioactive source and a corresponding detector. The decayimpulses are measured for further digital processing. Ran-dom bits are obtained by deciding whether the time intervalbetween two pulses consists of an odd or even number oftime units. The statistical properties of the resulting randombit stream were analyzed, showing that the overall systemgenerates high quality true random numbers.

2. Materials and Methods2.1. Geiger-Muller tube

Geiger-Muller tubes are used to detect ionizing radia-tion [3]. A generic tube is depicted in Figure 1. It consists ofa gas-filled chamber and two electrodes with a high potentialdifference. When an ionizing particle enters the tube, ionsand electrons are created and accelerated towards the cath-ode and anode, respectively. The electrons gain enough ki-netic energy to ionize more gas atoms, which causes a chainreaction that can be measured as a voltage Um outside thetube.

Cathode

Anode

Isolator

400 V

Um

Fig. 1. Schematic diagram of a Geiger-Muller tube.

Page 2: Generation of True Random Numbers based on Radioactive …poseidon2.feld.cvut.cz/conf/poster/poster2017/... · random numbers can only be generated using observations of a stochastic

2 D. RUSCHEN et al., GENERATION OF TRUE RANDOM NUMBERS

400V

5V5V

2,2nF

f ~ 1kHzBSP130

20Ω

1:10

220nF

Z100

Z100

Z100

Z100

Z6,2 10MΩ

FDD6612A

100Ω

500kΩcounter tube

330kΩ

10kΩ

FDD6612A

RPi GPIO

3,3V

(TTL)

power supply signal conditioning

Fig.2. Circuit of the Geiger-Muller tube evaluation circuit prototype.

We use a Voltcraft Z1A/J302ßy tube (Conrad Elec-tronic AG, Wollerau, Switzerland) with an operating voltageof 390 V. The halogen-filled tube length is 65 mm and itsdiameter is 7.5 mm. It can detect β- and γ- radiation.

2.2. Radioactive sample

As radioactive material, a gas mantle mainly consist-ing of Thorium dioxide (ThO2) is used. Thorium (Th) hasthe atomic number 90. The isotope 232Th has the longesthalf-life of all significantly radioactive elements with ap-proximately 1.4× 1010 years [12]. Its decay chain, the Tho-rium series, terminates with lead (208Pb) while emitting αand β− particles. The latter can be detected with a window-less Geiger-Muller tube.

2.3. Circuit

Figure 2 shows the circuit used for the detection of de-cay events. The left part of the circuit produces the 400 Vneeded as potential difference between the anode and cath-ode of the Geiger-Muller tube. It is generated with a flybackconverter that utilizes the 5 V and a 1 kHz TTL signal sup-plied by a Raspberry Pi single-board computer [10] on theprimary winding of the transformer. The higher voltage onthe secondary winding is rectified using a diode bridge andstabilized with four Zener diodes. An LED is used as indi-cator for active high voltage.

The counter tube has a high impedance until a decayevent happens. The counter tube becomes conductive andthe voltage across a resistor can be measured and switches atransistor on which pulls down a general purpose input out-put (GPIO) input of the Raspberry Pi. This GPIO input ofthe Raspberry Pi has interrupt functionality, the time sincethe start of program in ms is recorded. These event timingsare the input to the algorithm that generates the random bits.

2.4. Algorithm

Radioactive decay can be mathematically modeled asPoisson distribution, the time between two events is de-scribed by an exponential distribution [8]

p(x) = λe−λx for x ≥ 0. (1)

The rate parameter λ > 0 is determined by the radioactivesample. Importantly, the exponential distribution is memory-less, which means that the time distance distribution betweentwo consecutive events is not time-dependent. This propertyallows a simple and efficient way of generating random bits.Using the time difference ∆t [ms] between two consecutiveevents, a random bit bn ∈ 0, 1 can be generated by dis-carding any fractional values and using the last binary digitaccording to

bn(∆t) = b∆tc (mod 2), (2)

where n is the sequential number of the bit. For n = 1, thetime difference between the start of the program and the firstevent is used. This method has an efficiency of 100 %, asit generates one bit per decay event. Furthermore, a changeof λ induced by a change of the radiation source or its massdoes not affect the statistical properties of the bits generatedwith this method.

To harden this method against systematic errors, amodified mapping rule has been implemented: After everygenerated bit, the mapping from the last binary digit of ∆tto a binary number gets inverted according to

bn(∆t) =

b∆tc (mod 2) if n even,b∆tc+ 1 (mod 2) if n odd.

(3)

2.5. Overall system

Every time an ionizing event is detected at the Geiger-Muller tube, an interrupt function is called on the RaspberryPi that executes the algorithm described in Section 2.4. It

Page 3: Generation of True Random Numbers based on Radioactive …poseidon2.feld.cvut.cz/conf/poster/poster2017/... · random numbers can only be generated using observations of a stochastic

POSTER 2017, PRAGUE MAY 23 3

(a)

(b)

(c)

Fig. 3. Overall system consisting of (a) Raspberry Pi 1, (b)Geiger-Muller tube evaluation circuit prototype, and (c)ThO2 gas mantle.

is implemented in C++. The hardware of the overall sys-tem is depicted in Figure 3. It consists of a Raspberry Pi 1model B, the circuit prototype described in Section 2.3 andthe radioactive sample characterized in Section 2.2. The rib-bon cable connects the following parts of the single-boardcomputer with the prototype: 5 V, 3.3 V, ground, and twoGPIO pins. One GPIO pin is used as output to provide the1 kHz square-wave signal for the flyback converter, the sec-ond GPIO is used as interrupt pin to detect decay events.

3. Results and DiscussionIn order to evaluate the statistical properties of the ran-

dom bit stream, 37 days of data corresponding to 35× 106

events were recorded. With an efficiency of 100 %, the sys-tem produces a random bit every 90 ms on average. Table 1lists important metrics of randomness and their theoreticaloptimum. All evaluations were done in Matlab (The Math-Works Inc., Natick, USA), for the statistical tests an signifi-cance level of α = 0.05 was used.

Metric TRNG Optimum

0’s 50.0046% 50%

1’s 49.9954% 50%

Entropy 1 1

SCC 1.6× 10−5 0

Runs test 92.51% 100%

χ2 test 16.65% 100%

Spectral test 66.73% 100%

Tab. 1. Overview of the metrics of randomness of the generatedbit stream.

The distribution of 0’s and 1’s indicates if the randomsource produces a white or colored output. Here, the distri-bution is almost optimal. The entropy is a measure of theaverage information content of a source. The random bitstream reaches the optimal value of 1 bit per bit. The serialcorrelation coefficient (SCC) is a similarity measure betweena given variable and itself over time. The implementation ac-cording to [7] yields an SCC of 1.6× 10−5.

0 50 100 150 200 2500

0.5

1

1.5

2·104

Unsigned integers

Cou

nt

Fig. 4. Histogram of random binary numbers interpreted as 8 bitunsigned integers.

The last three test results listed in Table 1 are p-values.These can be interpreted as the probability of observing a teststatistic as extreme as, or more extreme than, the observedvalues given a truly random sample. The runs test [2] isbased on the number of of consecutive 0’s and 1’s in thebit stream. Too few runs are an indication of a tendencyfor 0’s and 1’s to alternate, to many runs are an indicationfor clustering. Based on this test, the probability that thegenerated bit stream is truly random is 92.5 %.

For the χ2 test [4], eight consecutive random bits areconsidered to be unsigned integers. The counts of these inte-gers ranging from 0 to 255 are depicted in Figure 4. The χ2

test for randomness measures how far the counts of the indi-vidual numbers are from their expected value. The p-valueof this test is 16.65 %, which is rather low compared to theother two statistical tests.

The spectral test [7] is based on the fast Fourier trans-form (FFT). This test detects recurring or repetitive pat-terns in the peaks of the power density spectrum which isa sign for periodic dependencies as e.g. introduced by lat-tice structures. If the number of peaks that exceed the 95 %threshold differs significantly from 5 %, it is a sign for non-randomness. The system passes the test with 66.73 %.

4. ConclusionsWe present a low cost system that generates high qual-

ity random numbers. The generated numbers are with a highprobability true random numbers that pass the Runs, χ2, andSpectral tests for randomness.

Security critical processes e.g. in cryptography can usethe generated numbers as seeds and thus do not need to relyon streamed random numbers from the internet (which are

Page 4: Generation of True Random Numbers based on Radioactive …poseidon2.feld.cvut.cz/conf/poster/poster2017/... · random numbers can only be generated using observations of a stochastic

4 D. RUSCHEN et al., GENERATION OF TRUE RANDOM NUMBERS

public). The system also works with cosmic backgroundradiation so a radioactive source is not necessary but willquicken the random number generation.

AcknowledgementsThis work was inspired by a project conducted by

Markus Rohe at Saarland University. We also thank Profes-sor Vladimir Blazek for his valuable advice and continuedsupport.

References[1] ARNDT, J., AND HAENEL, C. Pi - Unleashed. Springer, 2000.[2] BRADLEY, J. V. Distribution-free statistical tests. Prentice-Hall,

1968.[3] GEIGER, H., AND MULLER, W. Elektronenzahlrohr zur Messung

schwachster Aktivitaten. Naturwissenschaften 16 (1928), 617–618.[4] GREENWOOD, P. E., AND NIKULIN, M. S. A guide to chi-squared

testing. John Wiley & Sons, 1996.[5] GUDE, M. Concept for a high performance random number generator

based on physical random phenomena. Frequenz 39, 7-8 (1985), 187–190.

[6] KELSEY, J., SCHNEIER, B., WAGNER, D., AND HALL, C. Crypt-analytic attacks on pseudorandom number generators. Fast SoftwareEncryption LNCS 1372 (1998), 168–188. Springer.

[7] KNUTH, D. E. The Art of Computer Programming, Volume 2:Seminumerical Algorithms. Addison-Wesley Longman PublishingCo., Inc., Boston, MA, USA, 1997.

[8] MARSHALL, A. W., AND OLKIN, I. A multivariate exponential dis-tribution. Journal of the American Statistical Association 62, 317(1967), 30–44.

[9] O’LEARY, D. P., AND HONRUBIA, V. On-line identification of sen-sory systems using pseudorandom binary noise perturbations. Bio-physical Journal 15, 6 (1975), 505–532.

[10] ROBINSON, A., AND COOK, M. Raspberry Pi Hardware Projects 2.Wiley, 2013.

[11] SCHNEIER, B. Applied Cryptography: Protocols, Algorithms, andSource Code in C. John Wiley & Sons, 2007.

[12] VOCKE, R. D. Atomic weights of the elements 1997. Pure Appl.Chem. 71, 8 (1999), 1593–1607.

About Authors. . .

Daniel RUSCHEN was born in Leverkusen, Germany andreceived the B.Sc. and M.Sc. degrees from RWTH AachenUniversity, Aachen, Germany in 2010 and 2013, respec-tively. He is currently a research associate and Ph.D. studentat the Philips Chair for Medical Information Technology,Helmholtz-Institute for Biomedical Engineering at RWTHAachen University. His research interests include robustcontrol of ventricular assist devices, human body motiontracking using inertial/magnetic sensors, and true randomnumber generation.

Moritz SCHREY was born in Hannover, Germany. He re-ceived his B.Sc. and M.Sc. degrees from RWTH Aachen

University, Aachen, Germany in 2010 and 2013. Currently,he is pursuing his PhD and working for the Radio Frequencygroup within the Chair for Integrated Analog Circuits andRF Systems at RWTH Aachen University as a research as-sociate. His research focuses on analog and digital ASIC de-sign for standard-independent radio frequency transceivers.His interests range from discrete electronics and firmware tohardware abstraction and low-level data processing.

Johannes FREESE was born in Haselunne, Germany. Heis currently pursuing the Master’s degree in Electrical Engi-neering, Information Technology and Computer Engineeringat RWTH Aachen University, Aachen, Germany.

Iris HEISTERKLAUS was born in Berlin, Germany in1986. She received the Masters degree in Electrical Engi-neering, Information Technology and Computer Engineeringfrom RWTH Aachen University, Aachen, Germany, in 2012and is currently working as a Ph.D. student at the Institut furNachrichtentechnik, RWTH Aachen University. Her focusis on image and video analysis and content recognition.