Slashdot Mirror


DIY Random Number Generator

Compu486 writes "The guys over at Inventgeek have come up with a project and how artical on building a random number generator that is less than 100.00 utilizing radioactive decay. Using some Linux based open source apps and with a little ingenuity and some parts you probably have laying around your house you can build your own."

56 of 227 comments (clear)

  1. Typos by fatwreckfan · · Score: 5, Interesting

    I think it should read:

    and how to article on...

    And I have to wonder...that is less than 100.00 what?

    1. Re:Typos by Funkcikle · · Score: 5, Funny

      The "article" was clearly written by a Random English Generator, powered by tritium and chapstick.

    2. Re:Typos by also-rr · · Score: 5, Funny

      And I have to wonder...that is less than 100.00 what?

      Fear not comrade, it's all part of the move to make Slashdot less US centric - this way, rather than just having foreigners confused about how much things cost, everyone gets to be confused about how much things cost.

    3. Re:Typos by dpninerSLASH · · Score: 5, Insightful

      I have to jump on the wagon here as well.

      How long would it really take to edit each post before submitting it for public consumption? Slashdot is now one arm of OSTG, and as such their content should be held to the same standards as any other "official" publication.

      And please, folks, don't take the easy way out with a generic "slashdot omelet" response: It's the varying points of view that make this site not interesting, not the various manglings of the English language.

      Truthfully.

    4. Re:Typos by azav · · Score: 2, Insightful

      Ya, I really wish we had a spelling checker for Slashdot and that the editors would actually spell check the articles they post.

      If you're going to attempt to be viewed as a professional, it helps to be able to pass 5th grade English.

      Cheers,

      --
      - Zav - Imagine a Beowulf cluster of insensitive clods...
    5. Re:Typos by GigsVT · · Score: 3, Funny

      This $?

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    6. Re:Typos by larry+bagina · · Score: 2, Informative
      In 1999, when Andover bought slashdot, they paid him a salary of $90,000 (with a 3-year employment contract). That doesn't include the $1.5 million paid for /. or the $3.5 million in stock grants.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

  2. I did this in highschool by Anonymous Coward · · Score: 3, Interesting

    I hooked up a geiger counter to an old school analog game port.

    I had a simple C program that just spun between 0 and 255, and when a signal came across the game port it would record the current number.

    run that through a hash function of your choice and it worked great.

    dont cpus today have some noise generators built into them though?

    1. Re:I did this in highschool by MustardMan · · Score: 3, Funny

      Yeah, but I bet you were capable of writing a comprehensible summary of the whole setup when you were in high school

    2. Re:I did this in highschool by MustardMan · · Score: 2, Interesting

      And if YOU knew a bit of just slightly more advanced physics, you'd realize that radiation obeys conservation of momentum, just like everything else. It's very very easy to demonstrate direct correlation between radiation spikes measured when the detectors are the same distance from a sample, but 180 degrees apart. I did this in a sophomore lab in college with some equipment that looked like it was older than I was.

    3. Re:I did this in highschool by Linker3000 · · Score: 2, Interesting

      The Commodore 64 had an analogue white noise generator in the SID ship and its value could be read via a port. Simple.

      --
      AT&ROFLMAO
    4. Re:I did this in highschool by russ1337 · · Score: 4, Funny

      Even more simple would be hash some posts here on /.

      There are some pretty fricken random posts.

    5. Re:I did this in highschool by VanessaE · · Score: 2, Interesting
      The "random" generator in the C64, at least the one you refer to, was an all-digital shift-and-drop-bits algorithm used by the SID chip's three noise generators, and is accessed by reading the "voice 3 oscillator" register while voice 3 is set to produce noise (the audio from this voice can be silenced if desired, without affecting the algorithm). The algorithm cycles periodically and, if memory serves, can be reset manually if desired. There is no analog component to the noise generator algorithm.


      A good way to get a nice random number is to take advantage of the inherent randomness of the user - initialize your noise generator to run continuously at a high iteration rate, wait for a keyboard, joystick, or mouse event, and then take as many samples from the noise generator as you need. The amount of time the noise generator was left actively running before the key/joy/mouse event will vary with the user's attention and reaction time, and will essentially randomize the values you get.

  3. Editors? by AntsInMyPants · · Score: 5, Interesting

    I know the English may not be the submitter's first language, but it would be nice if the editors....um, you know....*edited* the piece so it made sense.

    Michael (Who now sits back and waits for people to pounce on my spelling/grammatical mistakes)

    1. Re:Editors? by WilliamSChips · · Score: 4, Funny

      "I know the English"--WRONG.
      "I know that English"--RIGHT.
      Hey, you asked for it!

      --
      Please, for the good of Humanity, vote Obama.
  4. More difficult Rnd() generator by LiquidCoooled · · Score: 5, Funny

    I once collected loads of old broken smoke detectors and ripped out the small cell of americium from each of them.
    I placed them into a big ball wrapped in tinfoil (shiney side in), then used my fathers' geiger counter to supply random numbers.

    Its been working well, I've been counting the number of years its been running on my fingers, so far I've got to 13.

    *note, this is totally false, but there was some stupid kid who did something similar.

    --
    liqbase :: faster than paper
    1. Re:More difficult Rnd() generator by Anthem.uxp · · Score: 5, Interesting
    2. Re:More difficult Rnd() generator by ChairmanMeow · · Score: 2, Informative

      You've got 13 fingers now?! For Christs's sake, throw that thing away. It's not safe!

      Perhaps he's counting in binary on his fingers, in which case he only needs one hand.

      --
  5. Old-school by amliebsch · · Score: 5, Funny

    Whatever happened to just mashing your fists on the keyboard?

    --
    If you don't know where you are going, you will wind up somewhere else.
    1. Re:Old-school by Quila · · Score: 2, Insightful

      Not very random, as your fists may tend to fall in certain places when statistically analyzed.

    2. Re:Old-school by Atzanteol · · Score: 2, Funny

      I think that's what the submitter did while summarizing the article...

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    3. Re:Old-school by antifoidulus · · Score: 2, Funny

      What if you pound your head on the keyboard instead? Or, *shudder* your butt?

    4. Re:Old-school by Jerf · · Score: 4, Informative

      Yes, but the programs that use this don't use just the key distribution. First, they also use the time the keystrokes occur, which is reasonably random.

      Second, you can measure "how random" something is (for suitable definitions of "random") by measuring its "entropy", which is a measure of how many "random" bits is in a given input. The entropy of English text is 1.1 to 1.6 bits per character, which means to safely obtain a 128 bit key from a bit of English text you need almost as many characters as you want bits. "Smashing on the keyboard's" randomness will probably vary even more, from perhaps as low as ~.5 if you smash poorly to 2.5-3 if you smash "randomly", but you also get the entropy from the timing information, which if you use a very-high-resolution clock contributes several bits itself.

      So, basically, this "statistical analysis" problem is extremely well known, and very well quantified, down to the fractional number of bits of randomness that you can extract from a bit of text. Since these fractional bits can just be added together (four "English text characters" at 1.5 bits apiece gives you 6 strongly-"random" bits), the solution turns out to be very simple: Smash on the keyboard longer, until you've got at least as much entropy as you have bits. Voila, a strongly-random key suitable for almost all purposes. (It probably is suitable for all purposes, but taking a key from radioactive decay has the advantage of letting you know the key is random, whereas with this technique you can only be "very, very, very sure".)

      Handled properly, it's not a problem.

      Many, if not most, modern systems will also maintain an "entropy pool" at the OS level, which uses interrupt timings and other such events to feed the pool, which can then be drawn on by programs in lieu of reading the keyboard directly. This works nicely, and among the inputs used is keyboard and mouse events.

      The nice thing about the entropy pool is the input can really come from anywhere. It doesn't have to be totally random to contribute, it just can't be totally predictable.

  6. Not as geek but safer by click2005 · · Score: 5, Informative

    This project seems to work well... http://www.lavarnd.org/

    --
    I am a free slashdotter. I will not be modded, blogged, DRM'd, patented, podcasted or RFID'd. My life is my own.
  7. Here's the money graph by patio11 · · Score: 5, Informative

    >>
      One of the applications I have envisioned for this project is a cheap and easy genuine random number generator. True random numbers in computing are nearly impossible, and successful solutions are very expensive systems based on radioactive decay or atmospheric measurements, for example. Using a small / relatively safe radioactive source and a high res CCD or CMOS sensor and assigning a value to each pixel and perhaps mixing in an algorithm or two with an inexpensive practical PCI card that is capable of generating genuine random numbers. Applications that could greatly benefit from this would be encryption, security applications, Computer AI and the Gambling establishment to name a few.
    >>

    Actually, no, none of these really benefit from "truly random numbers". The applicability of randomness to AI is... spurious at best? For gambling, you just have to be reasonably sure that someone can't predict in advance what your random sequence is going to be, and the Mersenne Twister plus any unknown piece of data as a seed is good enough at resisting everything our current understanding of mathematics can throw at it. (Yes, thats security through obscurity... in the same way that hiding your server behind locked doors, a firewall, and a secure password is security through obscurity. Its both necessary and sufficient.)

    Encryption, similarly, would not benefit from transitioning from an "almost perfect" pseudo-random generator to a "perfect" random generator. For your security to fall based on random numbers, someone needs to be able to not just come up with a theoretical imperfection (ahah, 200 million runs of this random number generator and you'll notice it slightly skews away from these five integers!) but have to crack it wide open. Yay, yawn.

    Now, radiation + poorly understood mathematics = geek high, I know. But in terms of practical application this gets a near zero.

  8. Clarification regarding Twister by patio11 · · Score: 5, Informative

    P.S. Clarification: if you're using the Mersenne Twister in a *real life* application that plus a seed value is good enough for a gambling application. For example, if you're generating nice big integers and then taking %6 to get the value of a die or using them to shuffle one or ten or a hundred decks of cards. If, on the other hand, you have some contrived game where you are passing the output directly to the player and continue in the same sequence for a rather improbably long time a player could figure out what sequence the Twister was on and then successfully predict all numbers in advance. But this is one of those earn-you-bonus-points-with-your-CS-professor-and-n ever-use-again pieces of trivia, because in the real world you have to basically design the system to fail for it to fail in this manner.

  9. apparently by frieko · · Score: 2, Insightful

    IIRC Random.org just uses a soundcard and a radio tuned in between channels and collects atmospheric noise. Sounds much simpler/safer.

  10. Pretty cool, but by vadim_t · · Score: 3, Insightful

    For a practical solution, I'd just get a VIA Nehemiah CPU. The later ones have an embedded RNG, and do AES at truly amazing speeds. The actual CPU performance is quite bad compared to pretty much anything else, but it makes a nice quiet box if you don't need vast amounts of CPU power.

    And besides, why the emphasis on shielding the camera? You'd think that for a RNG interference is good as it adds more randomness.

  11. units by Digitus1337 · · Score: 5, Funny

    Less than 100.00! I've waited at least the past 8 for something like this!

  12. I seem to remember by npcompleat · · Score: 5, Interesting

    There was a study done that asked a group of people to come up with a string of random ones and zeros. Unsurprisingly, after statistical analysis, they weren't very good. But the fantastic bit was to ask another group to pair off and for each of them to try to outguess the other: let your opponent see your string of ones and zeros so far and then try to make the next bit the opposite to the one they are likely to pick. Amazingly, these random strings were impressively more random. Perhaps we've evolved special pseudo-random number generators to allow us to be sneaky.

    [I know, a reference would have been nice, but age does terrible things to your internal bibtex database]

    1. Re:I seem to remember by gardyloo · · Score: 3, Informative

      This was referenced in the book Complexity by Waldorf. At least in that context, it was about a competition among computer programs and genetic algorithms. It may also have shown up in Hofstadter's Fluid Concepts and Creative Analogies. Of course, it may have been done far earlier than the mid-80's, but those are the two books I'd look at first.

  13. cheap alternatives by flok · · Score: 3, Informative

    If you find building something yourself to much of a hassle and you have either a webcam or a soundcard lying around, you could give audio-entropyd or video-entropyd a try.

    --

    www.vanheusden.com - home of Multitail, HTTPing, CoffeeSaint, EntropyBroker, rsstail, bsod, listener, nagcon, nagi
  14. Another approach by FlyByPC · · Score: 2, Interesting

    John Walker, of Autodesk fame, did a similar project, although with a simpler count-the-clicks approach. I copied it using an off-the-shelf Geiger counter and a piece of Autunite; it works well.

    --
    Paleotechnologist and connoisseur of pretty shiny things.
  15. No analysis? by rotenberry · · Score: 3, Informative

    This is a well done hardware project, but there was no analysis demonstrating that he could generate random numbers using this hardware.

    For example, see

    http://en.wikipedia.org/wiki/Pseudorandom_number_g enerator

    http://www.phy.duke.edu/~rgb/General/rand_rate.php

    http://www.findarticles.com/p/articles/mi_qa3742/i s_200201/ai_n9046353

  16. Typically silly by m.dillon · · Score: 2, Interesting

    Randomness exists in nature all over the place. In fact, in every single atom, simply because we are not living in a world that is anywhere near a temperature of absolute zero. A johnson noise generator costs a few cents. In analog electronics, keeping randomness *OUT* is actually the harder problem.

    Frankly, you don't need all that much true randomness to generate random numbers. You just need to be able to continuously seed a CSPNG from a random source, and not even at a very high rate. A few bits a second is plenty.

    Move along,

    -Matt

    1. Re:Typically silly by bitrex · · Score: 2, Informative

      For anyone interested in doing some experimenting, an NPN transistor connected to a power-supply through a large resistor, with its emitter and base connected to ground makes a great johnston noise source. Take the ouptput from the collector, amplify with an op amp and low-pass filter it, and feed it to an A/D converter and you've got a good starting point for experimentation.

  17. We use /dev/urandom by the_duke_of_hazzard · · Score: 3, Interesting

    It's good enough to have been passed by all the regulators and is used by our online gaming systems.

  18. Don't try this at home, folks! by iansmith · · Score: 4, Informative

    A few things of note about dealing with smoke detector sources.

    First, removing the source from a smoke detector is illegal in the US. I'm not aware of anyone being put in jail for doing it, but with the state of affairs currently I would not go posting the fact that you did it all over the internet.

    Second, those sources can be very dangerous if mishandled. The source is coated in a THIN layer of gold and/or silver.. only a few atoms thick. If you touch it with anything you will break the seal and contaminate the object. If you then happen to touch it, you have a good chance of ingesting or inhaling it. This is bad. Am-231 is what is called a bone-seeker. It will be used in new bone growth and eventually kill you by causing bone tumors and other cancers.

    Now with a little care you can be pretty safe, but the article in question should have been a little more explict about the dangers involved here.

    1. Re:Don't try this at home, folks! by iansmith · · Score: 2, Informative

      Yes, that was David Hahn who used quite a bit of social engineering to get information and equipment to build his own little breeder reactor in his mothers garden shed. A very interesting story. Lots of writeups all over the web.

    2. Re:Don't try this at home, folks! by hr+raattgift · · Score: 3, Informative

      On the contrary, he had assembled the pieces of a small and subcritical but reasonably efficient 232Th-fuel-cycle reactor that was happily, if slowly, breeding 233U.

      With some attention to geometry, which is suggested by his parcelling of ash, his 232Th had a reasonable probability of capturing slow neutrons from his small emitter, becoming 233Th, which quickly beta decays into 233Pa which in some days beta decays into 233U . His neutron spectrum was sufficiently fast that more 233U fission than actinide production is plausible. Apart from the low neutron flux of his initiating neutron source, nowhere near enough neutrons are produced in this Thorium cycle to maintain a fast neutron chain reaction, so his reactor would have remained subcritical while still breeding 233U.

      His apparatus was not particularly conventional, but was clearly a breeder reactor, in the form: Th-232+n -> Th-233 (22 m) -> Pa-233 (27 d) -> U-233 (1.6*10^5 a).

      Incidentally, breeding 233U from 232Th is the long term strategy for India, and some small experimental piles there (and in the West in the 50s and 60s) may have looked much like Hahn's description of his own.

      What he might have done next is anybody's guess, but he may have made some gains making a powdered mixture of his 9Be with his 241Am or his 226Ra as is done in some conventional neutron generators.

      He was clearly pretty bright (no pun intended), and good at learning and improvising as he went along.

      Unfortunately for him, Uranium in general is chemically hazardous, and he is also likely to have been accumulating some 232U which has many alpha and gamma emitters in its decay chain. These were obvious and dangerous environmental hazards (not just to him), not least of which is the reactivity surge from 233U production after shutting down and dismantling his reactor, thanks to the relatively long half-life of 233Pa.

  19. Give Him a Break by justinchudgar · · Score: 2, Insightful

    From the article, it seems that he was creating something to satisfy his personal curiosity. He put together a good simple plan and actually made it work. That is interesting, fun, and admirable. I did not get the feeling that he set out to save the world from pseudo-randomness; as many have noted, it does not need saving. If he made some over-enthusiastic claims about the utility of his creation, who cares, he made it and it works; and, that is cool. Now, if next week, he starts hawking them at $250.00 each for the Ultimate Internet Privacy Shield, then give him hell. :)

    --
    WARNING: Smoking this sig may cause lowered IQ, insanity or short term memory loss. It is also really bad for your monit
  20. Radiation/Science/Geek combo by ElephanTS · · Score: 2, Funny

    There seems to some possiblity for the creation of a superhero here. Wonder what his ability would be?

    --
    spoonerize "magic trackpad"
  21. Nitpicking correction by Anonymous Coward · · Score: 2, Informative

    Am-231 is what is called a bone-seeker

    The isotope used in smoke detectors is Am-241, not Am-231. Am-231 is too unstable to be listed in standard isotope tables.

    Of course, all isotopes of Americium are bone-seekers, so your point remains valid, though I find it a bit nannying. The quantity of Am-241 in a smoke detector is really minute.

  22. Re:Wrong. Encryption is a valid application. by kestasjk · · Score: 2, Insightful
    1) The problem with one time pads isn't generating random text to XOR with, it's getting that text from A to B without relying on weaker crypto.

    2) Pseudo-random number generators (with a sufficiently random seed) aren't good enough? Then maybe you'll be able to tell me what comes next after this base64 encoded output of the /dev/urandom implementation on FreeBSD:
    QPoiNHKXSHYGks3IreT4sGsZgnBTdLEt6OknLOoePAmAjNof yJtbv7Jgl0KOdIqjmUwXiBzOWGaT HCJZaPGdcyVKtQk6nRGej5explzMc/GDNk1AnyDdtPP+talfMT lMjI7AThTRprNdzphOcAbwY18l r0MUKM9Y/pEbR2N1/bKd12VTc+xzNzvRB/9q4QMaDYvyzWYfkx 0UGUkxCCBWYOokUOXtFWoHI+Ki
    No, the grandparent is right. By avoiding our excellent pseudo-random number generators and going with this hacked together entropy generator you're more likely to decrease your security because of flaws in the hardware than gain a practical increase in security.
    --
    // MD_Update(&m,buf,j);
  23. Re:Why not using a live webcam? by amliebsch · · Score: 4, Informative

    This has actually been done, using the fluctuations of lava lamps as a photon seed. http://www.lavarnd.org/

    --
    If you don't know where you are going, you will wind up somewhere else.
  24. don't need radiation by roman_mir · · Score: 2, Insightful

    You don't need radiation to make a randomizer from a camera. How about pointing the camera out of a window at a road. The cars, the people and other objects (birds) will move around supplying you with random data. Or you could have a transparent plastic box full of mosquitos or flies and point the camera at that ;)

    How about using a soundcard and ambient noise? Or you could use an AM radio receiver for static noise. There are plenty of other sources of randomness.

  25. True random number from random.org by objekt · · Score: 2, Informative
    --
    -- Boycott Shell
  26. The internal version is a bad idea by chriso11 · · Score: 2, Insightful

    I don't recommend the internal PCI version - you shouldn't place a gamma emmitter (yes, for the pedantic, Am241 is PRIMARILY an alpha emmitter) inside your case. You will be increasing the odds of a memory bit flip or such.

    --
    No, I don't trust in god. He'll have to pay up front, like everybody else.
  27. You did, as well. by Elemenope · · Score: 3, Informative

    If you parse the original sentence, it is still technically correct (if a little odd); we often do not use the definite article 'the' to describe something like a language, but it is implicit, especially when making normative standards, that there is a definite object to compare. 'The English' refers to an objective standard; whether such an object even exists is another matter not even vaguely related to the question at hand, and irrelevant, since properly constructed statements may refer to virtual or non-sensical subject matter and still be syntactically well-formed. Interestingly, the difference between "the" and "that", while substantially changing the structure of the sentence, does not much change its content; it basically means the same thing!

    --
    All the techniques ever used to make men moral have been themselves thoroughly immoral... (Nietzsche)
  28. Wet Hot American Summer by blake213 · · Score: 2, Funny

    No dungeon master worth his weight in geldings goes anywhere without his... twenty-sided die!

    --
    mund freud.
  29. Re:Is radioactive decay really random? by ArbitraryConstant · · Score: 2, Informative
    For the better part of a century, radioactive decay is what scientists always use when they want to invoke a natural process that is "random." But is radioactive decay really random... that is, are there, say, well-established quantum-mechanical equations that predict this?
    The decay of an atom is a fundementally probability-driven process. You can predict the half-life of a material on a large scale, but it is impossible to predict the decay of an individual atom. And, every signal received by your detector comes from an individual atom decaying, so it's impossible for someone to predict or duplicate.

    A chaotic system would be something where the difficulty in predicting it comes from the complexity of the system, and the ability of small changes to significantly influence the outcome. Radioactive decay doesn't work like that. There's simply a particular event that either happens or doesn't.
    --
    I rarely criticize things I don't care about.
  30. Come on, it's Taco by blueZ3 · · Score: 4, Insightful

    Notorious throughout the slashdot community for malapropisms and misspellings.

    Funny thing is, I read an interview with Rob where he said he's currently using a Mac. As far as I know, all recent Macs have the option of turning on spell checking across the OS -- so for instance, typing this on my Powerbook I see red underlines under misspelled words in the "Comment" text box on the submission page. Which means that he's either too lazy to turn this feature on -- or worse, too lazy to try and correct misspellings and typos that are already clearly marked.

    --
    Interested in a Flash-based MAME front end? Visit mame.danzbb.com
  31. A simple 1/ megabit/sec generator for cryptography by smilindog2000 · · Score: 5, Interesting

    I put together a simple random number generator in the late '90s using avalanche noise from the reverse break-down of a cheap transistor's emitter/base junction. I amplified it with a simple supply noise insensitive 4-transistor amplifier, and pushed it through an 8-bit 40 megabit/sec Analog Devices A/D converter. I xor-ed 80 samples together, while rotating bits in between samples. I used a $3 Lattice PLD to interface the board to an old PCs ISA bus.

    I generated a CD full of random data, which anyone is willing to have if they want it. I've tested it against the "Die Hard" tests, and almost all the 10-meg files pass. There is one test that failed now and then, so I contacted the statistics professor who wrote it. I showed him that his own random number generator, thought to be nearly foolproof, failed the same test with the same probability. It seems I found a bug in his program!

    Total cost for components is $10. Anyone who is interested can have schematics for free. Contact me at bill@billrocks.org.

    The theory behind it is simple... who cares if the bits from the source are completely random? It turns out you just need a LITTLE true randomness from the source. By xoring bits together that have some randomness, you quickly approach truly random. By my estimate, only God would ever know the difference for the data I generated from perfectly random data, since the board could generate data for billions of years before accumulating even one bit of non-random data in it's output.

    Mathematical proof:

    Two semi-random bits b1 and b2 each contain small amounts of
    non-random noise which we can call d1 and d2. Note that d1 and d2 can
    be correlated, and usually are. The notation P(expression) means the
    probability that the expression will be 1.

    I define P(b1) and P(b2) as:

    P(b1) = 0.5 + d1
    P(b2) = 0.5 + d2

    Both d1 and d2 have a range of -0.5 to 0.5. Xoring b1 and b2 together gives:

    P(b1 ^ b2) = P(b1 & !b2) + P(!b1 & b2) = P(b1)*P(!b2) + P(!b1)*P(b2)
    = (0.5 + d1)*(0.5 - d2) + (0.5 - d1)*(0.5 + d2)
    = 0.25 - 0.5*d2 + 0.5*d1 - d1*d2 + 0.25 + 0.5*d2 - 0.5*d1 - d1*d2
    = 0.5 - 2*d1*d2

    Squaring a small number makes it very small indeed. If d1 and d2 are
    already 0.01, then xoring b1 and b2 together results in a random bit
    noise level 0.0002. This leads to the following equation for the
    amount of non-random noise defined as n(bits) given the number of bits
    in the xor sum:

    n(1) = d
    n(2) = 2*n(1)^2 = 2*d^2
    n(4) = 2*n(2)^2 = 2*(2*d^2)^2 = 2^3*d^4
    n(8) = 2*n(4)^2 = 2*(2^3*d^4)^2 = 2^7*d^8 ...
    n(i) = 2^(i-1)*d^i = .5*2^i*d^i = .5*(2*d)^i

    Here's how you can use this equation. Lets say you believe you have
    non-random noise levels of no more than d. You want the noise level
    to be less than N. We want to compute the number of bits needed, i:

    N = n(i) = .5*(2*d)^i
    2*N = (2*d)^i
    log(2*N) = i*log(2*d)
    i = log(2*N)/log(2*d)

    So, for example, if you feel your non-randomness per bit is less than 10%,
    but you need less than 1 part per billion, we compute the number of bits
    needed in the xor-sum:

    i = log(2*10^-9)/log(2*.1) = 12.5

    In other words, just xor together at least 13 bits.

    --
    Beer is proof that God loves us, and wants us to be happy.
  32. Re:Coincidence photons are from positron decay... by MustardMan · · Score: 2, Funny

    You're half right... the experiment in question was indeed positron decay... BUT it was completely a result of momentum conservation. There is no particle left behind so the momentum has to be carried away in a pair of photons, and not a single one.

    You're also right that this doesn't apply to aplha decay, because momentum is conserved via the slight recoil in the nucleus - that was a brain fart on my part remembering which type of radiation we're dealing with here.

    What you are COMPLETELY FUCKING WRONG about, though, is photons having no momentum. If you had ever studied special relativity, you would know that it's possible to have momentum without mass, and the momentum of a photon is defined as P=E/c, or h*v/c.

    Perhaps before you sit here calling me a twit, you should spend half a second googling for the word "photon", fuckwad.

  33. Silly... by rthille · · Score: 2, Funny


    I just use a female-mood-detector. That's _my_ source of high-grade randomness.

    --
    Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
  34. Re:A simple 1/ megabit/sec generator for cryptogra by strikethree · · Score: 3, Funny

    I generated a CD full of random data, which anyone is willing to have if they want it.

    640 megabytes is a little much for my connection to handle right now. Could you compress it and send it to me please? :P

    strike

    --
    "Someone needs to talk to the tree of liberty about its ghoulish drinking problem." by ohnocitizen