6 ms·
Generating true random numbers from bananas
- bmm6o 4y agoDid he actually say how the data is gathered? It hinted at potassium decay but if he went into more detail, I missed it. And every experiment needs a control - does the banana add anything?
- somebodynew 4y agoThe detector is a Geiger tube. There are more details on the GitHub page [0], including this note: > Disclaimer: the radioactivity from the bananas doesn't quite make the difference, the background radiation is more than enough to make the generator work and afaik the banana's is not even detectable. [0] https://github.com/valerionew/Banana-Random-Number-Generator https://github.com/valerionew/Banana-Random-Number-Generator
- a9h74j 4y ago> afaik the banana's is not even detectable So they might just as well have used salt? AFAIK that is best practice. :)
- GravitasFailure 4y agoPotassium Chloride is sold as a sodium-free table salt substitute and will give you far more decay events per second than a banana. I'd have to double check the decay rate in a kilo of KCl vs background radiation, but even if the decay rate is too low for random number generation you can still use it to salt your hashes[0]. [0] https://www.allrecipes.com/gallery/best-hash-recipes/ https://www.allrecipes.com/gallery/best-hash-recipes/
- whispering 4y agoKCl is definitely detectable. And the same goes for KOH. And it significantly increases the throughput.
- kgwgk 4y ago>you can still use it to salt your hashes Nice.
- whispering 4y agoAuthor here. There is a part 2 that explains the generation in detail, you find it linked below the part 1, or at the link [0]. The banana does not make a significant difference (the generator can operate without it), however the potassium in general can definitely be detected. I've made some test with KCl and the increase in counts is huge. In the end this is not very important for the purpose of the project: i just wanted to tell a story involving true random number generation from radioactivity, and the radioactive banana is very functional for this purpose. [0]: https://www.valerionappi.it/chi-squared/ https://www.valerionappi.it/chi-squared/
- iosystem 4y agoI think the phrase "true random" is confusing. The author did highlight the difference well between the two. I still wish there was a better phrase for techniques generating randomness that are currently better than techniques generating pseudo-randomness.
- jazzyjackson 4y agoperhaps "non-psuedo-random" ? or physically-random, as in, produced by an effect of physics and not an algorithm.
- iosystem 4y agoI think "non-psuedo-random" is definitely better for someone approaching the topic from a beginner mindset. It possibly hints that something non-psuedo-random can become psuedo-random depending on how advanced scientific understanding of nature becomes.
- throwamon 4y agopseudo* pseudo* pseudo*
- jazzyjackson 4y agoI'm more of a descriptivist myself
- stavros 4y agoAnd I like describing the proper spelling of words :P
- kibwen 4y agoIdeally I would love if we could stop using "random" entirely when referring to PRNGs. Call them "deterministic bit mixers" or something.
- jazzyjackson 4y agoThe first thought that occurred to me was, I wonder if the radioactivity changes as the banana ripens. The starch converts to sugar, but of course that has nothing to do with the amount of potassium in the banana... or does it? Perhaps geiger counters in the hands of hobbyists could perform experiments confirming or disproving the theory of biological transmutation - the possibility that life can transmute sodium to potassium or potassium to calcium has been totally written off by modern physics, but only declared impossible, not proven to be bunk. The talk page on Corentin Louis Kervran's wiki [0] is more interesting than most psuedoscience, and a book review [1] describes some compelling experiments: > Everything they ate and drank was measured and everything they excreted was measured, weighed and reported. The balance sheet showed that during great heat the potassium excreted through perspiration greatly increased. The workers were given salt tablets to suck on during the day to increase their sodium. More potassium was excreted than the workers were consuming. > Hens without calcium in their diets can transmute mica which contains some silicate of potassium to calcium in less than a day going from soft shells to hard, complete shells in 20 hours. Should be pretty easy to prove with some geiger readings over time, no? [0] https://en.wikipedia.org/wiki/Talk:Corentin_Louis_Kervran https://en.wikipedia.org/wiki/Talk:Corentin_Louis_Kervran [1] https://bionutrient.net/site/library/reviews/biological-transmutations https://bionutrient.net/site/library/reviews/biological-tran...
- tsimionescu 4y ago> More potassium was excreted than the workers were consuming. This part is not necessarily surprising - K and Na perform similar roles in the organism in certain areas, so it's possible that the body was shedding its reserves of K preferring to replace them with the Na it was receiving. That seems just a little bit more likely than expecting the body was actually fusing Na with ? to produce K. > Hens without calcium in their diets can transmute mica which contains some silicate of potassium to calcium in less than a day going from soft shells to hard, complete shells in 20 hours. Again, the most plausible explanation by far (well, except for experimental error) is that the potassium supplements enabled the hen's bodies to replace some amount of Ca with K in one process where they work similarly, freeing up the Ca for another place where they don't. This is even easier to imagine, as the body has enormous reserves of Ca in the forms of bones, which it can and does occasionally dissolve and re-use (that is why severe malnutrition can lead to bone brittleness even in adults with fully formed bones). > only declared impossible, not proven to be bunk This is a misunderstanding. The modern understanding of the structure of the atomic nucleus (based on quantum chromodynamics) proves that any change in the atomic number must be accompanied by a gigantic amount of energy, as the bonds holding protons together are extraordinarily strong (they are held together by strong force interactions between their constituent quarks).
- tragomaskhalos 4y agoOnly recently learned about the radioactivity of bananas - in a GCSE physics past paper I was helping my son with the other day, one of the questions concerned using the Banana Equivalent Dose (https://en.wikipedia.org/wiki/Banana_equivalent_dose https://en.wikipedia.org/wiki/Banana_equivalent_dose) as a whimsical but more human-meaningful unit of (ionizing) radiation exposure.
- yourapostasy 4y agoRelated: upcycling an expired smoke detector's ionisation chamber into a Quantum Random Number Generator [1]. I don't see a schematic unfortunately. Make sure to read the comments section about using single versus pairs of decay events in the thread that Don Froula started. I fantasize about collecting all the ionisation chambers being tossed in my city and first rigging up a massive Redundant Array of Inexpensive RNG's out of them, then upcycling them into home-based RNG appliances to sell to people to plug in that hand out hotbits over the wire, public and private WiFi and Bluetooth to create a mesh of hotbits anywhere you walk around to grab through a protocol that mixes hotbits from these appliances and public RAIR's. Then we could be awash in randomness data to use anytime we wanted, from a highly-distributed mesh. [1] https://hackaday.io/project/180445-qrng https://hackaday.io/project/180445-qrng
- eternityforest 4y agoKind of like a distributed league of entropy? Seems a bit impractical and overkill, but also extremely awesome. Maybe we could somehow get a Bluetooth broadcast data manufacturer code reserved for just spewing randomness. Not at all secure, but if you mix it with a good mixer it can't hurt, and it can't be hacked by anyone out of state, or out of the 800ft range if they lack a giant antenna. Maybe a really simple network random protocol could be defined. Just a UDP packet where you send N bytes of entropy, the receiver mixes it in their state, and sends you back N bytes. Randomly once every 60 minutes you multicast 32 bytes. I'd prefer as few americium sources around as absolutely needed for fire safety though, but maybe it's better than where they normally go(The trash, I'd imagine, whether or not that's legal). Maybe half silvered mirrors and avalanche diodes? Raw unprocessed live quantum bits as a service are pretty cool for non-security related things too.
- magnat 4y agoThe whole contraption should be shielded from the environment, otherwise its output could be easily influenced by an outside adversary pointing X-ray gun at it.
- whispering 4y agoDidn't we agree on the fact that if an attacker gains physical access the security is already compromised? Otherwise you could just inject whatever you want from the uart, no need for any x-ray gun.
- magicalhippo 4y agoWithout shielding you don't need physical access, just physical proximity.
- whispering 4y agoFair point. However I don't think you'd be able to easily manipulate the random stream. By triggering the random tube you just generate a random number, but even by triggering it continuously you cannot directly manipulate the bytes. The counter is not reset after every event. Moreover: the timer/counter is clocked at 20M, for a 16 bit timer it overflows every 3ms. The tube is inhibited for a similar amount of time by a monostable 555. And this inhibit time is controlled by an RC network that is separated from the timer/counter crystal. So even noise and fluctuation on this two clock sources generate some randomness. I'm not saying that it is impossible to manipulate, I'm saying congrats if you figure out a way.
- magicalhippo 4y agoA Geiger-Müller tube has a dead-time after a detection event where it won't register a new event. Thus it's possible to saturate the tube. This would drastically reduce the entropy it generates, from what I can gather.
- 4y ago
- DonHopkins 4y agoWho would have ever thought the Atheist's Nightmare would have so many other uses? https://www.youtube.com/watch?v=Y4yBvvGi_2A https://www.youtube.com/watch?v=Y4yBvvGi_2A
- nathias 4y agoCould we also make a true random from bananas by just extrapolating the coloration patterns and distribution from a picture? It isn't quantum based randomness, but its either a good source of randomness or we find some weird patterns in banana riping process, so a win win ...
- tracnar 4y agoThat's what I expected from the title, use properties of the banana to extract 'random numbers', and provide new bananas to get a pool.
- xor99 4y agoI would recommend looking at David Johnston's book "Random Number Generators, Principles and Practices" to get a handle on how complicated evaluating RNGs properly is. Radioactive sources combined with conventional circuits/electronics are too slow for practical applications afaik (e.g. incredibly time consuming to prove the performance but not bad in principle). However, I love the banana idea for its inventiveness.
- rbanffy 4y ago> Radioactive sources combined with conventional circuits/electronics are too slow That’s the case with bananas, but would a lump of weapons-grade uranium provide enough randomness to be useful?
- atoav 4y agoFor broadband white-noise I really like to utilize the avalanche breakdown noise which you can get from reverse biased zener diodes. I didn't use it for TRNG but for measurement and it really gives you a nice straight noise spectrum from 10Hz to above 100kHz. Things that could be relevant for TRNGs: http://www.reallyreallyrandom.com/zener/why-its-random/ http://www.reallyreallyrandom.com/zener/why-its-random/
- deleted 4y ago[deleted]
- whispering 4y agoDefinitely a slow method! It outputs about 1 byte every second. Not great performance! This 22KB sample took several hours to collect: https://github.com/valerionew/Banana-Random-Number-Generator/blob/master/src/test/sample.bin https://github.com/valerionew/Banana-Random-Number-Generator...
- HelloNurse 4y agoWouldn't it be possible to build large detectors of reasonable cost and power consumption? For example, instead of a small tube like in the article, flat metal plates or arrays of long wires in a thin rectangular chamber.
- devoutsalsa 4y agoI tried seeding a random number generator with a banana, but the banana was seedless.
- kzrdude 4y agoBananas are as far from random as possible already: they are all clones! (The widely available Cavendish banana)
- yarg 4y agoAnd each an every plant susceptible to the same strain of the same disease: https://en.wikipedia.org/wiki/Panama_disease https://en.wikipedia.org/wiki/Panama_disease.
- Blikkentrekker 4y agoWhat are the cryptographic and other such applications today for which `/dev/urandom` is not good enough and atomic decay randomness as a source is required opposed to thermal noise?
- SAI_Peregrinus 4y agoNone. There's no evidence that radioactive decay or other quantum processes are any more random than deterministic chaotic processes like thermal noise.
- whispering 4y agoAbsolutely 100% no advantage whatsoever. Absolutely 100% more fun.
- mdavis6890 4y agoI don't agree that uniform distribution is required for randomness.
- whispering 4y agoMe neither, and I'm the author. But whatever.
- mdavis6890 4y agoWell that's interesting. Thanks for responding to my post. If you agree with me, why did you name uniform distribution as requirement number 1? Is that just part of the "official" academic definition or something?
- whispering 4y agoI am not able to motivate further, it's just that usually when we talk about random numbers we mean uniformly distributed random numbers. It is not a requirement in a strict sense. It's just the easier way to tell about randomness. We all have an intuitive understanding of rolling a dice or flipping a coin.
- rbanffy 4y agoAs a fun example, I used to run load tests for several systems using random numbers distributed under a power law.
- dataangel 4y agoPet peeve: contrary to popular belief bananas are not actually a high potassium food. They are not even in the top 10! Leafy greens contain way more potassium than bananas do: https://www.sharp.com/health-news/where-to-find-potassium-other-than-bananas.cfm https://www.sharp.com/health-news/where-to-find-potassium-ot...
- jorgen123 4y agoBut this is measured by cup for many of the items on the list. E.g. Avocado is #3 but I would not eat a cup of Avocado per day. I do eat a banana most days. And I eat half an avocado, which weighs in the order of a 10th of the weight listed for a cup.
- motohagiography 4y agoTo borrow an adage, the random numbers decide nothing, it is who counts and samples the entropy that decides everything.
- amelius 4y agoAn alternative approach would be: 1. put a banana on a dish 2. wait for fruit flies 3. point camera on the banana 4. take images 5. compute SHA256 checksum 6. use checksum as the random number