The Random Page

2023-05-27 | [radiclock]
next: Atomic Clock

lol so random

As part of my atomic clock project I also produce random numbers (why not). Radioactive decay is a well known method to generate true randomness because no one can predict which or when an atom will decay. This technique was used for years in the famous HotBits project which is sadly shut down as of 2023. I have a radioactive sample of my own, but, there's a ways to go from a Geiger counter to a number. How does this work?

  1. Radiation from my sample of pitchblende gets detected by one of my radiation sensors. These are the "clicks" you hear from a geiger counter.
  2. There is a timer running all the time. When a pulse from the sensor comes in, take the timestamp of it. If you want to slow down the rate, you can take the time every nth pulse instead. Whatever the setup, do this until you have 4 timestamps.
  3. Do a quick check to make sure the timestamps are in order (in case the timer overflowed)
  4. Take the 4 timestamps, and generate 2 intervals:
  5. If interval0 > interval1, that's a 0. If interval1 > interval0, that's a 1. If the 2 are equal, throw out the sample and try again.

I actually have 2 sensors; one is a classic Geiger–Müller tube, and the other is PIN-diode based. I collect random numbers from each. I didn't know quite what to do with the numbers I collected, so I figured I would publish them live.

The 2 detectors are set up to generate random bits at around the same rate - about 32 bytes every 55 seconds. The full 1024 byte frames shown and linked below will update about once every half hour. Therefore, please do not spam us with requests. Also, be sure to check the ISO 8601 timestamp at the start of each file, and make sure it's somewhat close to the current time. If it isn't, the project is either broken, or you are getting a cached copy (check your browser).

Also, a most important note: the data listed here is published globally, not individually, like HotBits or random.org. In other words, it is not unique to you. I highly recommend you do not use this for security purposes as it it possible another party may have a copy of the data.

From the GM tube (hex format):

2025-02-16T15:46:58.935272+00:00
17b567f50955ecdec104f9512cd00e3628094856771569b7df0bdeae76340ec2
d9f43aa894f7c3a23af6ff787bd8c3382375e0e0307a2bbea8b91525f0b14bab
a22bca9effdfbf9fa2664d385a592d8eb54033eabb41ec3c9101adac47708c45
550a6a656488b2b82a932768f90b676c69a702470c9b892fd0ccd917347ccfc4
92bdde15452e18ae5f9a34d5b35c48b3162ddd655e68bd8d0982ed74a81ff10e
3946c60f880a38bf6a93c59e47eb402635950decfc284efa611e3a41600349f1
2b8d4bddc9306116d61bbe1fba715a4bfbca794d38a6daffc044a9f288241c02
8233d2f8f82f3ae3bf09567836160b7856bfbdd61f2e087783a2b619beabcc3f
ea31db1a792632cb32557930ad00720193c8e29ef7a5686e1a1f01e2886f59a2
a6da6c94009b3a09b9eefa0f6e9d75e761f9c373ca040223682d93b25c1d44fe
6105abb631ae33b892b1ce756f350fbbd858ed2acc5823a0164570e5a1116975
7edb0380850d070043992b0f5b014f191e335f2b165f903c7dbe6ae1eff050b9
6d4129a02e899ed413a0f68396549798b91bde47267f1966162ca4d19c309eb8
e032d854bd25d861dffef0639051f6993161df66c76932bc4366d2d0ed72b8bd
5be3277300ed4bbc7f2f0a2dceda165a418c4d46f20ca38f69237b40c3523797
889159baeb0ff5e873029cbdb51143ffcad7cddf11f69e8e22df51fd5c00114f
f10adefe2174fb41cf67e2676be4166525874b2701d8539d3801e9a22ffb0f79
d5131b922c94d50bb9b25fc60c0f0f8822a73eab0a426a6e263ce92f584f6885
1b8403986bed07556347d0c3d7c14f4ca53baebff73152c4c0b141c77076c740
860d57e343f9c8da7edb689ec3945816997830022388884bf28e0c2c2618a610
817c3eec95e3c57ca7bd6b499b90512a06001208e5499d241de1f8401776486c
bbd2de09a80212d6a00eaf961d10415a9f503d814bba79dc42f8a476dbab17fb
19eebd5cd5091ec6dbce05b8d887b1ffbcf312dcb59af875caf0861f40d65452
4af7dcc2e4c1a23e98b0d6e96535cd54a18b6654c54ec1717c5eb9e093fd379f
55d4fd76f1afce7eaf2917653a6fd4a9cf2b7db3f6b5af1fa19f04495bad39e8
fed88721af102674ff8610221708da78ddc246505b3e93c4f9a0b0751a6d3e1e
6901e447e2bdb15b7cdf44f179b453b6ecca7e17f2a4967ba59c85934a92530c
3162aa928cf9448f28782e15abdc928b84d47d9d42bbc7737cfb30450ac80b97
8bd9b734bf4028cc121422b10eb0d24fdab0e6cf1ec04e80c9c5af0967d5293a
5655e759deabd2197d1f45c3d90080aac9c8b2b8fbec3598800d22bb8bc8242e
290bed6ab055e550108154d5968fc9e6fc1365dc12f0facffa815cee13266496
4d004b2e16fb9a6394213e8030ea615d1e330502af7bb337d9c4f43592e083b9

From the PIN diode (hex format):

2025-02-16T15:49:37.735700+00:00
17ba4a00cb81f6626ead1d575574bb5d7615a51bf1def2aff1ce4d9f2238e477
9aac6b8e558efa161adfb3277606df7b05f480ce32bd155268fc1090cb521851
fad0d67bb841a3b3ad1812e6e24379712e653ac6e36b409f9a2a5852c4b71ef7
f63229fa084da603bc0f9f036274e4660a078dc049a7adea6c27e0b6efe690f8
840835a069f053ccaed0b8b07aa565bee58a4ccbb0a1862b4e1fc1acbf743442
22bb191a8373c4a12da68ccd5ed23071e98cb86c2cddf2ab59b32e4fcf5bcbba
efaac2504d1ed5fd0114eebe4364a917689c647a7e736ce540631cff4e4f7a44
c67ad27365ac22205cb444da5ed0d39281deb9c78ff33ca9732082b623ac6608
16928509e8d5d3255e7c4cfafcb2e5c7449b88ed033c4041fe30b4baa84837a2
5761147c09b3b53e8eb63cf6037ea888c06ab683b12b1ebbdbdde64110a2dc3a
6e947ca96566bf0e3ecbb5c9913b99edd89065bb59fa5194f3a24c8f319dd77f
1e2d35f0acfa9f41f479f64d83917722bcbf0b90e7785bf62383380e5a39b32e
06681ddc5f3434f9d721158c9670be94d9bfcc7b219bf0cc7161d9059ad5a463
09269e54f23e97c9771a81292fa9d064635e69df41f1a20ef93a1374b13a352b
85fde7eb6da67cb3bacff151d26406d573fc474a270eaa86d59edd002bde5b79
6eba81aafd5351978f5dc76248f9ef410fd54ce905047f641274b9a50b094f63
6175d2f2dcf310af57fc82d950dec680f4103b7660dc116e36c45c52d32c035e
73831736f4120f0390c5e25c917bcab428c177412b276d2e1ad8115dbaea75b9
9155ee7c82171a0422c2d18284978a4bbcde1d935108e8173f73ddd4477fc1ad
de786129ff1adf991d13e0c7876d16ecbf5b79dfadd98643cc7ae2a461ffd537
a32f8b3cc2867ab559fb3339f010a6bd50e78002742e4b5c3a364238a6c457a1
5f0020afcc08e60ef3978a57ad6502bf93ade9bf514aea7484b70d8f196e7c06
70ea069df75f4c646b0d1ee31a49de7b6057281345c158fce28646c9e90cbc58
4266ad04382339635ff8ad67177760f6015efdf96511a134fd904d1fbd0e0139
aa7a9cc0b70ddc952cde81c25c1034af7780972ab95f46188d9bb44e8bbf1f21
9a1cbe61cc63f042515bf80b9d3c70245208398d06e548b6d870161528998262
5424d7867b6597bdb9397c612321d44008dea39c259435f5f9311d0fbc5b3a20
09e3496482b03c61e7e3509eb8751d776c4bdd3dcb43d5110f5f70177cd56c08
fa0b09466c8f5c709f242fe9472f6dcf83c62786e4991885543a30c8f3474045
507739d82f587e6ec8fd85badd0f7cd577bfb5b33d294266620328b67eda874e
988296c29093d097903c52c9b5417b53815b1bcd893ba383a4791b3528f90b9e
b7dac26b055476144b817f547fa174f32af135f86f7dd35892899e5387fbb8c6

