Slashdot Mirror


Entropy Problems For Linux In the Cloud

CalTrumpet writes "Our research group recently spoke at Black Hat USA on the topic of cloud computing security. One of the interesting outcomes of our research was the discovery that the combination of virtualization technologies and public system images results in a problem for random number generation on guest operating systems. This is especially true for Linux, since its PRNG uses only a small set of entropy-gathering events, and virtual Linux images often generate SSH host keys within seconds of their initial boot. The slides are available; the PRNG vulnerability material begins at slide 63."

179 comments

  1. Another advantage for TPM chips... by Anonymous Coward · · Score: 4, Informative

    TPM chips have their bad things, but one thing they do offer is a cryptographically secure RNG. Its completely understandable not to trust it 100% completely, but you can use the random number stream it puts out as a good addition to the /dev/random number pool.

    1. Re:Another advantage for TPM chips... by iYk6 · · Score: 4, Insightful

      Or you could plug in a microphone.

    2. Re:Another advantage for TPM chips... by Brian+Gordon · · Score: 1

      TPM chips have their bad things

      They do? It's secure crypto hardware.. what's evil about that? Yes you have scary evil like Palladium but you don't have to install it if you don't want to. And if machines take control you can always disable the device from the BIOS.. (given you don't care about any data which has encryption keys stored only in the module)

    3. Re:Another advantage for TPM chips... by NotQuiteReal · · Score: 1

      or just write a script to check my favorite stock values... pretty random, as far as I can tell. But trending down :-(

      --
      This issue is a bit more complicated than you think.
    4. Re:Another advantage for TPM chips... by Isao · · Score: 1

      TPM doesn't buy you anything in a VM - the virtualized environment has to trust the host that it's getting the correct certificates and data. The VM doesn't have direct access to the TPM, and the TPM won't export private keys. Also, that's only one set of keys per TPM, so multiple/portable VMs aren't realistic. I'm in favor of the tools TPM offers users (vice content producers) but I don't believe this is a good fit.

    5. Re:Another advantage for TPM chips... by Anonymous Coward · · Score: 0

      They do? It's secure crypto hardware.. what's evil about that?

      The evil is presumably that it can't be verified. How do you verify the output of a hardware random number generator to determine if it really is random?

    6. Re:Another advantage for TPM chips... by wizzat · · Score: 1

      Seems like you would test it the same way you would test a RNG algorithm, if you suspected it wasn't random.

    7. Re:Another advantage for TPM chips... by xZgf6xHx2uhoAj9D · · Score: 1

      Black box testing isn't all that productive for RNGs. You can check distribution and very simple patterns, but beyond that it's a major headache. White box testing makes things much easier. Yay source code!

    8. Re:Another advantage for TPM chips... by Tubal-Cain · · Score: 1

      All my favorite stock values are ones with a lot of zeros after it. Too bad none of my stocks are at those values.

    9. Re:Another advantage for TPM chips... by tagno25 · · Score: 1

      or a camera looking at the clouds

    10. Re:Another advantage for TPM chips... by Anonymous Coward · · Score: 0

      I am definitely for TPM chips and trusted hardware, but there is are valid concerns. There is a worry that if TPM chips become standard on machines, they would be used for a hardware DRM "stack", making PCs into closed machines just like consoles.

      Once most PCs shipped with these, game companies would demand they be turned on and their software take ownership of the TPM as an "anti-piracy" measure.

    11. Re:Another advantage for TPM chips... by profplump · · Score: 3, Informative

      Most of the RNG chips publish pretty good specifications on the design of their entropy source, the amount of real entropy it provides, and the circumstances in which that entropy level might be reduced. There could be implementation or production errors or course, just like there could be runtime or compiler errors with software, but the design is available for perusal and has been analyzed.

      For example, the Intel 82802:
      http://www.cryptography.com/resources/whitepapers/IntelRNG.pdf

    12. Re:Another advantage for TPM chips... by profplump · · Score: 1

      Unless you wanted all of the servers (and all of the VMs on each server) to have *different* entropy sources, which was the whole point of TFA. Unless you run a lot of single-device racks each in their own room you're just going to end up with an expensive way to get exactly the same "random" data on each machine.

      There's also some correlation between things like disk activity and sound output of the machine; there may be some entropy available in the ambient sound -- it may even be chaotic -- but it's certainly not a source of random data.

    13. Re:Another advantage for TPM chips... by profplump · · Score: 1

      That's even worse than the microphone idea -- every server and VM within 20 miles of you would have the same source for "random" data.

      And that's ignoring the fact that clouds aren't random at all; they change in very well-understood ways given the wind, humidity, temperature, etc. The path, shape and density of clouds can be predicted in general terms a week in advance, and pretty specifically over the course of a few minutes.

    14. Re:Another advantage for TPM chips... by hairyfeet · · Score: 1

      there are plenty of free webcams that will let you look at...say the Eiffel tower, or even out at some guy's yard to watch his grass grow. Couldn't those free feeds be used to generate the random number?

      --
      ACs don't waste your time replying, your posts are never seen by me.
    15. Re:Another advantage for TPM chips... by tagno25 · · Score: 1
      I forgot and
      it should be

      or a camera looking at the clouds

      or a randomness via what is happening where on multiple virtual machines being fed to a central server then striped and divided evenly between the virtual machines and hashed

    16. Re:Another advantage for TPM chips... by drinkypoo · · Score: 1

      That's not true of TPM chips, whose insides are secret (unless you have a SEM.)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    17. Re:Another advantage for TPM chips... by techno-vampire · · Score: 1

      Background sound in a server room is likely to be a fairly regular hum. Better yet is a geiger counter picking up background radiation.

      --
      Good, inexpensive web hosting
    18. Re:Another advantage for TPM chips... by evanbd · · Score: 4, Informative

      You don't need a mic. The resistor noise on the sound card inputs is present and of secure quantum origin, regardless of whether a microphone is plugged in. The microphone noise is louder, but it's much harder to determine how much secure entropy is present. Why trust it when you don't have to? There's plenty available for most purposes without it. The Turbid program does this in an efficient and secure manner (and they have a paper discussing the details, along with the relevant proofs, for the curious).

    19. Re:Another advantage for TPM chips... by Nikker · · Score: 1

      Don't forget each of these techniques vary by the quality of the hardware as well as it's sensitivity and spatial relation to the source of the stimulus . If I put a cheap mic in a high traffic area ( office / street ) with an addition of white noise (salt) and generation of keys limited to traffic hours you could get a decent seed. Make a large number of salted seeds when you can and salt again per host.

      While you are right that using these methods for realtime key generation could be predictable generating many when the data is rich is still a better than most approach.

      --
      A loop, by its nature, continues. If that didn't make sense, start reading this sentence again.
    20. Re:Another advantage for TPM chips... by profplump · · Score: 4, Insightful

      First, real-world images are not very random just be virtual of being part of the real world; random things also need to happen. This is particularly mostly-static images like you'd see in 24/7 web cams -- there is not much entropy available.

      Second, most of the reason we want random data for seeing purposes is because the seed needs to be something an attacker cannot derive. The output of truly random number generator cannot be predicted by a remote attacker, but publicly available video streams most certainly can, so any source that sends the same data to more than one person is not suitable for things like cryptography. Frankly that's the whole point of the article; if there are many VMs on the same host, or many real hosts on the same hardware and network, started at the same time, and using the same source for entropy they will all generate the same "random" number.

      Finally, this is a well-solved problem. Many CPUs and motherboards include a hardware RNG that is perfectly sufficient both in terms of randomness and speed for typical PRNG seeding needs. VIA has had one directly in all their CPUs for a long time, Intel includes one in their firmware hubs, and I'm sure there are similar options on most other architectures. Using that on-board RNG to individually seed each VM/host would solve the problem described in the article. There's no reason to try to invent ways to get random data unless you have very specific requirements not met by the existing solutions, as you're quite likely to come up with something inferior either in design or implementation.

    21. Re:Another advantage for TPM chips... by profplump · · Score: 1

      You're assuming that more noise is equivalent to more entropy -- that may or may not be true. People typically walk at a fairly even cadence, speak in a certain frequency range. Traffic noise has a predictable dopler shift and fairly well-characterized frequency distribution. And most importantly, the data isn't secret so someone else could just slap up a second mic next to yours and record the data.

      Regardless, it's far from an optimal solution even if you assume that no dedicated hardware RNG is available. (Which is a bad assumption; many CPU and motherboards provide them, and they are available via USB dongle or PCI card as well). For one thing, it's really not hard to measure the time between *actually* random events, like radioactive decay, and there are a whole variety of quantum-based resistor-noise solutions available, some of which require even less hardware than the microphone solution you suggest (and which are the basis for most hardware RNG cards/chips/etc.).

      And let's not even get into the danger of storing random data. In typical use the value of random numbers is that they are unpredictable -- as soon as you start storing your random data you run the risk of getting a whole list of PRNG seeds through something as simple as bad file permissions (which is entirely possible given the apparent non-importance of a file full of random data).

      The general point is it's actually *not* that hard to get random data in modern computers, and you probably *can't* figure out a better solution on your own, at least not without some serious effort. The only real problem described in TFA is that VMs do not always offer access to the already-available entropy sources, and that admins don't take care to ensure the careful use of those sources.

    22. Re:Another advantage for TPM chips... by Nikker · · Score: 1

      You are correct more noise does not contribute to better entropy, distribution and change over time does. I only suggested sampling the data at it's 'richest' points which would be during office hours or in areas where people move and talk. Random numbers are just that how can you say 3 random numbers generated at 3 different times are any less random then a random number generated at a given point in time? The sources of entropy are the most important and while the hardware you mention is professional grade it doesn't degrade the fact that any non-deterministic source of entropy can be considered good entropy. As you know the idea is to not follow a mathematically / statistically identifiable seed to give harder to guess keys. Since all of this hardware takes its various sources of entropy at one given moment you are only getting a seed based on the state at that given moment in time which after all the hard work still only comes up with one number, random as it may be again can you say one random number based on non-deterministic entropy is more random than another? I know its a bit of devil's advocate but it is intriguing if to no one then to me.

      As far as not being able to set permissions or provide security to data well if you went this far to ensure a secure key you should have enough expertise to be able to set your permissions. In case some one on the internet intends to use this as bible I would like to inform you to learn security before you intend to implement it.

      --
      A loop, by its nature, continues. If that didn't make sense, start reading this sentence again.
    23. Re:Another advantage for TPM chips... by Anonymous Coward · · Score: 0

      We're not talking about keys.

      The TPM also provides a secure random source, you can seed /dev/random with it if available?

      There's no reason the host can't export that same /dev/random to the guest; certainly to ensure there is sufficient entropy on startup.

      I already do this with my servers.

    24. Re:Another advantage for TPM chips... by muckracer · · Score: 2, Insightful

      > There's no reason the host can't export that same /dev/random to the guest;
      > certainly to ensure there is sufficient entropy on startup.

      Wouldn't the low-budget solution to this entire issue be the simple deferral of SSH key creation and the like for a few minutes past the initial boot-up?

    25. Re:Another advantage for TPM chips... by Fred_A · · Score: 1

      The Eiffel tower hasn't changed that much in the past 110 years... The MIT (IIRC) used to have a random data feed generated from a webcam and a lava lamp. I guess each datacenter ought to invest in a lavalamp...

      Correction : after a quick Google, it seems that it was SGI, and that they actually patented the thing (which may or may not mean something depending on your jurisdiction). The site was (and still is apparently) lavarnd.org.

      --

      May contain traces of nut.
      Made from the freshest electrons.
    26. Re:Another advantage for TPM chips... by Fred_A · · Score: 1

      Black box testing isn't all that productive for RNGs. You can check distribution and very simple patterns, but beyond that it's a major headache. White box testing makes things much easier. Yay source code!

      Good luck for testing the validity of a random generator from source code. This is major Ju-Ju. Generated randomness is deep black majick. It's *waaaay* simpler and efficient to just test the output over a few X runs for a very large X.

      That's not to say that source code isn't useful to check for glaring mistakes, but if you want to check the validity of an algorithm by looking at it, you'd better be a professional mathematician with specific interests.

      --

      May contain traces of nut.
      Made from the freshest electrons.
    27. Re:Another advantage for TPM chips... by Anonymous Coward · · Score: 0

      There are a number of statistical analyses that you can run against the output of a pRNG to determine how much entropy it will generate under various usage conditions.

      NIST's Randomness Test Kit

      ENT

      Obligatory Wikipedia entry

    28. Re:Another advantage for TPM chips... by Anonymous Coward · · Score: 0

      "just be virtual of being part of the real world" -- ouch! ... just by virtue of being part ...

  2. Getting creative by Brian+Gordon · · Score: 2, Interesting

    How about getting signed entropy from a trusted server on the network/internet? How about putting that microsecond-accurate system clock to use?

    1. Re:Getting creative by pitchpipe · · Score: 0, Offtopic

      Entropy Problems For Linux In the Cloud

      Ponder this headline being read by a geek 50 years ago...

      --
      Look where all this talking got us, baby.
    2. Re:Getting creative by JWSmythe · · Score: 3, Funny

          Well, clearly that "Linux" thing is a toxic gas weapon being used by the reds. Ya, I'd worry about them blowing up a chemical weapon in the clouds. They obviously got the technology from the Nazi's (no, not a candidate for Godwin's law).

          I don't know about you, but I'm grabbing my M1 Garand and heading down to the shelter under the house. Once that Linux stuff clears, I'll they'd better have thought twice about attackin' my good ol US of A.

          Well, you asked what they would have though 50 years ago, didn't you? :)

         

      --
      Serious? Seriousness is well above my pay grade.
    3. Re:Getting creative by cheftw · · Score: 1

      Well clouds and entropy are old concepts and Linux is a name.

      What a crap ponder.

      --
      Always back up, never back down. ---- Think you're cool 'cos your uid is prime? Take mine, modulo the one digit integers
    4. Re:Getting creative by Brian+Gordon · · Score: 4, Interesting

      I think of some primitive post-human civilization struggling to industrialize amid the ruins of the heat-dead universe.

      There's little solid matter left. Nobody really knows why; the legends tell of ancient, sprawling empires releasing great monsters that consume worlds and deliver energy to fuel their eons-old wars in the cold between the stars. Several human colonies survived the Last Scourge. One even knew something of their people's history. This colony of merchant-scholars thrived in an old space-borne city drifting about a great lightyears-long dust cloud inexplicably left untouched by the wars. The city was old, very old, built by a generation of master engineers who etched their likenesses in the great canvases of the city's impervious white construction. Quiet machinery lurked untouched in the mysterious depths of the undercity, seen only by outcasts wandering alone through those vast echoing chambers.

      The city provided everything the civilization needed. Somehow (so much seemed like magic to them that even the usually-curious humans grew bored of speculation) their reservoirs filled with water, their air recycled, and their waste disappeared down bottomless shafts. All of their needs were filled, but they craved expansion and exploration. They were able to harvest some limited chemical energy from the food supplied by the city, and build using scrap. Still, entropy was a problem in the dust cloud of Linux. ....

    5. Re:Getting creative by jamesh · · Score: 1

      "w00t" is what I imagine the geek would be thinking.

    6. Re:Getting creative by bucky0 · · Score: 1

      I'll bite. that's an interesting story. where's it from?

      --

      -Bucky
    7. Re:Getting creative by Brian+Gordon · · Score: 2, Interesting

      From my fingers 3 hours ago, you insensitive clod. But if you liked it, maybe I should write similar teasers for some story ideas I've had sitting in a text file for a few months.....

    8. Re:Getting creative by Anonymous Coward · · Score: 0

      How about getting signed entropy from a trusted server on the network/internet? How about putting that microsecond-accurate system clock to use?

      That may not be possible as a random number may be required as a nonce to contacted the trusted server, to avoid replay attacks.

    9. Re:Getting creative by Anonymous Coward · · Score: 0

      I find your views fascinating, and would like to subscribe to your newsletter. Seriously.

    10. Re:Getting creative by the_womble · · Score: 2, Interesting

      You should. It is well written and has good ideas in it.

    11. Re:Getting creative by Hurricane78 · · Score: 1

      But a candidate for a grammar failure, for sure. ^^

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    12. Re:Getting creative by Brian+Gordon · · Score: 1

      A signed timestamp along with it then.

    13. Re:Getting creative by Anonymous Coward · · Score: 0

      maybe I should write similar teasers for some story ideas I've had sitting in a text file for a few months.....

      Please do. "I am intrigued by your ideas and wish to subscribe to your newsletter." Or at least buy a copy of the completed novel.

    14. Re:Getting creative by JWSmythe · · Score: 1

          There's always something lurking behind every bush.

          During WWII, it was a Nazi.
          During the Cold War, it was a communist.
          Since 9/11 it's been a terrorist.

          But sure as heck, there's always a grammar nazi lurking on the Internet. :)

      --
      Serious? Seriousness is well above my pay grade.
  3. Doesn't SSH use OpenSSL? by Anonymous Coward · · Score: 0

    OpenSSL has a cryptographically secure random number generator. I know not everything uses it but doesn't (Open)SSH?

    In the article are they just talking about the kernel random generator? I wouldn't trust that thing, even the "secure" one.

    1. Re:Doesn't SSH use OpenSSL? by morgan_greywolf · · Score: 5, Informative

      OpenSSL has a cryptographically secure random number generator. I know not everything uses it but doesn't (Open)SSH?

      No. By default, OpenSSH will use the system's pesudo-random number generator, but you can also make it use prngd or EGD (the Entropy Gathering Daemon) instead. Whether either are more "secure" than the kernel's built-in RNG I am not qualified to say.

  4. Here's a novel RNG by Anonymous Coward · · Score: 0

    The number of molecules in Cmdr Taco's nacho-warrior farts !! This can range from a few thousand on a mild day, to say 4 BILLION on a down and dirty day. I know, I know, and you don't want to know how I know.

    1. Re:Here's a novel RNG by turbidostato · · Score: 0, Troll

      "The number of molecules in Cmdr Taco's nacho-warrior farts !! This can range from a few thousand on a mild day, to say 4 BILLION on a down and dirty day."

      Sorry to point that out but you are understimating Cmdr Taco's farts by some orders of magnitude: it's more TRILLIONS (10^12) on a mild day up to a TRILLION OF TRILLIONS OF TRILLIONS (in the order of 10^24) on a funny day.

      "I know, I know, and you don't want to know how I know."

      I can sware I learn it on a book and nowhere else.

    2. Re:Here's a novel RNG by turbidostato · · Score: 1

      Troll!? Whoever modded me troll has to have a look at the Avogadro's number and its relationship with this thread.

    3. Re:Here's a novel RNG by Anonymous Coward · · Score: 1, Insightful

      Care must be taken when joking on Slashdot. It's not your fault, but you probably should have linked to Avogadro's Number in your first post. Even dead simple jokes must be sufficiently documented to avoid getting modded down.

  5. Why is this done in software at all? by BadAnalogyGuy · · Score: 3, Interesting

    Why can't the CPU contain a register which holds a random number which is updated with every clock cycle?

    1. Re:Why is this done in software at all? by bradkittenbrink · · Score: 2, Insightful

      That's like asking "Why can't they add a DWIM opcode to the instruction set?"

    2. Re:Why is this done in software at all? by ShadowRangerRIT · · Score: 4, Informative

      First, the cost of computing truly random numbers is way too high for that, unless you are performing an iterative approach to random number generation (and then you have the problem of predictability). It could be done, but you'd be pumping a lot of hardware into computing values that would be thrown away 99.9%+ of the time.

      Secondarily, if your PRNG algorithm is broken, you're stuck replacing the hardware. At least a bad software PRNG can be replaced.

      That said, hardware PRNG is provided in many modern systems by a TPM. It lacks the performance problems associated with your solution, since it only generates random numbers on demand. It still has the problem of a potential exploit being discovered leading to expensive hardware upgrades, but to my knowledge that has not been a problem to date.

      --
      $_ = "wftedskaebjgdpjgidbsmnjgcdwatb"; tr/a-z/oh, turtleneck Phrase Jar!/; print
    3. Re:Why is this done in software at all? by Timothy+Brownawell · · Score: 3, Interesting

      Why can't the CPU contain a register which holds a random number which is updated with every clock cycle?

      Some do have something like that, although it's only about 800kbps instead of 4 bytes per cycle.

    4. Re:Why is this done in software at all? by Anonymous Coward · · Score: 0

      Its a perfectly valid question.

      Hardware makers are meant to make stuff that people actually use in the real world. Since random number generation is such a fundamental concept, why don't all CPU's have one built in... The OS is free to ignore it, say if it uses a poor implementation.

      Compare it with the CAS instruction, MMX/Altivec or even GPU's in general - they are built to meet the market demand.

    5. Re:Why is this done in software at all? by Timothy+Brownawell · · Score: 3, Insightful

      Why can't the CPU contain a register which holds a random number which is updated with every clock cycle?

      First, the cost of computing truly random numbers is way too high for that

      Computers are deterministic. Truly random numbers cannot be computed, they can only be provided by special hardware (something that can measure shot noise or thermal noise, a camera pointed at a lava lamp, a movement detector in Schrodinger's cat's box).

      Secondarily, if your PRNG algorithm is broken, you're stuck replacing the hardware.

      That's why you don't do pseudo-random numbers, but real randomness from thermal noise or shot noise or some other quantum effect (cats and lava lamps don't fit on ICs).

      That said, hardware PRNG is provided in many modern systems by a TPM.

      And at some level, the randomness generator on the TPM almost certainly has an interface of "read this special register every X clock cycles" (because how else would you interface with your special hardware?).

      It lacks the performance problems associated with your solution, since it only generates random numbers on demand.

      If it's implemented in hardware (as it must be, to get true randomness), it's always running and there is no "on demand".

      It still has the problem of a potential exploit being discovered leading to expensive hardware upgrades, but to my knowledge that has not been a problem to date.

      That would be because it's a RNG instead of a PRNG.

    6. Re:Why is this done in software at all? by bradkittenbrink · · Score: 4, Insightful

      So, I was mostly just giving him shit because of his name. If you want a more serious debate, here's my best shot: The instructions you described are all relatively easy to define a generally useful specification. My main point was that every application has differing standards of randomness that are required. Do you need real quantum-mechanical randomness, or just a CSPRNG? How many bits of random data do you need, and how frequently? I'm assuming that the request is for real quantum-mechanical randomness. I find it hard to imagine defining a good spec for such hardware component, especially since the vast majority of applications don't actually require quantum-mechanical randomness, and the ones that do are likely to have very specific requirements. Anyways, besides the fact that it's tough to come up with good requirements for such a feature, I bet it's really tough to implement as well. I know just barely enough about about hardware implementations to be dangerous, so someone who knows for real, please correct me if I'm wrong. Anyways, circuits that exhibit quantum-mechanical randomness are, as far as I know, essentially the same as circuits that cause metastability in transistors. Because of the need to control for such problems, implementing such circuits on the same die as a normal digital circuit would likely be very expensive in terms of both die area and yield.

    7. Re:Why is this done in software at all? by hardburn · · Score: 1

      There are CPUs (or more often, chipsets) that provide RNGs, along with a few other hardware implementations of crypto algorithms. Most of them are meant for smaller computers, though, like the VIA C3. I wish they were more widespread and used.

      --
      Not a typewriter
    8. Re:Why is this done in software at all? by hardburn · · Score: 1

      That's why you don't do pseudo-random numbers, but real randomness from thermal noise or shot noise or some other quantum effect (cats and lava lamps don't fit on ICs).

      A small radiation source/detector, like the ones in smoke detectors, can work just fine for this purpose. Since radiation is the result of quantum interactions, the output is truly random due to the nature of the universe.

      --
      Not a typewriter
    9. Re:Why is this done in software at all? by drerwk · · Score: 1

      While the radiation is random, the measurment being so depends on a perfect detector.

    10. Re:Why is this done in software at all? by profplump · · Score: 1

      Many do. VIA has had CPU-integrated dual-oscillator hardware RNGs for a long time. Intel firmware hubs also commonly contain a hardware RNG, as do other motherboard architectures.

      They aren't very fast sources of random data -- it's actually pretty hard to get truly random data, even outside the world of desktop CPUs -- but they are fast enough to provide a relatively long seed for a PRNG within seconds of boot. Assuming you use a reasonable PRNG, providing a truly random seed is sufficient to let the PRNG generate a high-speed sequence of data random enough for most practical applications, and certainly is unpredictable enough to protect against the situations described in TFA.

    11. Re:Why is this done in software at all? by profplump · · Score: 1

      Only if you demand perfect randomness (for which there is little practical use in typical computers). And even then "perfect" only means "perfectly preserving randomness" not "correctly detecting every single event/non-event". Given the relative simplicity of a radiation detector "perfect" or some very close equivalent thereto is probably not all that unrealistic anyway.

    12. Re:Why is this done in software at all? by Mark+Trade · · Score: 1

      Where would the CPU get the randomness from? Out of thin air?

    13. Re:Why is this done in software at all? by drerwk · · Score: 1

      You are of course right. I was focused on detecting every event. The issue with most (all?) detectors is a small dead time Td after a detection event. If the time between events is >> Td it is not such a big deal, so monopole and dark matter detectors do not suffer too much. But if you want to have a detector with a lot of dynamic range, and accuracy then it is an issue.

    14. Re:Why is this done in software at all? by doom · · Score: 1

      Computers are deterministic.

      Computers are deterministic devices only because the hardware designers put a huge amount of work into making them deterministic. It may be a naive question, but it isn't a bad one... there might very well be a way to add some registers to a microprocessor that would be fundamentally random -- I think the trouble would be choosing a design that's not incredibly sensitive to fabrication errors (You don't want your "random" registers to be biased high or low). My thought would be to create a hundred of them, and let software pick one that seems to be working right.

    15. Re:Why is this done in software at all? by Anonymous Coward · · Score: 0

      You don't need truly random numbers though. Pseudo-random generators with a huge state and a truly random seed are just as secure (unless you consider the use of well-studied cryptography to be a false sense of security). The problem with putting it in the CPU is that the state really needs to be large -- a single 32 of 64 bit register is not nearly enough. You need many KB worth of state (otherwise the possible number sequences are artificially constrained).

    16. Re:Why is this done in software at all? by Timothy+Brownawell · · Score: 1

      You don't really need them... but if you're designing the hardware, they're probably the cheaper option.

  6. Surely Not. by lobiusmoop · · Score: 2, Insightful

    Generating SSH keys involves interaction via at least keyboard and possibly mouse at a terminal. Surely that basic permise is enough to provide enough entropy for the pseudo-random generator. Also, the date and time (as sources of random) can't be virtualized of course.

    --
    "I bless every day that I continue to live, for every day is pure profit."
    1. Re:Surely Not. by SanityInAnarchy · · Score: 1

      Generating SSH keys involves interaction via at least keyboard and possibly mouse at a terminal.

      If you use PuTTY, yes. OpenSSH, at least, doesn't require anything in particular, just a sufficient amount of entropy. On a properly configured system, moving a mouse or banging randomly on the keyboard might feed entropy -- but then, so would plugging a microphone into the sound card, or any number of other things.

      And as Kaseijin mentions, this is about host keys. Especially in a virtualized environment, you can't assume any sort of human interaction when these keys are generated.

      --
      Don't thank God, thank a doctor!
    2. Re:Surely Not. by marcansoft · · Score: 1

      Last I checked the date and time are anything but random.

  7. The main problem with cloud computing by Anonymous Coward · · Score: 0, Funny

    is that it doesn't exist. It's a farce, a meaningless buzzword, just like web 2.0.

    A more appropriate word would be servers.

    1. Re:The main problem with cloud computing by Anonymous Coward · · Score: 0

      true.

    2. Re:The main problem with cloud computing by chelsel · · Score: 1

      AC, let me guess... you work for a cloud computing company, but not in marketing :-)

    3. Re:The main problem with cloud computing by SanityInAnarchy · · Score: 1

      Like Web 2.0, it has at least one or two specific meanings. The problem is getting specific -- a little knowledge is a dangerous thing, and managers can be very fuzzy (clouded?) about "cloud computing" if they don't understand the difference between calling Gmail a "cloud app" and calling Amazon Web Services a "compute cloud".

      --
      Don't thank God, thank a doctor!
    4. Re:The main problem with cloud computing by brusk · · Score: 1

      Cloud computing is real, and some of the biggest computers in the world are devoted to it. Climate modeling is a very difficult problem and we still don't have it nearly right.

      --
      .sig withheld by request
    5. Re:The main problem with cloud computing by dna_(c)(tm)(r) · · Score: 1

      Cloud computing is real[...]

      Point was it is not well defined. Its like "architecture" or "web 2.0" or "beautiful": everybody knows exactly what it means - but everybody has a different idea of what it is...

    6. Re:The main problem with cloud computing by julesh · · Score: 1

      is that it doesn't exist. It's a farce, a meaningless buzzword, just like web 2.0.

      A more appropriate word would be servers.

      You miss the point. We aren't talking about servers, and any ordinary server-provision system wouldn't have the problem highlighted in TFA. We are talking about servers that are initialised on-demand, with a pay-by-the-hour pricing model, so that individual OS installations typically only run for a few hours at a time before being shut down and essentially wiped back to the base installation image. That's a model that's different enough from traditional virtual hosting that it warrants a different name, and while I think "cloud computing" is a _ridiculous_ name, it's the name the model's ended up with.

    7. Re:The main problem with cloud computing by brusk · · Score: 1

      Point is, it would help to read the post you're replying to (and possibly calibrate your sarcasm meter).

      --
      .sig withheld by request
    8. Re:The main problem with cloud computing by dna_(c)(tm)(r) · · Score: 1

      I missed the joke. Wish I could disappear in a cloud now.

  8. Parse Error by Anonymous Coward · · Score: 0

    "it's": expected adjective; found verb instead

    1. Re:Parse Error by Anonymous Coward · · Score: 0

      I like grammar nazis who don't know their grammar. You were probably expecting a posessive pronoun, but instead you found a pronoun-verb contraction.

  9. Much ado about nothing. by Facegarden · · Score: 5, Funny

    All this complaining over random numbers is silly. All you really have to do is use 5. It's just as random as any other number, and it's easy to generate a 5.
    -Taylor

    --
    Worldwide Military budgets: $2100 billion. Worldwide Space Exploration budgets: $38 billion. Really, world? Really?
    1. Re:Much ado about nothing. by turbidostato · · Score: 1

      "and it's easy to generate a 5"

      And you can generate it at any random point in time too.

      But somehow, being as random as anyone else, I prefer 42.

    2. Re:Much ado about nothing. by Anonymous Coward · · Score: 0

      I wish I thought of that.

    3. Re:Much ado about nothing. by BobisOnlyBob · · Score: 5, Funny

      This only proves how easy it is to generate a (5, Funny).

    4. Re:Much ado about nothing. by hannson · · Score: 2, Funny

      int getRandomNumer()
      {
              return 4; // chosen by fair dice roll.
      // guaranteed to be random.
      }

    5. Re:Much ado about nothing. by martas · · Score: 1

      no the true random number is 9

    6. Re:Much ado about nothing. by tylerni7 · · Score: 1

      http://xkcd.com/221/
      It's cool, it's different because you used a 5.

    7. Re:Much ado about nothing. by jefu · · Score: 1

      No, the only true random number is 17. This was asserted by several mathematicians who used several lines of reasoning (one rather like this). Then you get the random sequence 17,17,17... and the random rational 0.17171717... and lots of other perfectly good random numbers. Though you probably shouldn't use them as a source for cryptographically strong random numbers.

    8. Re:Much ado about nothing. by jamesh · · Score: 2, Insightful

      Interesting that both Dilbert (years ago) and xkcd (more recently) both contain a comic with a similar joke...

    9. Re:Much ado about nothing. by sam0737 · · Score: 1

      Hell! I have been using 42 for long. And you know that's the Answer to Life, The Universe and Everything, including but not limited to generating Random Number I suppose.
      I bet it works better than 5.

    10. Re:Much ado about nothing. by zeromorph · · Score: 1

      http://xkcd.com/221/

      Probably obvious to everyone - just to make sure Mr. Munroe gets the credits he deserves.

      --
      "Hannibal's plans never work right. They just work." Amy/A-Team
    11. Re:Much ado about nothing. by misof · · Score: 1

      Yeah, funny, but this precisely illustrates the difference between "random" and "arbitrary" in science. "Arbitrary" means I don't care what you pick, "random" means I care that nobody should be able to predict what you'll pick. And that is clearly not the case if you pick 5 all the time.

    12. Re:Much ado about nothing. by hellothatsme · · Score: 1

      are you sure the rating of your post is completely random?

    13. Re:Much ado about nothing. by cstdenis · · Score: 1

      The proper random number to use is 4.

      http://xkcd.com/221/

      --
      1984 was not supposed to be an instruction manual.
  10. Not surely by Kaseijin · · Score: 3, Interesting

    Generating SSH keys involves interaction via at least keyboard and possibly mouse at a terminal.

    SSH host keys are often generated automatically when the init script notices there aren't any.

  11. Big problem, but addressable by lamber45 · · Score: 3, Interesting
    The nice thing about Linux is that you can develop whatever entropy-producing process you want and write its output to /dev/urandom to add more entropy to the pool. For instance, a boot script could issue an HTTP request to a website backed by a hardware random-number generator (access-control to only machines in the cloud by IP range). It is something to be worried about, though.

    Java code that does cryptography or generates UUIDs (in the hope that they will be a truly universal key for something) operates under similar problems. JavaScript is even worse; all it has is the time, perhaps the user's window-size (not very random if maximised) and mouse-movements, and the built-in random() method, which is not expected to be of cryptographic quality.

  12. Linux has a paravirtual entropy driver by Anthony+Liguori · · Score: 5, Insightful

    CONFIG_HW_RANDOM_VIRTIO enables it. It's been there for quite a while.

    We could easily support it in KVM but I've held back on it because to really solve the problem, you would need to use /dev/random as an entropy source. I've always been a bit concerned that one VM could starve another by aggressively consuming entropy.

    lguest does support this backend device though.

    1. Re:Linux has a paravirtual entropy driver by 42forty-two42 · · Score: 1

      Why not set a rate limit on entropy consumption then?

    2. Re:Linux has a paravirtual entropy driver by Anonymous Coward · · Score: 0

      We could easily support it [...] but I've held back on it because to really solve the problem [...]

      Wow. I've seldom seen such a clear example of Voltaire's maxim that "the perfect is the enemy of the good."

    3. Re:Linux has a paravirtual entropy driver by 19thNervousBreakdown · · Score: 1

      I guess you could set it as an option, but the threshold between a useful amount of entropy and what it would take to starve another is often overlappng, so it wouldn't be much help in any but the most controlled situations--which is exactly when you wouldn't need the option.

      --
      <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
    4. Re:Linux has a paravirtual entropy driver by Chandon+Seldon · · Score: 1

      Wouldn't it be sufficient to use the host random pool as a seed for some sort of strong PRNG?

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    5. Re:Linux has a paravirtual entropy driver by profplump · · Score: 1

      I don't understand how entropy consumption is fundamentally different than I/O consumption or memory consumption, or why it would need a different solution to the problem of competing demands for scarce resources.

    6. Re:Linux has a paravirtual entropy driver by plasmacutter · · Score: 2, Funny

      I heard the aliens from zeta reticuli utilize paravirtual entropy drivers to get to earth.

      --
      VLC FOR MAC IS DYING! IF YOU DEVELOP, PLEASE SAVE IT!!
    7. Re:Linux has a paravirtual entropy driver by DamnStupidElf · · Score: 1

      There are two general cases that I can imagine; one is the typical cloud computing environment with a remotely hosted virtual machine on a mostly trusted host, and the second is local usage of a virtual machine on a secure system for isolation, security, or simply to run multiple operating system instances. In the former case, one doesn't know for sure whether the host system is giving high quality entropy from its own /dev/random or maybe just using /dev/zero. Since the source of randomness is ultimately untrusted, it makes sense to just use /dev/urandom as the entropy source for each virtual machine because it will be good enough for general cryptographic purposes like IV and nonce generation, and operations like key generation should be avoided.

      In the latter case where a VM is running on a fully trusted host it makes a lot of sense to give the VM direct access to the host's /dev/random. Starving the host system or other concurrently running VMs of entropy may be completely appropriate if the user needs a lot of high quality entropy in the VM they are currently working in, and not in any of the others.

      In short, I think it would be best to give users the option of choosing /dev/random or /dev/urandom as the virtual random number generator for each VM.

  13. Easy enough to fix.. by Anonymous Coward · · Score: 0

    As part of cloning the image just do this:

    dd if=/dev/urandom of=/target/var/lib/urandom count=1 bs=4096

    There. Fixed it for you. Works better if the VM server has a high volume entropy source, but even if not it is still pretty damn good.

    1. Re:Easy enough to fix.. by julesh · · Score: 1

      As part of cloning the image just do this:

      dd if=/dev/urandom of=/target/var/lib/urandom count=1 bs=4096

      There. Fixed it for you. Works better if the VM server has a high volume entropy source, but even if not it is still pretty damn good.

      Except this is somewhat harder to do if you're running a service where you provide virtual machines that run OS images from unknown sources, that could be running basically any OS/distribution the user wishes, with the image using practically any file system that has ever been designed. Sure, if you limit your service so it can only run images that are based on ext3 and conform to the linux file system standard you can do this. But that's not the business most of these services (e.g. Amazon EC2) are in.

  14. evidence that cloud is a fad? by noric · · Score: 2, Interesting

    I'd like some evidence that cloud computing is a fad. Tens of thousands of companies, in dozens of industries, do not list "computing hardware, availability, and capacity management" as a core competency, making them prime cloud customers.

    1. Re:evidence that cloud is a fad? by Anonymous Coward · · Score: 0

      The cloud is pants.

    2. Re:evidence that cloud is a fad? by jellomizer · · Score: 2, Insightful

      It is a tool in the bucket. That what it is. There will be a huge growth spurt, then they realize that it won't solve everything. Then they will cut back and still use it until they find something better.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    3. Re:evidence that cloud is a fad? by rantingkitten · · Score: 1

      Because the "cloud" is a platform that can solve a very narrow scope of problmes, yet companies seem to want to put everything under the sun there just because they can. Most companies do not have a need for instant, on-demand ramp-up of computer power.

      --
      mirrorshades radio -- darkwave, industrial, futurepop, ebm.
  15. Support via "Guest Additions"? by Just+Brew+It! · · Score: 2, Insightful

    Seems to me this could be solved via the "Guest Additions" module that most virtualization packages recommend you install in the guest OS. Use the GA to inject some entropy from the host system into the guest system's entropy pool. The host CPU's TSC register would probably be an excellent source.

  16. Hardware support.... by DrYak · · Score: 1

    Whether either are more "secure" than the kernel's built-in RNG I am not qualified to say.

    Well, it depends on the hardware, as the kernel has drivers for various hardware RNG featured on some CPUs or virtualized source of randomness provided by the host.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Hardware support.... by Joce640k · · Score: 1

      Um, the article is discussing multiple virtual machines with identical disk images so "hardware support" is moot.

      --
      No sig today...
    2. Re:Hardware support.... by CarpetShark · · Score: 1

      No, the whole point is that virtual machines (and individual programs) should not be doing their own RNG, and should be passing that task on to the host instead. The host does potentially have special facilities for it, and knows much more about what's truly random vs. what appears random to an image that might be identical to another image.

  17. Eh? by ledow · · Score: 3, Interesting

    If you "need" cloud computing, then you're bright enough to install an entropy daemon on one of the machines and maybe even slap a hardware-based RNG on it (probably worth sourcing a VIA or similar just for this purpose, to be honest). It's not hard.

    Anything else, your "randomness" really doesn't matter and the standard entropy will be just fine.

    1. Re:Eh? by Chandon+Seldon · · Score: 1

      Bullshit. Any network connected host *needs* to be able to generate unguessable random numbers. Otherwise, that host might as well be a member of a botnet already.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    2. Re:Eh? by ledow · · Score: 2, Insightful

      A bold assertion. I assume you're thinking of TCP sequence numbers or similar. Otherwise, I call bullshit on the "ANY".

      And the entropy provided by being connected to a network in any way, shape or form is enough for that purpose.

      Even in general, unless you're generating LOTS of SSH/SSL keys on some kind of automated process schedule, you're fine, and that's the sort of task that should be pushed out to a dedicated entropy machine.

      Otherwise, every ADSL router etc. in the WORLD would be worthless - no keyboard, no mouse, no disk interrupts, etc. and yet they run full TCP stacks that hold the majority of the world's home connections. The fact is that it's just not as big an issue as you think it is.

    3. Re:Eh? by julesh · · Score: 1

      If you "need" cloud computing, then you're bright enough to install an entropy daemon on one of the machines and maybe even slap a hardware-based RNG on it (probably worth sourcing a VIA or similar just for this purpose, to be honest). It's not hard.

      Err... yes, it is. Where does your entropy daemon get its entropy from? How do you install the hardware given that you're running in a VM hosted on somebody else's machine, located in somebody else's datacentre? This is an issue that can only be solved by the service providers, not the users of the service.

    4. Re:Eh? by ledow · · Score: 1

      If you *can't* do this with your provider, but need a good RNG, then you don't "need" cloud computing. It's a cyclic argument. Use the tools for what they're designed for. *Need* randomness for security? Go elsewhere.

      Plus, if you're that big a user, the cloud will sort itself out for you (I'd be *very* surprised if the quality of the internal entropy of the well-known clouds wasn't already fantastic - this isn't a "new" problem for people running more serious setups) or find that every one of its customer's SSL certificates etc. are vulnerable in about 0.01 seconds.

      It's really a non-issue. Those that need it, know it, and know where to get it, and know to check it. Everyone else doesn't "need" it.

    5. Re:Eh? by Chandon+Seldon · · Score: 1

      Ok. I'll back off from the "any" claim for a moment and focus entirely on SSH/SSL. Any host running one of those protocols is regenerating keys on a regular basis in such a way that farming it out to a dedicated machine doesn't make much sense.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    6. Re:Eh? by ledow · · Score: 1

      Even there...

      SSH is a non-starter. My SSH by default renegotiates keys every hour or 1Gb of data. Even if we assume that in that hour the network is relatively idle, even a "virtual" network connected to a real Ethernet or similar will generate enough entropy to handle that situation (just by mistiming, etc., of network interrupts in the underlying "real" OS - even on a local network). Until you get into dozens and dozens of simultaneous SSH sessions, you won't exhaust basic entropy.

      However SSL is much more of a concern, but there... you're into serious systems where you *want* to be using real entropy anyway, and probably *don't* run it on a cloud for very, very sensible security reasons.

      Again... anything where lots of entropy is *vital*, you'll be thinking about it differently anyway. I daresay there are SSH shell services running on clouds, as well as some idiot running his webstore without thinking about it, but that's just basics. And you'll find that the larger clouds *will* in fact have taken care of this problem by providing a decent amount of entropy anyway.

      Not saying the problem doesn't exist, but that we're into corner cases rather than "the sky is falling".

  18. Does it really matter? by Anonymous Coward · · Score: 0

    If a random number generator is supposed to be random, won't one rng have the same chance to generate the same numbers as another in a given set?

  19. Re:who cares? by LordLimecat · · Score: 0, Offtopic

    Its a sign of failure when noone even bothers to mod you troll...

  20. No one wants to make money off the Interwebs! by zullnero · · Score: 2, Insightful

    "The term cloud computing is useless" said Stamos. "It's way overused. It's mostly about gathering venture capital or selling your products."

    Yes. Because no one on the Internet has any use for gathering venture capital or selling products.

    It IS an overused term, but you're not testing some product or how people are using it, you're really just testing the security models of various operating systems to determine which are more ready to support those concepts that people grouped together and called "cloud computing". There were a lot of various concepts that were grouped together that comprised the "Net 2.0" concept too...and that cliche was just as derided for being overused. And yet, websites that aren't all ajaxed up or don't use css seem pretty old-fashioned these days.

    That said, the question I have is how ready for those "cloud computing" concepts is Windows, really? How much of that security model is using the proper approach to securing a transaction instead of just shutting down that path altogether?

  21. Definition of Cloud skewed by smueller · · Score: 2, Informative

    This is not a "cloud" problem. This is a virtual server and image problem. Clouds have nothing to do with virtual servers. If you use a service like NewServers.com, you can get dedicated physical servers for your cloud, on-demand and at hourly prices.

    1. Re:Definition of Cloud skewed by CalTrumpet · · Score: 1

      While the origin of the issue is the virtualization layer, it is more specifically a cloud problem because most IaaS/VPS providers use standard images with a public random seed file, so everybody's machine initializes up to the same state (RTC + random seed + handful of interrupts).

    2. Re:Definition of Cloud skewed by julesh · · Score: 2, Informative

      This is not a "cloud" problem. This is a virtual server and image problem. Clouds have nothing to do with virtual servers. If you use a service like NewServers.com, you can get dedicated physical servers for your cloud, on-demand and at hourly prices.

      Expanding on the other answer you've, here's the basic problem:

      I can take a virtual server, install an image with a well-known PRNG seed in it, and use it for a little while. While it's used the PRNG is updated by entropy in an unpredictable way, resulting eventually in a virtual server image that produces effectively random numbers. When I shut it down the entropy pool is stored in its disk image, and reread when I start it up again. There is a small problem, but it goes away after a little while.

      That isn't the usage model for "cloud" servers, however. In a cloud environment, e.g. Amazon EC2, the servers are quite likely to run for only a few hours at a time (because you start them up when you need extra capacity, and stop them when you no longer need that capacity), so the image has no time to accumulate much entropy, and worst of all when you shut it down _the data on the OS image, including the entropy pool, is lost_. The basic model is that you have many servers, all sharing a read-only base disk image. The problem occurs each time you start up a new host, which can be quite frequently.

      Now, you could modify your images to stick their entropy pools in permanent storage (e.g. Amazon S3), but then you'll need some mechanism to prevent two servers from starting up with the same entropy pool, which is a non-trivial problem to solve, and I'll bet that very few EC2 users have thought to do it (I certainly didn't when I trialled EC2 a few months ago).

    3. Re:Definition of Cloud skewed by petermgreen · · Score: 1

      Even with traditional vm usage however there is the issue that the generation of ssh host keys is likely to happen very soon after the server is reimaged. Quite possiblly automatically as part of a first boot setup after imaging.

      Once generated unless there is reason to suspect a compromise those host keys will likely be retained for the life of the vm.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  22. Any USB device by StCredZero · · Score: 1

    Or you could plug in a microphone.

    Assign all of he virtual servers a unique 256 bit ID. XOR that with 256 bits of input of any USB device that measures the real world, and send it through a hash algorithm. USB devices are easy for virtual servers to access.

    Perhaps better, have a 256 bit seed for each server as above, but have the host server distribute 256 bits at startup time using a microphone run through a hash algorithm.

    1. Re:Any USB device by Anonymous Coward · · Score: 0

      Perhaps it's time that someone starts making USB plugs with random number generator hardware. Something like that shouldn't cost more than a small flash stick.

    2. Re:Any USB device by Anonymous Coward · · Score: 0
    3. Re:Any USB device by Anonymous Coward · · Score: 0

      I had something more like this query in mind.

  23. Re:Big problem, but addressable by gd2shoe · · Score: 1

    Interesting idea, though I would recommend HTTPS (pre-shared self signed cert would be sufficient for in-house use). If predictability is the problem you're trying to avoid, you want to skirt the packet sniffers.

    By the way, why write to /dev/urandom, and not /dev/random? Doesn't /dev/urandom act as a front for /dev/random except when the entropy pool is empty (at which point it goes pseudo-random). Just curious.

    --
    I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
  24. GoDaddy VPS - SSH keys identical by seifried · · Score: 1

    I did a system wipe and rebuild (re-installs CentOS from scratch) and SSH'ed in and... got no warning. The system's SSH keys were identical as the previous build. Needless to say I generated a local set and uploaded them.

    1. Re:GoDaddy VPS - SSH keys identical by Darkk · · Score: 1

      Does this happen every time or just at random? (Excuse the pun).

    2. Re:GoDaddy VPS - SSH keys identical by Anonymous Coward · · Score: 1, Interesting

      A better question would be if you changed your known hosts file to assign the key to another VPS IP and ssh'd to that IP, do other servers have the same key?

      Personally, the first thing I would have suspected if this happened to me is that this "wipe and rebuild" backs up part of /etc

  25. Re:Big problem, but addressable by CalTrumpet · · Score: 5, Informative

    Actually, /dev/random and /dev/urandom have their own, separate secondary pools that are fed off of a main pool when entropy is "depleted" in the second level pools. This is an area of research for us as well, since Linux's entropy estimation algorithm fails in situations where the timing deltas of entropy gathering events (IRQs and disk IOs) are actually predictable, so it's possible that the second level pools are not being refreshed at appropriate times.

    If you write to /dev/urandom, it goes into the primary pool by tradition. This is what the rc scripts do on bootup with the random seed file on disk.

    BTW, it's absolutely the wrong solution to get entropy from another source on the network (for many reasons, but one is that you can't do a secure HTTPS handshake without, you guessed it, unguessable random numbers). The whole point here is that we are looking for a way for 500 Linux instances on EC2 to have different entropy pools before the kernel completes boot. The only possible solution is for the hypervisor (Xen for Amazon) to provide a simulated HW RNG that pulls entropy from a real HW RNG or from an entropy daemon in the hypervisor.

    The best way to learn about Linux RNG basics is Gutterman et. al. Analysis of the Linux Random Number Generator. Several of the issues they describe have been addressed, such as their PFS concerns, but their description of the entropy pools is still accurate.

  26. Re:who cares? by Just+Brew+It! · · Score: 1

    Umm... what?

    Either we've had an honest misunderstanding here due to my not being entirely clear (which I'd be more than happy to straighten out), or you're a clueless moron. Unless you're willing to clarify why you consider me a "troll", I have no choice but to assume the latter.

  27. FTA... by NotBorg · · Score: 4, Funny

    "This falls somewhere between a very big deal and irrelevant," says Wagner.

    I'm glad he cleared that up for me.

    --
    I want this account deleted.
    1. Re:FTA... by Rocketship+Underpant · · Score: 1

      So, it resembles an act of Congress then.

      (Although one could argue that by simultaneously fulfilling both opposing states, Congress is more like a quantum computing machine.)

      --
      He who lights his taper at mine, receives light without darkening me.
  28. Re: by Anonymous Coward · · Score: 0

    In Linux, it's not possible for one application to starve another of entropy. (At least, on my computer. I'm using Debian unstable). To check, try this:
    1. Open 2 xterm windows (or 2 ttys, or whatever).
    2. In the first window, type: cat /dev/random
    3. Watch the gibberish on the screen.
    4. Type the same thing in the second window.
    5. Now, hit the ctrl and shift keys repeatedly, and move the mouse, to generate entropy.
    6. You should see more gibberish in both windows, showing that neither one gets starved.

  29. Re:who cares? by jamesh · · Score: 1

    The host CPU's TSC register would probably be an excellent source.

    Actually, if 636086 reads the xen mailing lists then it's probably a subtle joke.

  30. HotBots random number generator by Animats · · Score: 1

    There's a simple random number generator based on a radioactive source on-line. That can be accessed through a Java app, and the hardware info needed to build one of your own is on line. There are commercial random number generators. USB, even. A serious data center should have a few of these.

  31. Re:who cares? by Just+Brew+It! · · Score: 1

    No, seriously. The TSC counts raw host CPU clock ticks. I/O interrupts and CPU cache misses on the host should effectively de-correlate it with anything going on in the guest VMs. On a host with many guest VMs it only gets better, since the patterns of host I/O interrupts and guest VM timeslices will be even less predictable.

    As long as it is not relied on as a continuous source of high quality entropy (i.e. it should be used to seed the pool, just like things like mouse movement etc. are used now), it ought to be a significant improvement.

  32. Re:who cares? by Just+Brew+It! · · Score: 1

    ...and if you're worried about someone running a guest VM and using the host TSC value as the basis for some sort of attack on the RNGs of other similar VMs running on the same host, just run the TSC value through a hash function on the host side, before passing it to the VM. As long as the hash function is effectively one-way, you can't glean any information which might be useful in an attack on "sister" VMs.

  33. Re: by hitmark · · Score: 1

    try scaling that up, and see where it ends up...

    --
    comment first, facts later. http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
  34. Re:Slashdot is full of... by Anonymous Coward · · Score: 0

    Did you post that wirelessly from the gay bar you frequent? Nice to know that since you're here too, you're calling yourself gay. Unless you meant that Slashdot is full of cigarettes, or a bundle of sticks.

    On an even more off-topic note, what's with "Anonymous Cowardon"? Fix that shit, Taco! AC users don't have a friend icon to create a space between the username and the "on [timestamp]", so you need to add one in.

  35. May also affect IP sequence number generation by DaveAtFraud · · Score: 1
    I set up and scanned a number of virtual machines for a network security class Spring of this year. I noticed the following was the typical output of nmap when scanning the virtual host (in this case the VM was Fedora Core 10 hosted on CentOS 5.3 running a 2.6.29 custom kernel):

    Network Distance: 1 hop
    TCP Sequence Prediction: Difficulty=0 (Trivial joke)

    Running nmap against the same host but the physical OS (currently FC-11) gives:

    TCP Sequence Prediction: Class=random positive increments
    Difficulty=939462 (Good luck!)

    This would seem to indicate that "cloud" TCP/IP sessions may be vulnerable but session hijacking.
    Cheers,
    Dave

    --
    They that can give up essential liberty to obtain a little temporary safety deserve neither safety nor liberty.
    Ben
  36. A large collection of "good" random numbers? by Anonymous Coward · · Score: 0

    Why can't you just store 1 gig of "good" random numbers in each server?

    After all, this is what they used in the "good old times", the famous RAND book...

    http://www.rand.org/pubs/monograph_reports/MR1418/

    Any serious answer?

    1. Re:A large collection of "good" random numbers? by profplump · · Score: 1

      A book of random numbers is great for statistics. If that's your use there's no need to do anything else, and RAND's book is still a good choice.

      But the value of random numbers in things like cryptography is that they are unpredictable. If everyone is using the same list the numbers are entirely predictable and therefore useless. A typical example is the hybrid cryptosystem used in public-key encryption -- the computer picks a random number for use as the secret key for the shared-secret cypher, encrypts the data with that key, then encrypts the key itself using the much slower and more restrictive public-key algorithm. If you could guess the random number used as the key in step 1 you wouldn't need to break they encryption in stages 2 or 3 to read the message because you'd already have the password.

    2. Re:A large collection of "good" random numbers? by doom · · Score: 1
      "Why can't you just store 1 gig of 'good' random numbers in each server?" The servers in question are virtual machines that are instantiated from one stored image. If every one of these machines grabs the same "good" values every time they start, you haven't solved the problem.

      Something like this would be workable, if the actual server managing the cloud of virtual ones was running the book, and seeding the VMs with random numbers... but in effect the solution is probably what other people are suggesting, when you design a system, you have to have it use an external "entropy server"..

  37. The generation of random numbers... by ameline · · Score: 5, Funny

    As has been so often said, the generation of random numbers is too important to be left to chance. :-)

    --
    Ian Ameline
  38. Old hat? by GiMP · · Score: 3, Informative

    Disclaimer: I work for a hosting company doing VPS/cloud hosting.

    This is pretty old-hat. First, the host-keys issue inside pre-generated images is a very obvious one, although I'm not too surprised that companies aren't considering it. RNG issues aren't quite as obvious, but they're not super-secret either, anyone with any amount of background in security has been aware of this for a while.

    In fact, questions regarding RNGs have even surfaced in the ##xen IRC channel (freenode.org) because it is a very important issue to some. In particular, those with the need for hardware RNG solutions have come seeking assistance.

    I'm certainly not minimizing the issue, just noting that it isn't really a new one at all. More than anything, is that the average systems administrator has been slow to realize this, and developers even less so.

  39. problem has been solved by flok · · Score: 2, Informative

    This problem has been solved: use EntropyBroker: a physical machine gathers entropy data and distributes this to the virtual machines. If I remember correctly KVM has a special driver for feeding the VM with entropdata from the host system.

    --

    www.vanheusden.com - home of Multitail, HTTPing, CoffeeSaint, EntropyBroker, rsstail, bsod, listener, nagcon, nagi
  40. Re:Slashdot is full of... by Anonymous Coward · · Score: 0

    a bundle of sticks.

    Faggot.

  41. Re:Big problem, but addressable by gd2shoe · · Score: 1

    Dang, you're right. Thanks for the post.

    --
    I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
  42. Am I lost, this _is_ /., right? by Rigrig · · Score: 1

    If I'm not lost in the intertubes, where are my 'oblig. xkcd/Dilbert' karma whores?

    --
    **TODO** [X] Steal someone elses sig.
  43. Build one of these by AYeomans · · Score: 1

    DiceOMatic. Complete with USB camera interface.

    --
    Andrew Yeomans
  44. Re:Big problem, but addressable by julesh · · Score: 1

    BTW, it's absolutely the wrong solution to get entropy from another source on the network (for many reasons, but one is that you can't do a secure HTTPS handshake without, you guessed it, unguessable random numbers). The whole point here is that we are looking for a way for 500 Linux instances on EC2 to have different entropy pools before the kernel completes boot.

    If we're talking about a VM, what's wrong with setting up a point-to-point link with the host machine and accessing an entropy source over that, with no HTTPS handshake necessary?

  45. my farts are predictable by Anonymous Coward · · Score: 0

    honestly, not random at all

  46. Re:Big problem, but addressable by muckracer · · Score: 1

    > The nice thing about Linux is that you can develop whatever entropy-producing process you want
    > and write its output to /dev/urandom to add more entropy to the pool.

    Anyone know, what OOTB processes/programs and/or events do in fact seed /dev/random?

  47. Re:who cares? by jamesh · · Score: 1

    well... i screwed up and got my threading mixed up so I thought you'd replied to a different post. d'oh.

    All I was saying is that based on recent discussions on xen-devel concerning TSC synchronisation when physical CPU's are scheduled into virtual CPU's in a VM, the value might as well be a random number for the amount of use that it is. I assumed you were making a joke about that, but obviously you were replying to a different post than I thought you were.

  48. What about radio/TV noise? by mayberry42 · · Score: 1

    I am by no means a cryptography expert, but I do remember hearing a while back that the radio "static" that you hear at "empty" radio frequencies are signals from outer space (and likely also from other stray terrestrial sources); the same for those "static" TV signals. Could those be used to collect entropy? It should be a cheap and fairly easy solution...

  49. Any app that cares about randomness and security by DamonHD · · Score: 1

    ...should be importing it explicitly (eg to create important crypto keys) from an external source, such as random.hd.org (mine) or random.org or whatever.

    Rgds

    Damon

    --
    http://m.earth.org.uk/
  50. Mountains out of molehills by CarpetShark · · Score: 1

    As others said, you can get enough random data from a soundcard, hardware RNG, or other relatively simple** solution. Making true random data available to each virtual machine regardless of when it booted or what image it used is as simple as making your VMs boot with a specific kernel, patched to connect use the host's entropy rather than its own.

  51. Re:who cares? by Just+Brew+It! · · Score: 1

    I was assuming that the TSCs are not synchronized tightly enough between host and guest(s) to be correlated, at least not in the low order bits. Perhaps this was a bad assumption. (Though I have to believe that it is still a lot more "random" than most other things accessible to the guest.)

    My apologies to #1103839; your post was rude, but I should not have responded in kind.

    At least I injected some humor into the thread (if unintended)!

  52. I could be wrong, I could be right.. by murderlegendre · · Score: 1

    But this headline should have read "Rotten news, Public Images Limited."

    --
    There's a Starman, waiting in the sky / He'd like to come and meet us, but he hasn't got the time.
  53. Use Linux-VServer/OpenVZ or LXC by Lennie · · Score: 2, Informative

    Those just use process-namespaces and the same kernel and you are done with it.

    --
    New things are always on the horizon
  54. Re:Big problem, but addressable by lamber45 · · Score: 1
    BTW, it's absolutely the wrong solution to get entropy from another source on the network (for many reasons, but one is that you can't do a secure HTTPS handshake without, you guessed it, unguessable random numbers). The whole point here is that we are looking for a way for 500 Linux instances on EC2 to have different entropy pools before the kernel completes boot.

    You could have the central-entropy host run a UDP service that generates new random data per outgoing packet and only respond to requests from the cloud's expected IP range. Ideally the central-entropy host would be co-located with the cloud elements and behind a firewall.

    For the specific case of EC2, the deployer should patch /var/lib/urandom/random-seed (as well as the SSH host-keys, etc) on each image from a secure system outside the cloud before boot; but I haven't actually done that, I'm not sure how easy it is with the current API.

  55. Re:Big problem, but addressable by Anonymous Coward · · Score: 0

    This is an area of research for us as well, since Linux's entropy estimation algorithm fails in situations where the timing deltas of entropy gathering events (IRQs and disk IOs) are actually predictable, so it's possible that the second level pools are not being refreshed at appropriate times.

    The kernel's estimates of provided entropy are pretty low though, so the event must be _very_ unrandom for the count to be too high.

    BTW, it's absolutely the wrong solution to get entropy from another source on the network (for many reasons, but one is that you can't do a secure HTTPS handshake without, you guessed it, unguessable random numbers).

    I've always though that received packet times and src/dst MACs should be included in the entropy pool, even if the estimated entropy is zero. Put it through a whitening algorithm then a cryptographic hash. Now it can be mixed in safely and improve the entropy (even if you don't trust it enough to actually count on it for randomness).

    The whole point here is that we are looking for a way for 500 Linux instances on EC2 to have different entropy pools before the kernel completes boot. The only possible solution is for the hypervisor (Xen for Amazon) to provide a simulated HW RNG that pulls entropy from a real HW RNG or from an entropy daemon in the hypervisor.

    If that's the only solution you can think of you aren't being very creative. Though it does seem like it would be a reasonable thing to do. You can also do stuff like mix in hardware serial numbers and addresses (motherboard, DIMMs, processor, network cards, hard drives) into the pool via userspace. They aren't really random (so they shouldn't increase the entropy count), but they will make sure each computer has a different state.

    -Ross

  56. Re:Any app that cares about randomness and securit by DamnStupidElf · · Score: 1

    The best thing about downloading random numbers from the Internet is that if you ever lose them, the server you got them from probably still has a copy.

  57. Re:Any app that cares about randomness and securit by DamonHD · · Score: 1

    True... B^>

    I realise that I didn't mean quite what I said, but rather that gathering entropy for such tasks shouldn't just rely on scraping up whatever happens to be on your box at start-up. For example, you can collect more, with care, from HTTP hits on a busy server (with guards against being spoofed such as only using microsecond-scale jitter between hits).

    Rgds

    Damon

    --
    http://m.earth.org.uk/
  58. Indeed Hardware support by DrYak · · Score: 1

    Um, the article is discussing multiple virtual machines with identical disk images so "hardware support" is moot.

    Ok I think I wasn't explicit enough.

    I said :

    drivers for various hardware RNG featured on some CPUs or virtualized source of randomness provided by the host

    What I mean :

    • Virtual Host Linux Server :
      can optionally use real hardware support to fill its own entropy pool. (lots of CPU have it). Thus the pool is far less likely to get depleted.
    • Multiple virtual client, on identical image
      • DO NOT run software PRNGs:
        they will tend to give out similar result, because each has similar simulated environment and simulated event from which entropy pool is filled.
        Running software entropy source in a simulated environment is asinine. A source of entropy should by definition be un-predictable. A simulated environment IS indeed fully predictable. (Just run the same simulation twice)
      • instead clients ALSO USE a driver for (pseudo-) hardware RNG :
          They load a driver like the VirtIO mentionned a couple of pools bellow. And the host will simulate a CPU with a RNG inside the virtual machine. Thus the clients can get true (or at least better) random numbers, as they recieve real actual numbers through the virtual simulated RNG generated out of real random numbers produced by the virtual host (with optional hardware support on the host, so the production keeps up if there's a lot of demand from multiple client machines).

    Got it ?
    No PRNG.
    Virtual machines has an emulated "(pseudo-)hardware support" which passes actual random number produced by the real host using actual hardware support.
    The number are truly random.

    This is already available and used since some time.
    TFA has no value as "Oh my god, Linux is going to break appart now".
    TFA should only be used as an alarm to advise admin who didn't start using such more secure entropy systems yet that, well, they should seriously consider starting to use the "(pseudo-)hardware support".

    I hope I made my self more clear.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  59. Virtual vs. Virtual by DrYak · · Score: 1

    BTW:
    All my explanation is about situation with fully virtualized clients (the emulators emulates a complete hardware machine for each client).

    But with linux, there's also other situations, where the machine is only partially virtualized with operating system level virtualisation.

    In that situation each virtual machine is a separately compartmented stack of user space software, but all running on the same single copy of kernel (which might by modified in order to be able to manage several such compartement).

    This is available on linux with Linux VServer and OpenVZ (both use special kernel modules to manage virtual compartments), and a special "Linux-on-Linux" mode of QEMU (fully user-space software, it just passes kernel and library calls from software run inside the emulator to the actual system).

    In these situation, there are several virtual machine clients, but all running on 1 single host kernel. If that kernel can produce random number, all host get true random numbers. If that kernel has (true) hardware support for a hardware entropy source, all virtual client get benefit from it. (without needing a driver for a virtual source like in my previous explanation)

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]