Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Encryption Math Security

When Is It Random Enough? 153

TheCamper asks: "The generation of random numbers is very important in many areas, especially encryption. Pseudo Random numbers created by software is simply not good enough. Many key generation applications ask the user to move the mouse or bang on the keyboard to add to the randomness. You can also purchase a (very expensive) hardware random number generator to make truly random numbers. Wanting the randomness of a hardware random number generator without wanting to pay for or build my own, I was wondering if crinkling cellophane (or the like) into my computer's microphone would be considered random enough for serious encryption key generation." What entropy sources would you use for the generation of strong encryption keys?
This discussion has been archived. No new comments can be posted.

When Is It Random Enough?

Comments Filter:
  • OK. (Score:2, Interesting)

    by CommanderNacho ( 887836 ) on Saturday May 28, 2005 @06:35PM (#12666393)
    How about something like motherboard sensor readings?
  • What's so expensive? (Score:3, Interesting)

    by sakusha ( 441986 ) on Saturday May 28, 2005 @07:06PM (#12666548)
    I don't understand why people think it's so expensive to make a circuit that produces truly random numbers. Radioactive decay is the absolute gold standard of randomness. I remember seeing a project in someplace like Ciarcia's Circuit Cellar that showed how to use a small radioactive source as a randomness generator, IIRC the total cost was about $25. You can buy commercial radioactive random generators for about $150, for example the RM-60 from:
    http://www.aw-el.com/ [aw-el.com]
    If any hardware manufacturer wanted to incorporate this sort of feature into a chip, it would probably cost about $5 in mass quantities. But the general PC market hasn't demanded this level of true randomness.
  • Why not hardware (Score:3, Interesting)

    by delirium of disorder ( 701392 ) on Saturday May 28, 2005 @07:31PM (#12666680) Homepage Journal
    If you want to go through the effort to get good randomness, why not use a method that is fairly simple and proven secure under some testing? This looks like an easy apparatus to make that also could be pretty secure.
    http://www.willware.net:8080/hw-rng.html/ [willware.net]
    There are schematics for lots of other HRNGs on the web.

    On the other hand, your choice of a random data source might not matter much at all. Although I'm sure none of this is proven in the formal sense of the word, I strongly suspect that any source of entropy that has some original indeturminability (due to true randomness in the physical world*, complexity of the data's origin, or lack of a human means to measure the source of the data's origin**) is as good a source as any other. Computers can extract entropy from a mix of ordered and disordered data. The data compression WinZIP and bzip2 do is a good example of this. Therefore, I suspect that the security of an RNG rests less or the inherent entropy of the source then on the quality of the algorithm used to amass usable random numbers from the source data.
    *if that exists at all
    **think Heisenberg uncertainty principle

  • LavaRnd (Score:3, Interesting)

    by kinema ( 630983 ) on Saturday May 28, 2005 @08:32PM (#12667013)
    If you need entropy on the cheap check out LavaRnd [lavarnd.org]. LavaRnd uses a low cost off the shelf "webcam" with it's lens cap in place as a random number generator.
  • Re:White Noise? (Score:3, Interesting)

    by X0563511 ( 793323 ) * on Saturday May 28, 2005 @08:47PM (#12667083) Homepage Journal
    How about randomly sorted slices of randomly-chosen radio frequencies? I was under the impression that was the kind of thing the NSA uses.

    You could then take the sliced-and-diced random radio noise and apply some kind of simple encryption to it with user entropy and use the result as the random data. That would be pretty random.
  • by rjh ( 40933 ) <rjh@sixdemonbag.org> on Saturday May 28, 2005 @08:58PM (#12667147)
    /dev/random only has a finite number of bits. It harvests believed-random data from events on the PC. When you exhaust /dev/random, you're out of random data until you get more system events. This is potentially a Really Bad Idea if there are other apps on your machine which also need extremely high-quality believed-random numbers.
  • by cryptor3 ( 572787 ) on Sunday May 29, 2005 @04:51AM (#12668786) Journal
    One (semi) interesting talk I went to recently brought up the point the scheme described isn't random if the coin is biased.

    And this is a reasonable possibility, because you don't know if the coin weighs exactly the same on both sides, or maybe you're really good at flipping heads.

    In order to get unbiased results, there's a simple protocol that will guarantee a non-biased random result. Suppose the probability of heads is p. Then the probability of tails is (1-p).

    Flip the coin twice.
    a. If it comes up heads the 1st time and tails the 2nd, call it a 1.
    b. If it comes up tails the 1st time and heads the 2nd, call it a 0.
    c. If it comes up heads both times or tails both times, re-run the trial until you get one of the first two.

    If the coin flips are assumed to be independent, then the probability of events a and b are p*(1-p) and (1-p)*p, which are equal.

    There are improvements on this scheme which output more random bits per trial (it reduces/removes the probability of the outcome c where your result is inconclusive).

Ya'll hear about the geometer who went to the beach to catch some rays and became a tangent ?

Working...