Ok, so you want decimal digits instead? I've come up with this technique:

  1. Look at each byte. It's a number from 0-255. Throw out any samples greater than 199, and we now have a range from 0-199
  2. Convert those samples to a 3 digit string, then throw away the first digit. Now, we have random numbers from 0-99
  3. Concat those strings into a really long string. Now, we have a sequence of random digits. But, the string can vary in length.
  4. To deliver something with consistent length, I can just trim the string. But by how much? Since the probability of a skipped byte is 56/256, we would expect about 800 of 1024 bytes to be usable samples. There's a 50% chance there will be more than 800 good bytes. But, there's about a 99.99% chance there will more than 750 bytes. I still double check to make sure, but that's what I publish. Of course, that gives 1500 digits.

To determine where to make the cut, look up the binomial distribution probability. It's already built into spreadsheets as BINOM.DIST, which is what I used.

From the GM tube (digits):

2025-02-16T15:46:58.935272+00:00
23810309859304814414544009728619210583117418521494
58684895625820239556351748224390688521377775716243
58915962027756908945428164518765604501737271124069
85100601003678844247390411030805670271125537472352
24964689216946247495545279927279224501940489410930
16683114577098153610569106479758716438534913407897
30586596037343417548972227903186139075217756669268
69363628023051475891098620542211208691893146081931
62822590716349262138505085214873001401475865041026
31013611896266084800555809851510571797951504023504
45477892296897057182497451844677171153158788428835
60226912611705172603283313070067534315910179253051
95432295446025900680850965416046375819603150845152
85277138272502224464564858845084893797994481534997
02990550886702148489913915007588274710452290654077
70126343053523649582555136458986151502568981176717
58423481920017791033166503030722013735753901835756
01624715211927464448118578959812151536346762711066
06103860478879043327320352070785997195937976655974
91498296927765991218996434138767260458954888225320
48023536367542124438246616292462499724678907735544
81420600180873573629642318720887096802186014755029
16659059806129758621666418712325899209309805843577
88188154173431648482749493626252760153846139028497
78931324948547555985187526754123015811694325798175
31615904739173573533751638163416342308209470809162
47966076172609623005017189779124682180838226236450
23655633477446831249987046406843402046217146393225
57668799152448691011513983529164401820347714767976
30927828977509034158868589712525316995002870788453

From the PIN diode (digits):

2025-02-16T15:49:37.735700+00:00
23867400299810732987851687931821652775775934561954
72074285422226793918062305285089218204164482248123
84656379732418672113460158980764595442888296833050
41087766038815590398160210074192736773083982443208
53600583748476226501903876766134437831937291165266
34872526311596614566409448134084084471897946799186
70948077300120906700692304560022261508649928787922
68982215017234329280689446298599436069153230823572
02082246330937942476789968553603606465488086687255
62879720240979816242826003266836920682317743308765
16625810482469010291146281455953440187898148627643
49572730455372596521773145193488911144209135315614
90577946060429955252332140501290489123335513970554
64990938588462511926294147690099940565621458191677
58534333096624798681000615717439147034580043912110
86297083815143939998726515760504270018168565110979
99971716758730809828165918961710549692824403941531
23541815034497924523804093196543390946261793861785
45852430232604349430325138758829478108236315712793
73209741265329199935092291912173346722649755634739
60943422818951571666898028021646759258546656669687
61950032750814513887730102914773918174163283134325
10240612065795760007133026732396874019699388347012
88886602730456355799957303231996019401176152447731
89140157702256928313494429949216527519285142859570
24415580783991313354289097996681911157601236820857
41067282122221405330988436342301518985572497353364
08635637485349291588915832097300307660978058841729
19087561671715951223240808110970084392125936477147
09319839345324338458487164698019574788261033861524

Or, perhaps you want just the raw bytes themselves. Just make sure to trim away the first 33 bytes which are the timestamp header:

Here is the python program I use to generate the reports above.

comments | Alnwlsn 2024