Slashdot Mirror


Exploiting Network Captures For Truer Randomness

First time accepted submitter ronaldm writes "As a composer who uses computers for anything and everything from engraving to live performance projects, it's periodically of some concern that computers do exactly what they're supposed to do — what they're told. Introducing imperfections into music to make it sound more 'natural' is nothing new: yet it still troubles me that picking up random data from /dev/random to do this is well, cheating. It's not random. It bugs me. So, short of bringing in and using an atomic source, here's a way to embrace natural randomness — and bring your packet captures to life!"

189 comments

  1. What universe does this guy live in? by MichaelSmith · · Score: 1

    computers do exactly what they're supposed to do — what they're told.

    90% of my day job is a bunch of engineers standing around scratching our heads trying to brainstorm ways to figure out what the hell is going on with our system. We don't even know what it is doing, let along being able to tell it what to do.

    1. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      computers do exactly what they're supposed to do — what they're told.

      90% of my day job is a bunch of engineers standing around scratching our heads trying to brainstorm ways to figure out what the hell is going on with our system. We don't even know what it is doing, let along being able to tell it what to do.

      As a function of their programming computers will always do what they are told to do - to suggest otherwise also suggests that computers have some form of intelligence.

      Hardware failures aside, programming bugs introduced by humans are the cause of every issue you might encounter while using any system. The bug prevents your system doing what you think it should do, but it is only doing what it has been told to do.

    2. Re:What universe does this guy live in? by MichaelSmith · · Score: 1

      As a function of their programming computers will always do what they are told to do - to suggest otherwise also suggests that computers have some form of intelligence.

      The ocean does not do what it is told, but it is not intelligent.

    3. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      As a function of their programming computers will always do what they are told to do - to suggest otherwise also suggests that computers have some form of intelligence.

      The ocean does not do what it is told, but it is not intelligent.

      Yes it does, it does exactly what the laws of physics tell it to do. Not unless you are referring to King Canute, he was quite obviously a raving lunatic

    4. Re:What universe does this guy live in? by Em+Adespoton · · Score: 2

      Are you sure about those two statements?

      However, you do have a point... while computer theoretical models do exactly what they're told to do, as soon as you introduce a physical implementation, the computer will do whatever its environment tells it to do -- this is not always the same thing as what the computer operator tells it to do.

      Similarly, the ocean does exactly as it is told to do... of course, this interaction is so complex, that a mere human being would be unable to untangle all of the instructions given to the ocean by various external influences.

      Also, I'd argue that it is highly possible for a multiorganism as large as an ocean to have sentience... maybe it's just hiding this fact from us mere humans because it's smart enough to know that's a good move... maybe it's even smarter than that, and doesn't think us lower lifeforms have anything more to contribute than we would consider carrying on a conversation or discussing ethics with a top quark.

    5. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      He uses a MAC. The dictates of his religion state that MACs are perfect and have zero problems. Show some respect! His God just died and hasn't came back yet!

    6. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      Don't belabor the fucking point.

    7. Re:What universe does this guy live in? by maxwell+demon · · Score: 1

      Don't belabor the fucking point.

      Why? Do you fear the ocean is listening?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    8. Re:What universe does this guy live in? by Rockoon · · Score: 1

      The ocean does not do what it is told

      I am 100% certain that each particle within the ocean follows one very simple rule. They all follow the path of least resistance. Each and every one of them.

      --
      "His name was James Damore."
    9. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      Ever see "bugs" that only occur on one of your testing machines because one bit in memory is flipping (or is failing to)? Ever spend a day debugging one of those figuring it was a memory stomp or something, only to have it end up being a hardware issue? Yeeeeaaah.

    10. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      Don't belabor the fucking point.

      Why? Do you fear the ocean is listening?

      No, my condescending sarcastic pal. Because anyone who understands what a machine is already knew everything discussed in this thread. Anyone who didn't already understand what a machine is needs remedial education far beyond repetitious posts about the inability to write perfect software.

      You see, it is not a matter of taste or preference. It is pointless mental masturbation. Really it is like a circle-jerk since lots of them are repeating the same thing to each other and egging each other on to see who can find a new way to restate the same information. It bothers you that I notice? Does that break the spell or something?

    11. Re:What universe does this guy live in? by zAPPzAPP · · Score: 1

      No, I am sorry to tell you, that you are wrong.
      Computers will not always do what you tell them. Sometimes they instead to something else.
      This is what you call a bug.
      If this happens you will stand there, scratching your head, and try to figure out what is going on.

      Your argument, that this is only because the programmer told them to do that, is flawed. It could be a hardware bug. In that case it is because the hardware engineer "told" the computer to do it. Or is could be a broken part, in which case the manufacturer is at fault maybe?
      In any case, the user sitting in front of the screen will tell the computer to do something and then shit happens.

    12. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      Computers do exactly what they're told to do. Blame your programmers if they can't figure out wtf their code does.

    13. Re:What universe does this guy live in? by maxwell+demon · · Score: 1

      Anyone who didn't already understand what a machine is needs remedial education far beyond repetitious posts about the inability to write perfect software.

      Sorry, but as far as I can see the question whether the ocean could have a consciousness isn't considered in any other post, nor is it equivalent to anything another post contains.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    14. Re:What universe does this guy live in? by maxwell+demon · · Score: 1

      He uses a Mandatory Access Code?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    15. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      This guy is dumb as shit if he thinks he's found a quality randomness source

    16. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      What a joke.
      You either :
        1) badly analysed your problems
        2) badly implemented your solution
        3) used a programming language too laxist and implemented like hogs which, yeah, is already covered by 2)

      I feel sorry for you.

    17. Re:What universe does this guy live in? by JorDan+Clock · · Score: 1

      More likely a Media Access Control address...

    18. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      Notta chance. If they were all newtonian particles, in a newtonian universe they sure would. But in this shroidngeresque box, things get crazy. The laws of thermodynamics are statistical observations.

    19. Re:What universe does this guy live in? by hairyfeet · · Score: 1

      Wouldn't it be more of a heisenberg uncertainty principle kind of thing? after all we are talking about millions of lines of code in the average OS, and on top of that who knows how many LOC and how many programs, all interacting or biding for CPU time.

      So I could see how you could have no real bugs per se yet still have random quirks, simply because each person while doing just fine on their own particular piece of the puzzle and not seeing how each will be affected by the whole, especially with regards to third part programs.

      As for TFA and wanting random numbers here is something I'v always wondered, and not being a random number guy I might be missing some 'hidden pattern' or something, but why not use the sports page? Take the scores from the first game listed of each sport, then the second and so on. that should give you a pretty decent range from single digits of boxing to the sometimes triple digit basketball outcomes, that would give you a pretty decent spread to work with wouldn't it? You could even do a letter to number substitution on team names, like say picking the first name from every third team and the second name from every fourth.

      Anyway i know stocks and the market as a whole generally follows patterns so it probably wouldn't be a good source but if one picked random teams or even as i said the first score from each sport playing one would have a pretty wide variable for a random number generator to use as a seed, wouldn't you?

      --
      ACs don't waste your time replying, your posts are never seen by me.
    20. Re:What universe does this guy live in? by swalve · · Score: 1

      A bug is not some kind of magic. The computer is following an erroneous instruction.

    21. Re:What universe does this guy live in? by swalve · · Score: 1

      If one bit matters, you should be using ECC.

    22. Re:What universe does this guy live in? by kmoser · · Score: 1

      90% of my day job is a bunch of engineers standing around scratching our heads trying to brainstorm ways to figure out what the hell is going on with our system. We don't even know what it is doing, let along being able to tell it what to do.

      Oh, you work for Microsoft?

    23. Re:What universe does this guy live in? by MichaelSmith · · Score: 1

      90% of my day job is a bunch of engineers standing around scratching our heads trying to brainstorm ways to figure out what the hell is going on with our system. We don't even know what it is doing, let along being able to tell it what to do.

      Oh, you work for Microsoft?

      No I work in a place where our internal library has a copy of I sing the body electronic and we all laugh about it knowingly.

    24. Re:What universe does this guy live in? by akanouras · · Score: 1

      Also, I'd argue that it is highly possible for a multiorganism as large as an ocean to have sentience...

      Solaris?

    25. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      Because for individual computers this is just true.

    26. Re:What universe does this guy live in? by spazzmo · · Score: 1

      Including cosmic-ray bit-flipping

      --
      The cheese stands alone...
    27. Re:What universe does this guy live in? by ardeez · · Score: 1

      In that case you need to get better engineers!

      Computer systems should always be exactly deterministic. Since they operate on a very specific
      set of instructions (check source code for details), you should *always* be able to determine how they
      will act given a specific set of inputs.

      If you can't, then you need to drastically reduce the complexity of your systems to a level that these
      poor engineers are comfortable with and then work up from that.

      Because, at the end of the day (barring hardware glitches), computers do do exactly what they're told to do.
      It's not witchcraft.

      --
      don't be a spelling loser
    28. Re:What universe does this guy live in? by MichaelSmith · · Score: 1

      While complex, distributed systems may be deterministic, its hard to prove that they are. The systems I have seen are on the bleeding edge of maintainability. They sit on that edge because customers and marketing demand certain functions, while the producer of the software demands features which increase market share and product definition. Engineers have very little say in the matter.

    29. Re:What universe does this guy live in? by matfud · · Score: 1

      If you have more then one thread running and they interact you no longer necessarily have a deterministic system. If you distribute it it gets even worse. Even in small embedded realtime systems you can get non-deterministic behaviour.

    30. Re:What universe does this guy live in? by ardeez · · Score: 1

      What do you mean by 'interact' ?
      What do you mean by 'distribute it'?

      When you have multi-threaded system then it's usually easy enough to compartment
      (or isolate) the data that each thread is working on and provide locking mechanisms to ensure that
      where threads do have to share data, they do so in a controlled deterministic fashion.

      If they don't , then that's a bug.
      Which brings me back to my original point. If it's too complex to understand what's
      going on all the time, then you need to reduce complexity. Or get some engineers onboard
      that know how to handle concurrency.

      --
      don't be a spelling loser
    31. Re:What universe does this guy live in? by Anonymous Coward · · Score: 0

      It doesn't matter that computers are deterministic, because you usually have to figure out what someone else's code is doing. And nothing is less predictable than what other programmers come up with!

    32. Re:What universe does this guy live in? by HalAtWork · · Score: 1

      That's because you're talking to software (or even firmware) that has hidden/obfuscated routines (i.e. you don't have the source). If it's open all the way, you can track down exactly what is happening, and even fix it, or it can even expose a flaw with the input you have provided. Either way, it's much easier to solve the issue.

    33. Re:What universe does this guy live in? by zAPPzAPP · · Score: 1

      Which still has the effect that it does not do, what the user told him to do.
      To the user, the computer is a package of physics, hardware and software. To him it does not matter at which of these points it fails, the effect is the same.

    34. Re:What universe does this guy live in? by matfud · · Score: 1

      By interact I mean access a shared resource. (memory or other)
      By distribute I mean distribute over multiple processors.
      Isolated data is not a shared resource.
      Synchronisation is normally used to provide consistency of the shared resource but not often used to provide overall ordering with regards to accessing it. Hence non determinism. If you can't tell which thread gets to access the shared resource and in which order, the program is no longer deterministic.

      non-determinism of this type isn't inherently bad you just have to ensure that it does not matter. or force ordered access when that is possible (not always)
      Think of a shared linked list as an example. The order of access by the reader and writer is non-deterministic and does not matter except when the list is empty or full when you have to impose and overall order. (writer first, reader first respectively)

      No software is simple. Very little software can be analysed effectively. Unless you understand everything from the current machine state, all inputs and exactly what and when they happen, the hardware down to memory refresh, latency cache behaviour, OS behaviour, scheduling policy, other processes and states and their inputs, in addition to your software. It is complex, there is no simple software any more. Even if you claim that that is deterministic then you can still become unstuck if you have multiple physical processors and get non-deterministic behaviour. Note that this has little to do with most issues people have when they claim a computer does such-and-such arbitrarily.

    35. Re:What universe does this guy live in? by ZenDragon · · Score: 1

      Having worked in a VERY large data center, with hardware from many different manufacturers and functions, I have found this to not always be the case. When you have large systems interacting as such, one single bug may cause a chain reaction of events that are different every time it is triggered. Stack traces, network dumps, etc, all vastly different. What is truly random may not be the "instructions" themselves but the usage patterns of the users, and thus the processes on those machines as a result of that erroneous instruction. Its like playing Plinko, both the board and the game piece follow a simple set of rules, but the path of the game piece is and always will be truly unique each and every time.

    36. Re:What universe does this guy live in? by drcheap · · Score: 1

      As a function of their programming computers will always do what they are told to do - to suggest otherwise also suggests that computers have some form of intelligence.

      The ocean does not do what it is told, but it is not intelligent.

      Congratulations, you have just proven that the ocean is not a computer. What's next, proving that your pet rock is not a toaster?

    37. Re:What universe does this guy live in? by ardeez · · Score: 1

      >Synchronisation is normally used to provide consistency of the shared resource but not often used to provide overall ordering with regards to accessing it.
      >Hence non determinism. If you can't tell which thread gets to access the shared resource and in which order, the program is no longer deterministic.

      I am really struggling to imagine a situation where you need to determine ahead of time the order in which a number
      of threads need to access a shared resource in.

      If the thing needs to be accessed in a specific order, then doesn't it mean that you should just have one thread
      operating on that data, since it's by nature a sequential process, no?

      The other scenario is where an item might be transitioned to different states as it's changed by, e.g. the result of
      some async io (quite a common scenario). But then you use a state engine to ensure that the thing is in a determined
      state at all times - and you never care about which thread's going to access it next because every thread should
      be capable of moving the item forward to its desired end-state.

      >If you can't tell which thread gets to access the shared resource and in which order
      If you need to set the order in which threads are accessing a resource, I think somewhere you're doing
      it very wrong. But if you have a specific example of where that's necessary I'd love to hear it.

      --
      don't be a spelling loser
    38. Re:What universe does this guy live in? by matfud · · Score: 1

      Real time systems encounter this ordering problem. They are simple by comparison to most software running today. Priority inversion http://en.wikipedia.org/wiki/Priority_inversion
      It is not common. Engineers spend a lot of time trying to ensure it does not occur. It is a result of the ordering of access to a shared resource causing a high priority task to be de-scheduled. That is a specific circumstance. pre-emptive schedulers do cause problems so please do not discount them.

  2. Random by somersault · · Score: 4, Insightful

    The imperfections in music aren't perfectly random either, so what's the big deal?

    --
    which is totally what she said
    1. Re:Random by PopeRatzo · · Score: 4, Insightful

      The imperfections in music aren't perfectly random either, so what's the big deal?

      Most insightful comment on this story. Period.

      Even if we could get perfect randomness in our art, it wouldn't really matter because the humans who see it or hear it will just try to impose some order on that randomness. It's what we do.

      Instead of randomness, what I seek to add to my sounds in the music I make is complexity. That's what makes for a rich sound.

      For example, if you look at the harmonics in a struck piano string or plucked guitar or bowed violin, they appear at predictable places. Now look at the harmonics in a free reed instrument, such as a chromatic harmonica. All sorts of weird places, strange ratios. It's what gives the chromatic such a distinctive, heart-rending timbre. Listen to the album Affinity by Bill Evans and Toots Theilemans and you can see why Evans decided to record his masterwork with a "trivial" instrument like the chromatic harp. It's basically a shaped noise generator with pitch.

      Similarly, listen to the digital sound used in "Sky Saw" in Brian Eno's Another Green World album. A simple waveform made extremely complex using god knows what filthy circuitry and it feels like someone is sticking the motor from a pair of hair clippers up your butt (not that I would know what that feels like since I would never, ever do such a thing since I turned 40).

      It can be easy, or hard, using pseudo-random algorithms in MaxDSP but it's the complexity that makes the sound do it's business. Except when it's simple, like a flute which is basically a sine wave. Oh never mind. I hate thinking about this stuff. It's a waste of time and I left my days as a theorist behind me. I'll let the young guys like the lad in the article worry about how pure the randomness is in the sounds he uses. It'll keep him occupied until inspiration comes along.

      --
      You are welcome on my lawn.
    2. Re:Random by Lord+Lode · · Score: 1

      For crypto, you need *Perfect* random indeed, but for music, a pseudorandom generator should surely be enough?

    3. Re:Random by Anonymous Coward · · Score: 0

      Not having a life and something like this being so important that one blows it up to such proportions, instead of making bigger plans for something with actual importance. That's the big deal here. ^^

      I suggest a bottle of GetALife (TM) industrial-strength booze, a sixpack of hookers, and a wingsuit to gain some perspective. ;)
      And then some vision and inspiration.

    4. Re:Random by The+Askylist · · Score: 2
      And there's nothing to substitute for the variations in timing that come from humans playing the instruments.

      Whether it's Sly and Robbie or George Shearing (sorry new music fans - I really don't like most modern crap), it's that slight movement ahead or behind the beat, and the control of it that adds emotion and a certain thrill to a tune.

      On the harmonica - give me Larry Adler any day :-P

    5. Re:Random by dotancohen · · Score: 1

      The imperfections in music aren't perfectly random either, so what's the big deal?

      http://dilbert.com/strips/comic/2001-10-25/

      --
      It is dangerous to be right when the government is wrong.
    6. Re:Random by PopeRatzo · · Score: 1

      On the harmonica - give me Larry Adler any day :-P

      Of course, Adler is terrific. The album he made with Sir George Martin producing of Gershwin tunes is just spectacular (especially "But Not for Me" with vocal by Elvis Costello - yes, you read that right).

      But you have got to hear Hendrik Meurkens. He's a German (or maybe Belgian?) chromatic harmonica player who is wonderful. I have to be careful how much I listen to his recordings or I'm liable to toss my rather expensive Gregoire Maret chrom right out the window.

      Seriously, check him out if you haven't heard him. It's the music of the angels. Also, take a listen to some of Gregoire Maret's playing. It's not for nothing that Suzuki named their premiere instrument after him.

      --
      You are welcome on my lawn.
    7. Re:Random by swalve · · Score: 1

      In the hands of a musician, however, it is not random.

    8. Re:Random by jones_supa · · Score: 1

      I also don't see why pseudo-random would not be enough for all art forms. It's so miniscule difference in that context after all.

    9. Re:Random by repvik · · Score: 1

      Yes it is.

    10. Re:Random by Anonymous Coward · · Score: 0

      Perhaps the less random nature of what he calls natural randomness gives him more natural sounding results. Or, what's more likely, this is the equivalent of buying $500 cat5 cables because they cause less destortion in the 1s and 0s.

    11. Re:Random by drcheap · · Score: 1

      Perhaps the less random nature of what he calls natural randomness gives him more natural sounding results. Or, what's more likely, this is the equivalent of buying $500 cat5 cables because they cause less destortion in the 1s and 0s.

      Yeah, those $500 cat8 cords are no good, they reduce the randomness in your network packets, which in turn reduces the quality of your computer synthesized music. Buy cheap network cables, that is the point of TFA.

  3. Why reinvent the wheel? by Anonymous Coward · · Score: 1

    Can't you just ask the user to make some random mouse movements or keystrokes?

    1. Re:Why reinvent the wheel? by CodeReign · · Score: 0

      because that's exactly what /dev/random does. And if he/she is referring to urandom, it still refreshes the seed when new entropy such as key strokes are added to the system. I don't think that he/she understands that /dev/random is as close to random as a packet capture will be. Infact as many frames will have similar headers similar content like http traffic /dev/random will provide much more entropy than packet captures.

    2. Re:Why reinvent the wheel? by rtfa-troll · · Score: 1

      Yes, you're right. Network data isn't very random. We need to start looking for more sources. No, wait a second I know, how about we advance this concept and look for a random number generator that an expert in the field has designed. Perhaps we could even use /dev/random which takes a big bunch of hardware randomness sources and mixes them together to produce about as perfect randomness as we will achieve short of having a quantum randomness source. Oh.</extreme_sarcasm>

      --
      =~ s,(.*),<sarcasm>$1</sarcasm>,g if any_point_you_wish();
  4. If I would by santax · · Score: 0

    I would sell you the anwser. Random on computing does not exist. It's the biggest problem we have to solve. After that, we can create secure encryption. Good luck with this one, if you find a truely random way, let us know. You will be awarded a nobel-price.

    1. Re:If I would by santax · · Score: 1

      shite... if i 'could' not would :(

    2. Re:If I would by YodasEvilTwin · · Score: 1

      And "Nobel Prize," not "nobel-price."

    3. Re:If I would by JabberWokky · · Score: 5, Informative

      Actually, many people would sell you the answer. And they don't have nobel-prices[sic].

      See http://en.wikipedia.org/wiki/Hardware_random_number_generator for an overview of the devices you're looking for.

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    4. Re:If I would by santax · · Score: 1

      Still not random. If you can (and I am glad to admit this is impossible hard as far as I know) capture the 'surroundings' one on one, this is still not random enough. But still a good read and link.

    5. Re:If I would by SuricouRaven · · Score: 1

      Pure randomness is easy to get. Just not in a deterministic environment like a computer. I could cobble together a source of true randomness from a smoke detector and a handful of transistors. Quantum random, the best there is. If you want lots of random, you can buy devices that plug into an expansion slot to provide it.

    6. Re:If I would by maxwell+demon · · Score: 2

      Those using quantum effects cannot be predicted even if you had a device to monitor the complete surroundings.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    7. Re:If I would by scheme · · Score: 1

      Still not random. If you can (and I am glad to admit this is impossible hard as far as I know) capture the 'surroundings' one on one, this is still not random enough. But still a good read and link.

      'Capturing the surroundings' still won't help you do any predictions for sources with quantum randomness. At best you can say that a source would exhibit a certain behaviour x% of the time. Quantum systems are not deterministic so even with perfect state information, you can only give probabilities that certain things happen. If you know otherwise, feel free to let others know and collect your nobel prize(s).

      --
      "When you sit with a nice girl for two hours, it seems like two minutes. When you sit on a hot stove for two minutes, it
    8. Re:If I would by santax · · Score: 1

      I didn't know the quamtum devies where being sold allready. But for the rest I agree with you. Quantum is the way to go forward as it seems.

    9. Re:If I would by hedwards · · Score: 1

      That's rather a random task to take on as an odd job.

    10. Re:If I would by colinrichardday · · Score: 1

      You will be awarded a nobel-price.

      A nobel-price? What is that, the cost of a stick of dynamite?

    11. Re:If I would by Baloroth · · Score: 1

      Radioactive decay alone is enough to get true randomness. And there are several other (non-quantum) where 'capturing the surroundings' is actually considered theoretically impossible. Simple example would be Brownian motion (plus, it would give any amount of randomness desired from as small a sample as you want! Sort of anyways), which is actually what several of those techniques end up using (Brownian motion is just random thermal noise.) Technically, it is only non-random if you are able to predict the motion of billions of atoms simultaneously. That is very nearly utterly impossible.

      --
      "None can love freedom heartily, but good men; the rest love not freedom, but license." --John Milton
    12. Re:If I would by grim4593 · · Score: 1

      Just because something is quantum does not mean it is inherently special. Optical devices like photo-transistors have to deal with shot noise caused by quantum effects.
      See http://en.wikipedia.org/wiki/Shot_noise#In_optics. Those kinds of effects can be leveraged for randomness.

    13. Re:If I would by gweihir · · Score: 1

      What utter nonsense. There is nothing to solve here and plenty of sources for true randomness available.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    14. Re:If I would by rtfa-troll · · Score: 1

      Still not random.

      A true Nobel prize awaits your proof that quantum randomness is not truly random. We are in awe.

      --
      =~ s,(.*),<sarcasm>$1</sarcasm>,g if any_point_you_wish();
    15. Re:If I would by Dwonis · · Score: 1

      If you monitor the complete surroundings, then you are monitoring the output of these devices. Any kind of noise that is unpredictable to your attacker will work; it doesn't need to be OMG QUANTUM!

    16. Re:If I would by mollymoo · · Score: 1

      Randomness is easy, but turning that into unbiased random numbers in the right range is a damn sight harder.

      --
      Chernobyl 'not a wildlife haven' - BBC News
  5. How is that more random? by AuMatar · · Score: 2

    The vast majority of traffic is either html or email. Very structured data. It's sufficiently random to use for a video game or the like, but it's definitely not random from a cryptography point of view. So you're doing things the hard way with no discernible benefit. Total waste of time.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  6. What the cluck? by YodasEvilTwin · · Score: 5, Insightful

    Network captures do not embody "natural randomness". Packets are produced by computers too, not by the entropy of the universe or something. This guy has toked a little too much ganja. They're probably not even as random as a regular pseudorandom number generator. The latter makes some guarantees with regards to what you'll get out and ensures that no basic patterns are present. Network captures don't have these features. Depending on the computer, the network, and so on the incoming packets may be quite deliberate and ordered.

    1. Re:What the cluck? by LordLimecat · · Score: 1

      Well, to be fair, hes taking the packet checksums, but in theory those could be predictable as well. They probably wouldnt be "ordered", however.

    2. Re:What the cluck? by gweihir · · Score: 1

      The packet checksums are about as non-random as you can get. There is no timing/jitter/... at all in these! This is really stupid. Even /dev/urandom is of far, far superior quality.

      I strongly advise the OP to actually try understand the issue before posting such utterly clueless nonsense.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    3. Re:What the cluck? by drcheap · · Score: 1

      I agree, and I think random is the wrong choice of word for TFA. Network packet flow isn't random at all, but nonetheless it's quite unpredictable, quite chaotic, and constantly changing. In other words there are no easily (by humans at least) discernible patterns, which makes it great for injecting into something with a strictly defined pattern (music) to disrupt it enough that it tricks the human brain.

  7. /dev/random by Anonymous Coward · · Score: 3, Informative

    This seems like a fairly lame variant of the environmental entropy gathering which *is* what /dev/random does...

    1. Re:/dev/random by gweihir · · Score: 1

      Indeed. And of much, much lower quality. The OP is a clueless hack.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:/dev/random by Anonymous Coward · · Score: 0

      #37964012 gweihir: "Clueless BS" #37964038 gweihir: "The OP is a clueless hack." #37964044 gweihir: "OP is clueless" Tourettes, much?

    3. Re:/dev/random by gweihir · · Score: 1

      No. Just really pissed off at this BS getting a /. story. The editors should know better.

      I do detect some OC behavior on you part though...

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    4. Re:/dev/random by qvatch · · Score: 1

      yes, but its not /human/ enough.

  8. I thought /dev/random already looked for entropy.. by tiffany352 · · Score: 2

    I recall reading that /dev/random will pull from any system modules that are capable of being noisey. Like radios or network equipment. It would make sense too. Also, network packets are not a very good source of entropy. Atmospheric noise from a radio is. Network packets have structured data being sent through them, often in the form of english text.

  9. Why not atomic? by nten · · Score: 2

    The lavarnd.org folks have all the source you need and a reference implementation that literally is webcam stuffed in a dark can. When you can get such high quality entropy for less than US $30, it seems like anything else must just be for fun. Some opaque tape over the camera on many laptops should work fine too.

    --
    refactor the law, its bloated, confusing and unmaintainable.
    1. Re:Why not atomic? by Em+Adespoton · · Score: 1

      This method has a few added security benefits too :)

  10. boring by larry+bagina · · Score: 1

    web cam + lava lamp is much more exciting.

    --
    Do you even lift?

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

  11. why do you care? by Anonymous Coward · · Score: 0

    1) What the TFA proposes is unlikely to be truly random
    2) There is no reason to care
    3) If you do have a reason to care just go buy one... they aren't that expensive.

  12. Clueless by Anonymous Coward · · Score: 0

    So this guy thinks that /dev/random is not random enough, but his script is? This guy is so wrong he doesn't even understand why he's wrong.

  13. not nearly as "random" as /dev/random by Dahamma · · Score: 5, Informative

    /dev/random on most OS'ed these days uses an entropy pool generated from a bunch of different sources - timing of keystrokes, mouse movements, disk seeking - and yes, network information. Then it uses cryptographic hashes on those.

    Your implementation basically uses one of those entropy sources, and then doesn't even hash it...

    1. Re:not nearly as "random" as /dev/random by Megane · · Score: 1

      This. Submitter does not understand the entropy that can be generated by nothing more a modulus of the delta time between various external events.

      Ask Slashdot: Continually asking to re-invent wheels for over 15 years.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    2. Re:not nearly as "random" as /dev/random by gman003 · · Score: 5, Insightful

      In brief:

      "The generation of random numbers is too important to be left to chance."

      Anyone trying to create a new random number generator with the intent of producing more random numbers, without an extensive and specialized education, is guaranteed to fail.

    3. Re:not nearly as "random" as /dev/random by Anonymous Coward · · Score: 0

      If he can really hear a difference, I have some expensive speaker cables he might want to buy.

    4. Re:not nearly as "random" as /dev/random by snowgirl · · Score: 1

      /dev/random on most OS'ed these days uses an entropy pool generated from a bunch of different sources - timing of keystrokes, mouse movements, disk seeking - and yes, network information. Then it uses cryptographic hashes on those.

      Your implementation basically uses one of those entropy sources, and then doesn't even hash it...

      As I remember, OpenBSD used network details to produce entropy, but later stopped, because it allowed a remote attacker the ability to potentially poison the entropy source by carefully sending just the right packets at the right time. Cryptographically secure randomness for Theo de Radt was only satisfactory when it required physical access to the machine to manipulate.

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    5. Re:not nearly as "random" as /dev/random by pthisis · · Score: 1

      As I remember, OpenBSD used network details to produce entropy, but later stopped, because it allowed a remote attacker the ability to potentially poison the entropy source by carefully sending just the right packets at the right time. Cryptographically secure randomness for Theo de Radt was only satisfactory when it required physical access to the machine to manipulate.

      Something's wrong or lost in communication here. The entropy pool in a /dev/random implementation is designed so that even if an attacker can add a known source of numbers to it, it still doesn't decrease the real entropy in the pool. As long as my entropy estimates are correct, I could let you pick half the bits (or 99% of the bits) going into /dev/random's entropy pool and that still wouldn't help you guess the output. Lowering the entropy count on network traffic (even to zero) makes sense, but so long as you do that there's no reason not to include it as a potential source of bonus entropy.

      In fact, most /dev/random implementations let any user add bits to the pool. Only the root user can increase the entropy estimate, but any bozo can "echo '0000000000000000' > /dev/random"--adding additional stuff to the pool can never hurt, and might help.

      --
      rage, rage against the dying of the light
    6. Re:not nearly as "random" as /dev/random by snowgirl · · Score: 1

      Something's wrong or lost in communication here. The entropy pool in a /dev/random implementation is designed so that even if an attacker can add a known source of numbers to it, it still doesn't decrease the real entropy in the pool. As long as my entropy estimates are correct, I could let you pick half the bits (or 99% of the bits) going into /dev/random's entropy pool and that still wouldn't help you guess the output.

      Yes, but in a server most often there is no keyboard or mouse involved. So, the machines get the vast majority of their entropy from the network.

      And we're talking about Theo de Radt here... it doesn't have to be a RATIONAL threat, it just has to be a theoretical one.

      Going to the source:

      The OpenBSD kernel uses the mouse interrupt timing, network data interrupt latency, inter-keypress timing and disk IO information to fill an entropy pool.

      So, they do use "network data interrupt latency", but not the time between sequential packets, or packet data, or anything that a remote attacker could control.

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    7. Re:not nearly as "random" as /dev/random by gweihir · · Score: 1

      In addition, the problem is solved and there is absolutely no need for a "new random number generator". None at all. What people get consistently wrong is the use of the RNGs that are there, are implemented well and do work well. The RNGs are completely fine.

      What there also is a need for is for people to READ THE F****** DOCUMENTATION before putting complete and utter nonsense as "story" on /. !

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    8. Re:not nearly as "random" as /dev/random by gweihir · · Score: 1

      /dev/random on most OS'ed these days uses an entropy pool generated from a bunch of different sources - timing of keystrokes, mouse movements, disk seeking - and yes, network information. Then it uses cryptographic hashes on those.

      Your implementation basically uses one of those entropy sources, and then doesn't even hash it...

      As I remember, OpenBSD used network details to produce entropy, but later stopped, because it allowed a remote attacker the ability to potentially poison the entropy source by carefully sending just the right packets at the right time. Cryptographically secure randomness for Theo de Radt was only satisfactory when it required physical access to the machine to manipulate.

      And he has it exactly right. Even network timing is suspicious. Network packet content is almost completely non-random and out as a source. And other sources are suspect as well. For example keyboard input timing only has a 70ms resolution (I measured this on two different keyboards as scan-delay), so gives you probably less of 1 bit of entropy per key pressed. Mouse movements are better, as you can use the absolute positions, bit they still need to be used very conservatively.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    9. Re:not nearly as "random" as /dev/random by gweihir · · Score: 1

      There is nothing missing. You can only estimate entropy, and for that you need to make assumptions. What gets broken if an attacker controls the network traffic is the relevant assumptions. With the border condition that an attacker can control all network traffic, the only valid assumption is an entropy content of exactly zero, so you can drop it from entropy gathering.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    10. Re:not nearly as "random" as /dev/random by pthisis · · Score: 1

      And we're talking about Theo de Radt here... it doesn't have to be a RATIONAL threat, it just has to be a theoretical one.

      But that's the point, as long as you set its entropy count to zero it's not even a theoretical threat. It could potentially improve randomness and can't possibly hurt. That's how entropy pools are designed.

      The OpenBSD kernel uses the mouse interrupt timing, network data interrupt latency, inter-keypress timing and disk IO information to fill an entropy pool.

      That makes more sense than ignoring the network entirely.

      --
      rage, rage against the dying of the light
    11. Re:not nearly as "random" as /dev/random by pthisis · · Score: 1

      the only valid assumption is an entropy content of exactly zero, so you can drop it from entropy gathering.

      This is the part that's nonsensical. The usual course of action with something that's relatively high volume and probably contributes entropy but possibly is under attacker control is to lower the estimated entropy count to zero but continue mixing the source into the pool. The worst-case scenario is no gain (but no loss), but it's likely you get some gain and it hedges against accidental overestimates of other entropy sources.

      --
      rage, rage against the dying of the light
    12. Re:not nearly as "random" as /dev/random by gweihir · · Score: 1

      But you cannot get entropy that is there but estimated as zero out of the pool! When reading speed from /dev/random is concerned, this does exactly nothing. Also it does exactly nothing for the amount of other entropy you have to get. So, even though it is hard to understand, you can drop it with no adverse effects and a reduction in code complexity on the plus side.

      Entropy gathering is not a guessing game, if the quality needs to be high. There is no "hedging" involved when this is done right. The estimates have to be hard, reliable lower bounds. Your approach is responsible for several security disasters.

      On the other hand, when doing non-crypto, just use the mersenne-twister and seed it with the time of day with milisecond resolution. This is good enough for practically anything besides creating crypto keys, and the nebulous uneasiness of the OP is just unfounded as he does not understand what he is talking about.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    13. Re:not nearly as "random" as /dev/random by pthisis · · Score: 1

      But you cannot get entropy that is there but estimated as zero out of the pool! When reading speed from /dev/random is concerned, this does exactly nothing. Also it does exactly nothing for the amount of other entropy you have to get. So, even though it is hard to understand, you can drop it with no adverse effects and a reduction in code complexity on the plus side.

      Entropy gathering is not a guessing game, if the quality needs to be high. There is no "hedging" involved when this is done right. The estimates have to be hard, reliable lower bounds.

      That's not how it works in practice. In practice, entropy gathering _is_ a guessing game. Things like timing between keystrokes are added to the pool, with guesses as to the amount of entropy they add. If an attacker has, say, a microphone in the room then those guesses can be off--sometimes dramatically. In real life, it's always possible that any source is compromised. Consequently, very conservative estimates are made with the belief that if one entropy source is compromised, the margins for error built in other places will compensate and keep the random device secure.

      In fact, several OSes have moved to using cryptographic PRNGs instead of straight entropy-pool based systems for /dev/random (FreeBSD, for instance, uses Yarrow and /dev/urandom is a symlink to /dev/random) precisely because entropy gathering is a guessing game

      Something like the timing of network packets is certainly a potentially useful hedge (and, as noted upthread, even OpenBSD does indeed use such information, with a non-zero entropy estimate).

      It's also the only thing that makes the /dev/random behaviour (where any user can add arbitrary information to the pool) make sense: adding stuff to the pool can only help security, not hurt it.

      --
      rage, rage against the dying of the light
  14. randomness by Anonymous Coward · · Score: 0

    you can never get true randomness on computer, it is literally mathematically and scientifically impossible

    1. Re:randomness by Yaur · · Score: 1

      Sure you can, you just need dedicated hardware for it.

    2. Re:randomness by maxwell+demon · · Score: 1

      Wrong. You cannot get true randomness algorithmically, but every computer is connected to several input devices. For example, the noise on your sound card is exacty that: Physical noise of the analog circuit. That's about as random as any physical process can be.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:randomness by folderol · · Score: 1

      The hardware consisting of 1 noise diode (yes they do exist) and one Op-Amp.

  15. Easy by Anonymous Coward · · Score: 0

    www.random.org

  16. Confusion... by Junta · · Score: 3, Insightful

    /dev/random is about as random as you'll get. I presume your issue is that the pool is exhausted for the given desire. /dev/urandom is your endless of supply of 'good-enough' random for something like this. If your criticism is that it isn't really 'random', it's no less random than your pcap stream. Besides, given the application 'true' randomness will not be distinguishable from good pseudo-random.

    If you wanted to be random and artistic, then maybe point a webcam at a fireplace or something as an entropy source.

    --
    XML is like violence. If it doesn't solve the problem, use more.
    1. Re:Confusion... by impaledsunset · · Score: 0

      Point a webcam at a fireplace? Boy...

      - I have a ham radio modified to record secret police channels so that I can catch them when they are involved in secret government plots against us
      - I'm recording the data from a distant radio source with my telescope - I'm certain it's the aliens contacting us, even if <a href="https://wwws.whitehouse.gov/petitions#!/response/searching-et-no-evidence-yet">they are denying it</a>!
      - I'm recording the sound of me masturbating to my new Star Trek Linux desktop theme while listening to the new OpenBSD release songs
      - I have a camera with a telescoping lens pointed at the cute geek girl next door while she's masturbating
      - I'm downloading the video series "How to talk with girls without creeping them out"

      Then, I'm XORing the five sources together, which produces a stream with entropy good enough to satisfy my randomness needs.

    2. Re:Confusion... by emj · · Score: 2

      Then, I'm XORing the five sources together, which produces a stream with entropy good enough to satisfy my randomness needs.

      I tell you all that you do not want to read about parents "needs". Disturbing!

    3. Re:Confusion... by gman003 · · Score: 2

      Or just grab a computer with a VIA Nano CPU - they have a built-in true random-number generator, based on thermal and/or electric variances inside the processor. They claim "up to 1600 kilobits per second", so it should provide more than enough for music, provided you aren't adding bit-for-bit random noise in real time.

    4. Re:Confusion... by ronaldm · · Score: 3, Informative

      I'm going to reply to just the one poster, as explaining this to each /.'r would take rather a long time! :)

      First and foremost, Slashdot (as you know) unfortunately chooses the URL for your particular story. "Truer[sic] Randomness" is not in fact what I'm going out to somehow magically solve (with my absolute non-background in cryptography etc.). As to why they chose to enter the title of the story as such - I don't know. A bit of sensationalism, perhaps? In any case, I'd originally titled this "Musical Network Captures" - no more, no less!

      Why not use /dev/random? It's not random per se which is required - it's a pseudo-random source which can still be directly influenced by those in the immediate environment. For installation purposes, for example, it's a quick (unorthodox, convoluted, fucked-up, whatever-you-wanna-call it) way of generating an input that can be used to further modulate other inputs/sounds. For this, a stream of random numbers alone is not good enough. There's a million and one ways this could have been done - it just so happens that this is how I decided I'd go about doing it.

      Finally, I'm a bit overwhelmed by the whole Slashdot thing. As it's all worked out, it seems that on my first 'go' at adding something that I thought a couple of people would be interested in, it's seemed to hit the front page - and so at least, next time, I'll know to not be so trigger-happy when I'm 'submitting' something to here! Apologies for all of you who seem to have fallen out with one another and spent half your time bickering over nothing.

      --R

    5. Re:Confusion... by Chelloveck · · Score: 2

      Sorry that you feel like your corn flakes have been pissed in, but you can't go blaming this on the editor's bad choice of headlines. Your own submission says "[...] yet it still troubles me that picking up random data from /dev/random to do this is well, cheating. It's not random. It bugs me." Then you go on to describe a mechanism that's far, far less random than /dev/random or any halfway decent pseudo-random number generator.

      Your blog post doesn't actually try to say that the network captures are random, just that they're a good source of variation for this purpose. I, and probably the majority of the Slasdot crowd, have to complaint with that. It may even be true that the *non* random qualities of the network traffic make it a more pleasing source of noise than a truly random source.

      But that's not what the Slashdot submission says. It baldly states that you don't think /dev/random is random enough, and that "short of bringing in and using an atomic source" the network captures are a good source of randomness. Okay, that doesn't exactly say that you think network captures are more random than /dev/random, but it sure the heck implies it.

      And that's what's raised our collective hackles. If your submission had read, "Hey, here's an interesting source of noise to make computer-generated music more natural-sounding." I don't think anyone would have complained. It is interesting, especially if it turns out that it produces a more pleasing result than truly random noise. The complaint is about your use of the term "random", which has a strict mathematical definition that is not very well satisfied by network traffic.

      So, I'm sorry we beat you up over the summary rather than the actual article, but this is Slashdot. The summary had better be good, because no one ever reads the article.

      --
      Chelloveck
      I give up on debugging. From now on, SIGSEGV is a feature.
    6. Re:Confusion... by ronaldm · · Score: 1

      So, I'm sorry we beat you up over the summary rather than the actual article, but this is Slashdot. The summary had better be good, because no one ever reads the article.

      Fair :) I'll just have to be more careful in future.

    7. Re:Confusion... by L4t3r4lu5 · · Score: 1

      Thermal / electrical variances are linked by virtue of the fact that resistance in the circuit will increase output heat. I'm not saying that the output of the (P)RNG is predictable in any meaningful way, just that it's not really a true random number generator, and more than likely indistinguishable from the output of /dev/random.

      If anything, that's not a bad thing though. It means they're both "random enough".

      --
      Finally had enough. Come see us over at https://soylentnews.org/
    8. Re:Confusion... by xouumalperxe · · Score: 1

      Except you're not looking at the temperature as a whole. Idea is that if, say, you have fluctuations on the magnitude of 1 degree, you're measuring what's happening at the 10^-2 degree scale, with a thermometer with 10^-4 degree precision. The idea here is whatever patterns can be discerned are happening at a much higher magnitude, so the third or fourth digit is effectively random, while not measuring at so low a magnitude that any bias in the sensor at close to its rated precision isn't introducing a pattern by itself.

  17. Mod parent up by impaledsunset · · Score: 3, Interesting

    /dev/random is already gathering environmental entropy from hardware sources and (except if you're running it on a virtual machine), it should produce data with good entropy that's truly random and is not comping from a pseudo RNG algorithm.

    Now, of course, if you XOR it with the network data you might increase entropy, but if it happens that /dev/random already uses it, you're not gaining anything, or in fact make things worse.

    But, please, if you think that /dev/random isn't providing data that's random enough, suggestions and patches would be welcome. Even if they don't get accepted in the mainline kernel, you can still distribute them.

    Another issue: I'd encrypt the data from the network source or XOR it with a pseudo RNG, because otherwise you might be leaking sensitive data through your "random" numbers.

    1. Re:Mod parent up by Anonymous Coward · · Score: 0

      If you listen to Another one bites the dust, backwards, it says I want to be a hunter too, yes I want to be a hunter too!

    2. Re:Mod parent up by Dahamma · · Score: 1

      Another issue: I'd encrypt the data from the network source or XOR it with a pseudo RNG, because otherwise you might be leaking sensitive data through your "random" numbers.

      I bet everyone was wondering why all of his music sounded like bad Internet porn videos lately...

  18. Randomness is not an objective thing by Hentes · · Score: 1

    Something is random if you don't have the information to predict it. Distinguishing between "false" and "true" randomness is pointless.

    1. Re:Randomness is not an objective thing by maxwell+demon · · Score: 1

      In quantum mechanics, randomness occurs at the fundamental level. That is, not only do you not have the information to predict it, the universe itself does not contain that information.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:Randomness is not an objective thing by SuricouRaven · · Score: 1

      False: You don't have the information, but the information could, in princible, by obtained. Even if it would require omniscience.
      True: So random that the information to predict it does not exist anywhere, even if you had a hypercomputer and knew the positions of every particle in the universe down to the limits of uncertainty.

    3. Re:Randomness is not an objective thing by FrangoAssado · · Score: 2

      Distinguishing between "false" and "true" randomness is pointless.

      Not really, it's done all the time for many different purposes.

      Take, for example, how computer scientists define it: roughly, a sequence is random if it can't be compressed, that is, any (program+data) that generates it must be at least as large than the sequence itself. It distinguishes between "random" and "not having enough information to predict it": it doesn't matter if it looks random to YOU; if it could in principle be compressed, it's not random.

      That's not pointless hair splitting, it has real consequences for many areas of computer science, some very practical (cryptography, for example).

    4. Re:Randomness is not an objective thing by Rockoon · · Score: 1

      No, sorry.

      The problem with your theory is that a truly random source can and will generate compressible data sometimes, or else it isnt a fucking truly random source.

      This is why great minds have coined phrases like "Random numbers are too important to be left to chance" (Robert Coveyou)

      In practice people want certain constraints, such as a guarantee not to generate a sequence of 10000 zeros.

      "For your convenience we have generated a random PIN for you. Your randomly generated PIN is 0000. Please do not share it with others."

      --
      "His name was James Damore."
    5. Re:Randomness is not an objective thing by FrangoAssado · · Score: 2

      It's not my theory; maybe you heard about a guy named Kolmogorov that lived in the last century? I bet the great mind of Robert Coveyou studied a lot of his theory :).

      But, more seriously, of course a random source will output compressible data sometimes. What happens is this: as you collect more output from a truly random source, the probability of it being compressible goes to zero very fast.

      But the point is that it *is* useful to distinguish between "false" and "true" randomness, otherwise it wouldn't be true that "the generation of random numbers is too important to be left to chance".

    6. Re:Randomness is not an objective thing by dotancohen · · Score: 1

      How compressible is:
      4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4?
      http://xkcd.com/221/

      Interestingly, my original version of this comment (with lots more 4's) threw this error:

      Your comment violated the "postercomment" compression filter. Try less whitespace and/or less repetition.

      Yet another use of the methods that you mention!

      --
      It is dangerous to be right when the government is wrong.
    7. Re:Randomness is not an objective thing by Odinlake · · Score: 1

      I believe you are missing the more important point (most of you in this thread). 'Random' is usually used as short for 'uniformely random' and would ultimately mean that any sequence of draws has an a priori equal probability to any other sequence of the same fixed length. Pseudo random generators do not have this property for long strings and most external events can't be guaranteed to have this property. The generators can be pretty good however, something that is often meassured by Spectral Tests (somewhat empirically). So when researchers talk about pseudo-randomness vs. true randomness, it is usually not so much about whether someone could predict the numbers as about whether long sequences have a truly uniform distribution.

      In particular, simple classical PRNGs with internal states of 32 bits may have a cycle of about 2^31 numbers, i.e. the 2^31+1'st number you draw will always be the same as the first. Apparently the PRNG of theoretical choice today, the Mersenne Twister has a cycle of 2^19937-1.

    8. Re:Randomness is not an objective thing by Rockoon · · Score: 1

      It's not my theory; maybe you heard about a guy named Kolmogorov that lived in the last century?

      You think I'm a noob, doncha?

      What happens is this: as you collect more output from a truly random source, the probability of it being compressible goes to zero very fast.

      Kolmogorov invented new terminology because he knew that the terms 'random' and 'entropy' didnt fit with his work on describing sequences. Thats why his theory is called 'Kolmogorov Complexity' ..... Complexity being short for 'algorithmic entropy' .. not simply entropy.. not simply randomness or stochastic.. specifically algorithmic entropy, aka complexity.

      This may seem like splitting hairs to you, but it isn't because this is a technical subject. There is a reason that new terminology was invented and you would do yourself a favor to discover why they were invented.

      --
      "His name was James Damore."
    9. Re:Randomness is not an objective thing by FrangoAssado · · Score: 1

      "Random" and "entropy" are already used in computer science with the meanings you seem to not want them to have (like this). Maybe someone should complain to the president of computer science. (I'm sorry, I couldn't resist. This discussion is too silly.)

    10. Re:Randomness is not an objective thing by Anonymous Coward · · Score: 0

      i'm not sure you appreciate how unlikely it is to get 10,000 zeros. Do you know how small a number ½ is? Any random source is already guaranteed not to generate a sequence of 10,000 zeros.

    11. Re:Randomness is not an objective thing by Hentes · · Score: 1

      Well, by this definition everything is random as the Universe is governed by quantum mechanics.

  19. I know this guy by M0j0_j0j0 · · Score: 1

    This kind of problem bugs only attention whores.

    1. Re:I know this guy by Anonymous Coward · · Score: 0

      Totally agree.

  20. Re:I thought /dev/random already looked for entrop by maxwell+demon · · Score: 1

    Yes, /dev/random is collecting randomness. It does not employ a pseudo-random number generator (/dev/urandom does so if there's not enough entropy in the pool). I don't know exactly which sources it draws from, but I guess the network is already used for randomness.But not the content, that's not random (unless you stream random data over your network, of course), but things like packet timings.

    --
    The Tao of math: The numbers you can count are not the real numbers.
  21. Wait by atari2600a · · Score: 1

    So what's wrong w/ using /dev/random, at time intervals specified by /dev/random?

  22. Not a random comment by Anonymous Coward · · Score: 0

    Random number.... between what range I ask.

    But really you'll never achieve randomness, at least not using a traditional turning machine... running binary logic. The best randomness occurs from natural events (radio-active decay being one of the best), and get a computer to observe / record values?

    But when comparing with music performances, I would suggest that a skilled performer doesn't do random differences in the timings, they merely accentuate the emotional content by changing both volume and speed of play. Of course for anyone that knows, Italian was chosen as it was considered more expressive than english at the time. So as someone that has played music for many years, I know just how subjective this is and a performer needs to play according to what they feel, as much as following the guidance.

    1. Re:Not a random comment by santax · · Score: 1

      I agree on both counts. Been playing myself for 25 years and I think it's the human feel, emotion as you will, that makes the great music. Then again, I don't like autotune either, nor do I like the Biebers and Spears of this world and yet they are the most succesfull 'artists' if money is what counts (well actually U2 is, which I think happens to be a band with a reasonable singer that does have 'soul'.)

    2. Re:Not a random comment by PDF · · Score: 1

      But really you'll never achieve randomness, at least not using a traditional turning machine...

      What are you talking about? I make random things with my lathe all the time!

    3. Re:Not a random comment by drcheap · · Score: 1

      No, the money is a testament to the success of their business/marketing/etc. managers. It has little to do with the actual "artist" or, as more would likely refer to them, performer.

  23. WTF? Random??? by Sooner+Boomer · · Score: 1

    "As a composer who uses computers for anything and everything from engraving..."

    What kind of "composer" does engraving, and why does he need a random number generator? And yeah, I read TFA, and it had nothing about applications.

    --
    Chaos maximizes locally around me.
    1. Re:WTF? Random??? by Anonymous Coward · · Score: 0

      Since you asked:
      Engraving is the poncy term for musical typesetting. It also means he probably uses Lilypond.

      Composers working with computers need pseudo-random number generators for lots of things, but true randomness is not particularly important. You're generally dealing with a small enough portion of a signal that you can simply reseed it (in the case of algorithmic processes). If you're working with an audio-rate signal and you feel that the color of your white noise is undesirable, a filter is probably a better tool.

      In my opinion (as a composer), seeking true randomness is generally pointless: given that most of the things that we are trying to express exhibit a pattern anyways, why would you randomize it in an unstructured fashion? Not to mention, this is a pretty boring PD patch. There's interesting things going on in computer music, but this ain't it.

    2. Re:WTF? Random??? by brusk · · Score: 1

      Perhaps he hand-engraves his music onto vinyl.

      --
      .sig withheld by request
    3. Re:WTF? Random??? by Tyrannosaur · · Score: 1

      If he's using a computer to produce music he won't nearly care about the quality to put it onto vinyl, sadly. :( No one does these days. nice joke though

    4. Re:WTF? Random??? by Anonymous Coward · · Score: 0

      http://en.wikipedia.org/wiki/Music_engraving

    5. Re:WTF? Random??? by Anonymous Coward · · Score: 0

      Dude, did you bother to look up the term "engraving"? It's essentially the musical equivalent of typesetting.

  24. Simple, faster, better by Anonymous Coward · · Score: 0

    SEED=`dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" "`
    RANDOM=$SEED

  25. You can't be serious by Anonymous Coward · · Score: 0

    1) This is less random than using a crypto rng
    2) This is less convenient
    3) The degree of randomness is not going to be audible perceptible for modulating a sound
    4) If you want to introduce variations into your audio to make it sounds more real, you don't want randomness. Real sounds aren't random they are created by sound waves traveling through mediums and doing wholly unrandom things. Either get a filter that does a better job of emulating these non-random processes, or start layering and combining in the randomness that you isolate from audio recordings like microphone hiss etc

  26. Stupid thread by Grieviant · · Score: 1

    So what are you saying - computer random number generators aren't good enough because they aren't 'natural'? That's a completely unsubstantiated point of view that I'd expect to hear from some hippie Arts student. They're actually tested to validate the appropriate statistical properties (run lengths, low auto-correlation, probability density, etc.) and have extremely long repetition periods. You can re-seed them anytime if you're paranoid. This is guaranteed to be as good or better than what you'll get with any of the traditional methods (numbers in a phone book, coin flipping, etc.) or anything else you can dream up.

    1. Re:Stupid thread by Rockoon · · Score: 1

      You can re-seed them anytime if you're paranoid.

      Certainly not. Thats one of the worst things that you can do. Seed it once and then use it. Period.

      --
      "His name was James Damore."
    2. Re:Stupid thread by Grieviant · · Score: 1

      In the past I've heard people say it's a good idea when starting a math package, but I think that's probably bunk as most generators would seed randomly on start-up. The only thing I meant to convey was that you're not locked into any sort of pattern that would appear deterministic for any practical purpose. Since you bring it up though, what is the harm in occasionally re-seeding as long as the seed is random?

    3. Re:Stupid thread by Rockoon · · Score: 1

      The statistical properties of PRNG's are only guaranteed over the entire sequence, taken in order. Jumping around the sequence in any systematic way weakens those guarantees every time.

      But you qualified the re-seeding as 'random' .. which means that you are now outside the realm of typical standard library functions, but the standard library functions were already fine, assuming that you only seed them once, so you have just created even more opportunity to mess up by not going with what worked to begin with.

      --
      "His name was James Damore."
  27. Re:I thought /dev/random already looked for entrop by Anonymous Coward · · Score: 0

    Yes, /dev/random uses mouse, keyboard, network to generate random numbers but it does not generate them in large quantity. However /dev/urandom uses /dev/random as seed and with some pseudo random algorithms generates row of random numbers as long as you want. With some random algorithm like Mersenne twister he could generate very good random numbers which could even be used for money betting games which requires random numbers.

  28. Random is as random does by Freddybear · · Score: 1

    http://www.random.org/faq/

    Q2.1: How can you be sure the numbers are really random?

    Oddly enough, it is theoretically impossible to prove that a random number generator is really random. Rather, you analyse an increasing amount of numbers produced by a given generator, and depending on the results, your confidence in the generator increases (or decreases, as the case may be). This is explained in more detail on my Statistical Analysis page, which also contains two studies of the numbers generated by RANDOM.ORG, both of which concluded that the numbers are sound. In addition, the continually updated Real-Time Statistics page gives you an indication of the quality of the numbers produced over time.

    1. Re:Random is as random does by The+Askylist · · Score: 1
      both of which concluded that the numbers are sound

      I just tried playing those numbers, and it gave me a hissy fit :-P

    2. Re:Random is as random does by dotancohen · · Score: 2

      http://www.random.org/faq/

      Q2.1: How can you be sure the numbers are really random?

      Oddly enough, it is theoretically impossible to prove that a random number generator is really random.

      http://dilbert.com/strips/comic/2001-10-25/

      --
      It is dangerous to be right when the government is wrong.
    3. Re:Random is as random does by Anonymous Coward · · Score: 0

      ... both of which concluded that the numbers are sound....

      If they are sound then why can't I hear them?

    4. Re:Random is as random does by Anonymous Coward · · Score: 0

      Variations on a theme: http://xkcd.com/221/

  29. Random by Squeeself · · Score: 1

    You keep using that word. I do not think it means what you think it means.

  30. Ah, not quite what I expected... by Anonymous Coward · · Score: 0

    I was hoping someone managed to turn a Wireshark capture file into glorious rock music.

    Disappointing.

  31. Re:I thought /dev/random already looked for entrop by muridae · · Score: 1

    It could be that /dev/random ran out of entropy, and /dev/urandom just didn't sound good. Since the article is about audio, maybe it just sounds better with certain (not true random) tonal noise. Perhaps it just appears more realistic with Brownian or pinked noise.

  32. Define cheating by Culture20 · · Score: 1

    Is is "cheating" to use PRNG when they work totally fine and computerized music that uses them can't be discerned from "natural" imperfect music. or is it cheating to use a computer to make music whether it's randomized or not?

  33. Obviated. by RightSaidFred99 · · Score: 1

    The RdRand instruction obviates all of this, code name is "Bull Mountain" - check it out.

  34. "bring your packet captures to life!" by gstrickler · · Score: 1

    That explains why my packets disappear when they have too many neighbors.

    --
    make imaginary.friends COUNT=100 VISIBLE=false
  35. Seriously? by 88NoSoup4U88 · · Score: 1

    What kind of clown posts these things?!

    Oh... Ronald. I'm sorry dude.

  36. computer music?? by Tyrannosaur · · Score: 1

    Do people actually enjoy this sort of thing? I listen to Boston - Tom Sholtz made a point to put "no computers were made in the production of this album" This is how music should be: acoustic and awesome. oh and PS randomness is way easier to produce- http://www.random.org/ Mads Haar does it with atmospheric noise. In fact, my high school science fair project involved proving it is a very easy thing to reproduce for personal use.

  37. rdrand by Anonymous Coward · · Score: 0

    next year on ivybridge cpus you can use "rdrand" instruction

  38. Minor problem by PPH · · Score: 1

    Most of my network traffic involves downloading porn.

    Your music is going to come out sounding like a strip club.

    --
    Have gnu, will travel.
  39. Impossible to prove true randomness exists. by anwyn · · Score: 1, Insightful
    It is impossible to prove that true randomness exists in the Universe.

    Let U be the universe that you believe in, and let R source of true randomness for that universe. Then the universe that you believe in is U(R).

    Let R' be one of the pseudo random algorithms that is too computationally complex for you to detect. How ever computationally advanced you are there will be an infinite number of these.

    It will be impossible for you to prove that the real universe is not one of the U(R'). Occam's razor is only a human convention which prefers simplicity. It is true that the U(R') universes may be more complex and violate non-locality, but these again are human conventions adopted for simplicity not because we can exclude the U(R') with experiment.

    1. Re:Impossible to prove true randomness exists. by gstrickler · · Score: 1

      There is no randomness, it is you who must be random.

      --
      make imaginary.friends COUNT=100 VISIBLE=false
    2. Re:Impossible to prove true randomness exists. by jibjibjib · · Score: 1

      It's impossible to prove anything at all, aside from abstract mathematics and "I think therefore I am" and such. But we shouldn't let philosophy and arguments about human conventions get in the way of the fact that Occam's Razor and the acceptance of unprovable theories is actually incredibly useful.

  40. truer randomness? by Anonymous Coward · · Score: 0

    I believe the phrase "Truer Randomness" is an oxymoron

  41. Better ways to do random by joe_cot · · Score: 2
    As a number of commenters have pointed out, /dev/random is actually way more random than what this article suggests doing. If you want stuff that actually is more random, or need a lot more random data, here are some options.
    • Random.org provides random data generated by radio noise. You can get as much random data as you'd like. Gaming websites download their random data in 5MB chunks to use for card shuffles and dice rolls.
    • HotBits is a similar idea, but uses radioactive decay instead of radio waves
    • If you want to do it in house, you can do so with a smoke detector and a webcam. This was submitted to slashdot in 2006
    • Finally, if you need a ton of random numbers, and they must be random, you can buy RNG hardware

    What do i do? if I don't really care if it's random, I use the RPG from the programming language I'm using, or /dev/random. If I really, really care that it's random, I download a chunk of data off random.org, and either use that for the numbers, or use it to seed my RNG. For the most part, anything more than that is overkill.

  42. Aleatoric.:. Aesthetic.:. by Anonymous Coward · · Score: 0

    Why should we be concerned with where we dip for randomness? Some composers have used astronomical data, or sampled line noise off of a preamp, or just rolled dice. Aleatoric aesthetics. It's a time honored nerd tradition to have a preference for a particular random source.

    ++It's the first time I've seen Puredata on the front page of /.! It's a banging language that doesn't get enough action.

  43. Complete BS by gweihir · · Score: 1

    The OP is clueless. /dev/random has full entropy and is random. /dev/urandom is the watered-down version, which still has some entropy in it.

    There is no need for "better randomness". There is need for people to find out what actually exists and is implemented and use it properly.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  44. Re:I thought /dev/random already looked for entrop by gweihir · · Score: 2

    It does. An a simple "man 4 random" will give you that information. It seems the OP could not even be bothered to do that before posting his clueless BS.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  45. Intel 80802 by Anonymous Coward · · Score: 0

    Who is still buying hardware that does not include an Intel 810/815/840/845G or some similar source of quantum and/or thermal randomness?

  46. Concerned by kyllikki · · Score: 1

    The OP is somewhat mistaken about entropy sources within a modern system.
    A modern OS implementation keeps a record of the number of shannons of entropy available in the /dev/random pool and only allows that amount to be taken out.
    The /dev/urandom pool simply allows the user to continue removing bits of data when there are no shannons of entropy left in the pool.
    The only way to acquire more shannons of entropy to fill the /dev/random pool (and hence provide a way for /dev/urandom pool to also acquire more) is to have a physical source of truly random nature.
    Such sources can include the timing information of key presses which introduce fractions of a shannon of entropy but network activity of any type is disturbingly periodic, hence such sources have largely been removed.
    If you want a true random number generator you need something like an Entropy key which uses physical quantum phenomena to generate many shannons of entropy continuously.

  47. Turbulence by Anonymous Coward · · Score: 0

    Buy a 3-dimensional sonic anemometer and use wind speed
    as a random seed. Turbulent flow is pretty random I hear.

  48. Re:I thought /dev/random already looked for entrop by Vanders · · Score: 1

    If /dev/random has run out of entropy, so will this ridiculous hack: /dev/random already sources entropy from the packet buffers, so either there are no packets arriving and neither method works, or their are packets arriving and then you may as well stick to /dev/random

    Even better, use /dev/random to periodically seed a good psuedo-random generator, say a Mersenne Twister implementation. You could call it /dev/urandom.

    Wait...

  49. Use Semiconductor Noise by Anonymous Coward · · Score: 0

    Cryptologist have the same problem, and they solve it using either (A) Noise from a semiconductor such as a diode or (B) pseudo-random noise from an algorithm such as RC4 or DES. Option (A) should not cost that much; parts cost should be in the order of 100 dollars. The difficult thing is getting it right from an electrical engineering perspective. See http://www.maxim-ic.com/app-notes/index.mvp/id/3469. Note that the physical noise often has to be post-processed using software to achieve a truly random bit-stream (the problem is that the noise sources might produce more 1s than 0s, for example).

  50. Re:I thought /dev/random already looked for entrop by Anonymous Coward · · Score: 0

    What's sad is that this submission was accepted for a story.

  51. Re:I thought /dev/random already looked for entrop by waives · · Score: 1

    If /dev/urandom could be distinguished from /dev/random by the human ear, it would be an extremely shitty excuse for a random number source.

  52. Re:I thought /dev/random already looked for entrop by klkblake · · Score: 1

    Actually, /dev/random will never pull from network hardware. It was decided that the risk of a timing attack was too high relative to entropy gains.

    --
    The sum of the intelligence of the world is constant. The population is, of course, growing.
  53. Re:I thought /dev/random already looked for entrop by gweihir · · Score: 1

    Indeed.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  54. Re:I thought /dev/random already looked for entrop by Ramin_HAL9001 · · Score: 1

    Well, he is using MacOS. If he were using a real operating system, he might have access to more authentic random numbers from /dev/random.

    But what an incredibly ugly hack. If it's so damned important to you, just buy a $20 USB-FM receiver, tune into the cosmic microwave background, and record and hash the audio stream from that. Or point your webcam at a bubbles generated from a fish-tank bubbler and hash the video stream. There are so many easy ways to get moderately random numbers, that would certainly be much more random and easier to program than parsing the not-so-random stuff from tcpdump.

    He probably never even bothered to query Google for natural sources of randomness, or he may have run accross LavaRnd.

    Please, everyone, don't even think about taking TFA seriously.

  55. Generation of Random Number from PING by John+Sokol · · Score: 1

    I have been using the network for a source of randomness for years. Another good source is the Hard Drives internal servo coefficients, or a TV Stations video or radio station in to an Audio card. If people bug me maybe I will write that up too. On a Linux box this is simple. But bash isn't well suited for audio processing. (although it's possible) For the video in you need C code.

    http://churchofbsd.blogspot.com/2011/11/generation-of-random-number-from-ping.html

    --
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso