Upload
mercurio11
View
219
Download
0
Embed Size (px)
Citation preview
8/3/2019 Quantum Random
1/24
Design and Implementation of a QuantumDesign and Implementation of a Quantum
True Random Number GeneratorTrue Random Number Generator
8/3/2019 Quantum Random
2/24
What is True Randomness?What is True Randomness?
Must be unpredictable.Must be unpredictable.
For a given set of binary data 'i', the i+1For a given set of binary data 'i', the i+1 thth
bit can only bebit can only be
predicted with 50% accuracy.predicted with 50% accuracy.
Must be unbiased and non algorithmic. Computers can't doMust be unbiased and non algorithmic. Computers can't do
this (and neither can you!).this (and neither can you!).
Useful for cryptography, science, and games (gambling andUseful for cryptography, science, and games (gambling and
drinking).drinking).
8/3/2019 Quantum Random
3/24
Types of Random Number GeneratorsTypes of Random Number Generators
Pseudorandom (PRNG): Uses an algorithm and a 'secret'Pseudorandom (PRNG): Uses an algorithm and a 'secret'
initial sequence. This is what your computer does.initial sequence. This is what your computer does.
True Random (TRNG): Samples a physical system of highTrue Random (TRNG): Samples a physical system of high
entropy.entropy.
Both are easy to design wrong and they fail silently!Both are easy to design wrong and they fail silently!
8/3/2019 Quantum Random
4/24
Types of TRNGTypes of TRNG
Non Quantum: Samples a complex system of highNon Quantum: Samples a complex system of high
entropy (lavalamps, time between keypresses).entropy (lavalamps, time between keypresses).
Higher bandwidth, easier to construct, numbers areHigher bandwidth, easier to construct, numbers are
not produced by any obvious algorithm.not produced by any obvious algorithm.
Is complexity as good as randomness?Is complexity as good as randomness?
8/3/2019 Quantum Random
5/24
Types of TRNGTypes of TRNG
Quantum TRNG (QTRNG): Samples a simple system ofQuantum TRNG (QTRNG): Samples a simple system of
high entropy (behavior of single photons or particles).high entropy (behavior of single photons or particles).
Low bandwidth, difficult to sample quantum levelLow bandwidth, difficult to sample quantum level
phenomenae.phenomenae.
However, the output 'should' be truly random!However, the output 'should' be truly random!
8/3/2019 Quantum Random
6/24
Mistakes to AvoidMistakes to Avoid
Do not use more than oneDo not use more than one
entropy source or detector.entropy source or detector.
The author of this paperThe author of this paper
11
suggests a good method too.suggests a good method too.
8/3/2019 Quantum Random
7/24
Mistakes to AvoidMistakes to Avoid
Do not use a counter + CPUDo not use a counter + CPU
interrupts. The number ofinterrupts. The number of
events within a given time isevents within a given time is
not a random distribution, itnot a random distribution, itis a Poisson distributionis a Poisson distribution2
2..
Do not try to calculateDo not try to calculate
'expected' time between'expected' time betweenevents, either.events, either.
8/3/2019 Quantum Random
8/24
Our DesignOur Design
8/3/2019 Quantum Random
9/24
Our DesignOur Design
A PIN photodiode and opamps are used as a solid stateA PIN photodiode and opamps are used as a solid state
particle detector that operates at low voltages. It wasparticle detector that operates at low voltages. It was
enclosed in a Faraday cage.enclosed in a Faraday cage.
8/3/2019 Quantum Random
10/24
Flex PCBFlex PCB
Boards were printed on flex PCB for its good rapidBoards were printed on flex PCB for its good rapid
prototyping characteristics.prototyping characteristics.
8/3/2019 Quantum Random
11/24
Our DesignOur Design
Pulse shaping is done by a Schmitt trigger hex inverter.Pulse shaping is done by a Schmitt trigger hex inverter.
8/3/2019 Quantum Random
12/24
8/3/2019 Quantum Random
13/24
Our DesignOur Design
Sampling and parallelSampling and parallel
output are done by anoutput are done by an
ATtiny261 MCU @ATtiny261 MCU @
8Mhz.8Mhz.
8/3/2019 Quantum Random
14/24
Our DesignOur Design
8/3/2019 Quantum Random
15/24
DemonstrationDemonstration
Hopefully no magic blue smokeHopefully no magic blue smoke
8/3/2019 Quantum Random
16/24
Basic Analysis of OutputBasic Analysis of Output
Check for bias by creating simple frequency charts.Check for bias by creating simple frequency charts.
X means of Y random values should approach the binomialX means of Y random values should approach the binomial
distribution for large X and Ydistribution for large X and Y33..
Keep in mind that 'proving' randomness is impossibleKeep in mind that 'proving' randomness is impossible
through hypothesis testing.through hypothesis testing.
8/3/2019 Quantum Random
17/24
8/3/2019 Quantum Random
18/24
8/3/2019 Quantum Random
19/24
Advanced AnalysisAdvanced Analysis
NIST Random Number Generation Technical WorkingNIST Random Number Generation Technical Working
Group Statistical Test Suite 2.0Group Statistical Test Suite 2.044
100 megabits of data were used for these tests, with default100 megabits of data were used for these tests, with default
options and a=0.01options and a=0.01
The last of 188 tests (linear complexity) did not seem to runThe last of 188 tests (linear complexity) did not seem to run
correctly.correctly.
8/3/2019 Quantum Random
20/24
Advanced AnalysisAdvanced Analysis
Given a block of random data divided into X bitstreams andGiven a block of random data divided into X bitstreams and
subjected to Y tests at some threshold alpha value forsubjected to Y tests at some threshold alpha value for
faliure Z, you expect true random data to fail X*Y*Z tests.faliure Z, you expect true random data to fail X*Y*Z tests.
Minimum 1/alpha bitstreams required (our alpha=0.01)Minimum 1/alpha bitstreams required (our alpha=0.01)
We expect 187 faliures, we observe 205.We expect 187 faliures, we observe 205.
Faliures do not cluster on any specific test.Faliures do not cluster on any specific test.
8/3/2019 Quantum Random
21/24
Future Technology!Future Technology!
Single photon QTRNGs using single photon emitters andSingle photon QTRNGs using single photon emitters and
photomultiplier tubes (Ebay!)photomultiplier tubes (Ebay!)
High bandwidth, zero bias! No isotopes! Requires highHigh bandwidth, zero bias! No isotopes! Requires high
voltage and vacuum tubes (seriously).voltage and vacuum tubes (seriously).
8/3/2019 Quantum Random
22/24
AcknowledgementsAcknowledgements
Foulab for a space to work, and friends to workFoulab for a space to work, and friends to work
with.with.
TRNG driver and data management scriptsTRNG driver and data management scriptswritten by fxwritten by fx
8/3/2019 Quantum Random
23/24
Want to make one yourself?Want to make one yourself?
If all goes well, boards will be available in oneIf all goes well, boards will be available in one
month atmonth at www.legionheavyindustries.comwww.legionheavyindustries.com
http://www.legionheavyindustries.com/http://www.legionheavyindustries.com/http://www.legionheavyindustries.com/8/3/2019 Quantum Random
24/24
ReferencesReferences
1:1: http://isi.cbs.nl/iamamember/CD2/pdf/545.PDFhttp://isi.cbs.nl/iamamember/CD2/pdf/545.PDF
2:2: http://en.wikipedia.org/wiki/Poisson_processhttp://en.wikipedia.org/wiki/Poisson_process
3:3: http://en.wikipedia.org/wiki/Binomial_distributionhttp://en.wikipedia.org/wiki/Binomial_distribution
4:4: http://csrc.nist.gov/groups/ST/toolkit/rng/index.htmlhttp://csrc.nist.gov/groups/ST/toolkit/rng/index.html
For more information:For more information:
http://www.national.com/onlineseminar/2004/photodiode/PhotodiodeAmplifers.pdfhttp://www.national.com/onlineseminar/2004/photodiode/PhotodiodeAmplifers.pdf
http://jp.hamamatsu.com/resources/products/ssd/pdf/s1223_series_kpin1050e01.pdfhttp://jp.hamamatsu.com/resources/products/ssd/pdf/s1223_series_kpin1050e01.pdf
http://www.fourmilab.ch/hotbits/how3.htmlhttp://www.fourmilab.ch/hotbits/how3.html
http://isi.cbs.nl/iamamember/CD2/pdf/545.PDFhttp://isi.cbs.nl/iamamember/CD2/pdf/545.PDFhttp://en.wikipedia.org/wiki/Poisson_processhttp://en.wikipedia.org/wiki/Poisson_processhttp://en.wikipedia.org/wiki/Binomial_distributionhttp://en.wikipedia.org/wiki/Binomial_distributionhttp://csrc.nist.gov/groups/ST/toolkit/rng/index.htmlhttp://csrc.nist.gov/groups/ST/toolkit/rng/index.htmlhttp://www.national.com/onlineseminar/2004/photodiode/PhotodiodeAmplifers.pdfhttp://www.national.com/onlineseminar/2004/photodiode/PhotodiodeAmplifers.pdfhttp://jp.hamamatsu.com/resources/products/ssd/pdf/s1223_series_kpin1050e01.pdfhttp://jp.hamamatsu.com/resources/products/ssd/pdf/s1223_series_kpin1050e01.pdfhttp://www.fourmilab.ch/hotbits/how3.htmlhttp://www.fourmilab.ch/hotbits/how3.htmlhttp://www.fourmilab.ch/hotbits/how3.htmlhttp://jp.hamamatsu.com/resources/products/ssd/pdf/s1223_series_kpin1050e01.pdfhttp://www.national.com/onlineseminar/2004/photodiode/PhotodiodeAmplifers.pdfhttp://csrc.nist.gov/groups/ST/toolkit/rng/index.htmlhttp://en.wikipedia.org/wiki/Binomial_distributionhttp://en.wikipedia.org/wiki/Poisson_processhttp://isi.cbs.nl/iamamember/CD2/pdf/545.PDF