Bitcoin Forum
May 09, 2024, 11:26:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Alpharand; a do it yourself Quantum Random Number Generator using alpha decay  (Read 3068 times)
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 26, 2014, 05:19:20 PM
Last edit: April 28, 2014, 11:44:12 PM by DeathAndTaxes
 #1

Bitcoin relies on random numbers for keys and signatures.  Bitcoin clients/wallets may also rely on them for encryption (salt), and seed generation (HD wallets).  The cryptographic primitives used in Bitcoin have been extensively tested and in all likelihood can not be "broken" but if used with flawed or backdoored PRNG all that security can be bypassed.  

Is your PRNG (pseudo random number generator) secure?  The reality is that it may very well be, but providing it is a very difficult task and impossible when the operating system is not built from source (although one may be able to prove the reverse in some cases).  An alternative is a hardware RNG device, sometimes called a TRNG (true random number generator).  Generally speaking they are expensive and unless open source you are merely trading one opaque box for another.   Designing a hardware device that outputs numbers which appear to be statistically random but are very much deterministic is trivial (a simple example would be take the HMAC of an incrementing counter with a known password).  

Alpharand is an experiment to look into an open source TRNG.  Hardware random number generators can be categorized as by their source of entropy.  Some use sampling of a chaotic system (like radio "noise) however they need to be carefully monitored.  Other devices uses quantum mechanics as the source of entropy.  Quantum mechanics are non-deterministic at least based on our current (limited) understanding of the universe.  

The classic quantum randomness example is firing a single photon at a half mirror. If properly calibrated, some of the time the photon will bounce off the mirror and some of the time it will pass through.  The event can be observed but not predicted.   The action of each individual photon is non deterministic.  This is not (yet) suitable for a DIY project as single photon emitters are expensive.  Another quantum event that can be observed relatively easy is the radioactive decay of unstable isotopes.   The half life of a material gives us the length of time before half of the isotopes has decayed, however the decay of an individual atom is once again non-deterministic.  More useful for our purposes, the length of time between any two decays is also non-deterministic.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715253973
Hero Member
*
Offline Offline

Posts: 1715253973

View Profile Personal Message (Offline)

Ignore
1715253973
Reply with quote  #2

1715253973
Report to moderator
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 26, 2014, 05:19:32 PM
Last edit: April 26, 2014, 05:43:53 PM by DeathAndTaxes
 #2

The hardware:



View of major components.
Geiger Tube (bottom center):
LND-712 was chosen because it is a very sensitive to alpha radiation.  This means it provides the highest # of counts for a source with given level of activity.  Yes the wiring is jury rigged at the moment.  Lead wires could simply be soldered on but I have some ideas on how to improve that.  The entire tube body is the cathode so I would like to find a pair of through hole clips which could be attached to a board and the LND-712 could simply clip into place (note the two recessed rings on the tube body).  This design has an adjust high voltage supply so it could work with just about any tube.  Really the consideration of tube will come down to the entropy source (alpha or beta) and the desired count rate.  Much cheaper tubes can be used but it would mean either a higher activity source or using a beta emitter.  

Entropy Source (bottom left):
0.9 uCi of Am-241 I liberated from a $4 smoke detector.  With the current design and tube this produces ~1,500 to 1,600 cps.  Using 2 counts per bit gives a raw output of up to 800 bps.  To the right of the LND-712 is a pill bottle I am using as storage container for the entropy source.  Am-241 (in this tiny amount) is relatively harmless however one should avoid ingesting it so if you have kids or pets around secure the entropy source when not supervised.  I am still brainstorming the final design but I am considering a "cap" which would fit over the end of the LND-712 and hold the entropy source in place.

Microcontroller (right):
I am using a Netduiono 2 Plus development board because it was the MCU I had, and I like the debug/IDE tool (visual studio).  It is pretty much overkill for this project.  Just about any MCU would work although some might require external SRAM and/or USB connectivity.

Breadboard of HV (upper left):
Close up in next photo



Everything north of row 15 is the HV power supply.  Geiger tubes need to be energized to 400V to 700V with the exact voltage depending on the model.  The LND-712 has an optimal operating voltage of 500V.  The IC in the upper center is the classic 555 Timer which is used to handle PWM needed to step up 5V (or 3.3V) VIN to the HV required for the tube.   The blue variable resistor on the right side allows the HV output to be tuned.  This brings me to my first unresolved challenge.  Accurately measuring the HV output.  My meter input impedance is far too low (~10M Ohm) to accurately measure the HV circuit (~1000M Ohm).  I used some 10 M Ohm resistors in series to improve the measuring accuracy but really I need one monster resistor (1 G Ohm) but those are expensive.  Open to suggestions on measuring the HV output.

The two blue caps (after the HV diode at row 15) store the HV output so it is available to energize the tube between events.  The resistor right before the screw terminals is anode resistor to limit current to the tube.  The LND-712 recommends 10M Ohm (other tubes will vary).

The circuit after the tube is recommended by LND to cleanup the output.  The pulses from output switch the transistor which combined with pull down resistor produce a nice clean VREF on event and ground between events for the MCU.
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 26, 2014, 05:19:39 PM
Last edit: April 26, 2014, 05:33:47 PM by DeathAndTaxes
 #3

The software

Coming soon
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 26, 2014, 05:19:48 PM
Last edit: April 26, 2014, 05:38:21 PM by DeathAndTaxes
 #4

Things to do
Liberate a few more Am-241 sources to test upper limit of the system (712 has a dead time of 90 uSec so that puts upper limit at around 11,000 cps and realistic limit closer to half that).
Collect 10MB of output to run some statistical tests for entropy.
Add LEDs on analog side for power and event to provide troubleshooting.
Investigate tube mounting and connections.
Test pulse detection on MCU using a 10 KHz pulse generator.
Publish schematic.
Publish MCU source code.
Develop schematic into prototype board.
Get prototype board printed, assembled, and tested.
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1068



View Profile
April 26, 2014, 06:09:22 PM
 #5

Open to suggestions on measuring the HV output.
Either get (or build) a simple http://en.wikipedia.org/wiki/Electrometer (sometimes available from the educational supply outlets). This would need to be calibrated using a lab high-voltage source.

Or improvise a single-integration voltmeter: charge a low-leakage capacitor in parallel with your Geiger tube then disconnect from the tube and discharge it trough a voltmeter with a known input resistance. Measure the time it takes to discharge the probe capacitor using a moderately fast timer-counter.

Neither of methods is very accurate, 10-20% at best, but should have good repeatability if you keep them dry and clean from the skin oil and sweat. I vaguely remember from the school lab that a 1 GOhm resistor handled with the fingers becomes 250-750 MOhm resistor depending on whose fingers touched it.



Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 26, 2014, 06:16:30 PM
Last edit: April 26, 2014, 07:13:05 PM by DeathAndTaxes
 #6

Thanks for the tips.  The good news is that GM tubes are pretty voltage tolerant so even 20% should be "good enough". The spec sheet on the 712 indicates optimal voltage is 500V however the response curve is pretty flat between 450 and 650 Volts.  It is more of an issue for an actual geiger counter.  Reporting lower radiation than what is actually occurring because your tube is insufficiently charged and missing particles is a ruin your day kind of bad.  For the purpose of entropy the loss of a few particle events simply means a lower output rate.
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


I may write code in exchange for bitcoins.


View Profile
April 27, 2014, 02:13:37 AM
 #7

This is definitely a fun project.  I learned a lot from this one and your other thread about sources of randomness.  I didn't know about random.org or ERNIE.  I hope you keep posting about this project and your work on an open-source TRNG.
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 28, 2014, 07:59:01 PM
Last edit: April 28, 2014, 09:21:59 PM by DeathAndTaxes
 #8

This is definitely a fun project.  I learned a lot from this one and your other thread about sources of randomness.  I didn't know about random.org or ERNIE.  I hope you keep posting about this project and your work on an open-source TRNG.

Glad to hear it.  Entropy is a pretty poorly understood subject despite it being absolutely critical for cryptography.
DeathAndTaxes (OP)
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
April 28, 2014, 08:07:43 PM
Last edit: April 28, 2014, 09:21:16 PM by DeathAndTaxes
 #9

Update:

I was able to achieve 780 bps using a single 0.9 uCi sample, 1,602 bps using two 0.9 uCi samples, and 2,240 bps using three 0.9 uCi samples.  Due to the size of the slug holding the Am-241 I can't properly position four of them next to the alpha window on the tube (~10mm dia).  In testing getting the samples as close as possible I got less than 1,500 bps (instead of expected >3,000 bps) when using 4 samples.   The controller and tube are capable of higher event frequency but it would require a higher energy density than what is available from smoke detectors.


snailbrain
Legendary
*
Offline Offline

Activity: 1807
Merit: 1020



View Profile
May 02, 2014, 01:59:20 PM
 #10

when not in normal use, you can use it for the global conciousness project Cheesy

http://noosphere.princeton.edu/index.html

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!