Beta

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Exploiting Network Captures For Truer Randomness

timothy posted more than 2 years ago | from the when-lorem-ipsum-doesn't-cut-it dept.

Programming 189

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!"

cancel ×

189 comments

Sorry! There are no comments related to the filter you selected.

What universe does this guy live in? (1)

MichaelSmith (789609) | more than 2 years ago | (#37961028)

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.

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961196)

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.

Re:What universe does this guy live in? (1)

MichaelSmith (789609) | more than 2 years ago | (#37961278)

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.

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961330)

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

Re:What universe does this guy live in? (2)

Em Adespoton (792954) | more than 2 years ago | (#37961358)

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.

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961414)

Don't belabor the fucking point.

Re:What universe does this guy live in? (1)

maxwell demon (590494) | more than 2 years ago | (#37961452)

Don't belabor the fucking point.

Why? Do you fear the ocean is listening?

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961764)

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?

Re:What universe does this guy live in? (1)

maxwell demon (590494) | more than 2 years ago | (#37962360)

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.

Re:What universe does this guy live in? (1)

Rockoon (1252108) | more than 2 years ago | (#37961626)

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.

Re:What universe does this guy live in? (1)

zAPPzAPP (1207370) | more than 2 years ago | (#37961768)

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.

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961404)

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!

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961628)

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.

Re:What universe does this guy live in? (0)

Anonymous Coward | more than 2 years ago | (#37961896)

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

fp (-1)

Anonymous Coward | more than 2 years ago | (#37961032)

cat /dev/frostyPiss

Random (4, Insightful)

somersault (912633) | more than 2 years ago | (#37961042)

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

Re:Random (4, Insightful)

PopeRatzo (965947) | more than 2 years ago | (#37961478)

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.

Re:Random (2)

The Askylist (2488908) | more than 2 years ago | (#37961680)

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

Re:Random (1)

PopeRatzo (965947) | more than 2 years ago | (#37962024)

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.

Re:Random (1)

Lord Lode (1290856) | more than 2 years ago | (#37961640)

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

Re:Random (0)

Anonymous Coward | more than 2 years ago | (#37961674)

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 [youtube.com] to gain some perspective. ;)
And then some vision and inspiration.

Why reinvent the wheel? (1)

Anonymous Coward | more than 2 years ago | (#37961044)

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

If I would (0)

santax (1541065) | more than 2 years ago | (#37961052)

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.

Re:If I would (1)

santax (1541065) | more than 2 years ago | (#37961070)

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

Re:If I would (1)

YodasEvilTwin (2014446) | more than 2 years ago | (#37961092)

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

Re:If I would (5, Informative)

JabberWokky (19442) | more than 2 years ago | (#37961208)

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 [wikipedia.org] for an overview of the devices you're looking for.

Re:If I would (1)

santax (1541065) | more than 2 years ago | (#37961280)

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.

Re:If I would (2)

maxwell demon (590494) | more than 2 years ago | (#37961362)

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

Re:If I would (1)

scheme (19778) | more than 2 years ago | (#37961366)

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).

Re:If I would (1)

santax (1541065) | more than 2 years ago | (#37961408)

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.

Re:If I would (1)

grim4593 (947789) | more than 2 years ago | (#37962198)

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 [wikipedia.org] . Those kinds of effects can be leveraged for randomness.

Re:If I would (1)

Baloroth (2370816) | more than 2 years ago | (#37962146)

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.

Re:If I would (1)

SuricouRaven (1897204) | more than 2 years ago | (#37961328)

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.

Re:If I would (1)

hedwards (940851) | more than 2 years ago | (#37961554)

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

Not a random comment (0)

Anonymous Coward | more than 2 years ago | (#37961342)

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.

Re:Not a random comment (1)

santax (1541065) | more than 2 years ago | (#37961392)

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'.)

Re:If I would (1)

colinrichardday (768814) | more than 2 years ago | (#37961734)

You will be awarded a nobel-price.

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

How is that more random? (2)

AuMatar (183847) | more than 2 years ago | (#37961058)

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.

What the cluck? (5, Insightful)

YodasEvilTwin (2014446) | more than 2 years ago | (#37961080)

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.

/dev/random (3, Informative)

Anonymous Coward | more than 2 years ago | (#37961096)

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

Mod parent up (3, Interesting)

impaledsunset (1337701) | more than 2 years ago | (#37961186)

/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.

I thought /dev/random already looked for entropy.. (2)

tiffany352 (2485630) | more than 2 years ago | (#37961116)

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.

Re:I thought /dev/random already looked for entrop (1)

maxwell demon (590494) | more than 2 years ago | (#37961230)

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.

Re:I thought /dev/random already looked for entrop (0)

Anonymous Coward | more than 2 years ago | (#37961524)

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.

Re:I thought /dev/random already looked for entrop (1)

muridae (966931) | more than 2 years ago | (#37961810)

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.

Why not atomic? (2)

nten (709128) | more than 2 years ago | (#37961122)

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.

Re:Why not atomic? (1)

Em Adespoton (792954) | more than 2 years ago | (#37961402)

This method has a few added security benefits too :)

boring (1)

larry bagina (561269) | more than 2 years ago | (#37961128)

web cam + lava lamp is much more exciting.

why do you care? (0)

Anonymous Coward | more than 2 years ago | (#37961134)

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.

Clueless (0)

Anonymous Coward | more than 2 years ago | (#37961140)

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.

not nearly as "random" as /dev/random (5, Informative)

Dahamma (304068) | more than 2 years ago | (#37961144)

/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...

Re:not nearly as "random" as /dev/random (1)

Megane (129182) | more than 2 years ago | (#37961386)

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.

Re:not nearly as "random" as /dev/random (5, Insightful)

gman003 (1693318) | more than 2 years ago | (#37961528)

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.

Re:not nearly as "random" as /dev/random (0)

Anonymous Coward | more than 2 years ago | (#37961814)

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

Re:not nearly as "random" as /dev/random (1)

snowgirl (978879) | more than 2 years ago | (#37962018)

/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.

randomness (0)

Anonymous Coward | more than 2 years ago | (#37961148)

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

Re:randomness (1)

Yaur (1069446) | more than 2 years ago | (#37961214)

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

Re:randomness (1)

folderol (1965326) | more than 2 years ago | (#37961292)

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

Re:randomness (1)

maxwell demon (590494) | more than 2 years ago | (#37961252)

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.

Easy (0)

Anonymous Coward | more than 2 years ago | (#37961162)

www.random.org

Confusion... (3, Insightful)

Junta (36770) | more than 2 years ago | (#37961176)

/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.

Re:Confusion... (0)

impaledsunset (1337701) | more than 2 years ago | (#37961436)

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.

Re:Confusion... (2)

emj (15659) | more than 2 years ago | (#37961544)

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!

Re:Confusion... (2)

gman003 (1693318) | more than 2 years ago | (#37961608)

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.

Randomness is not an objective thing (1)

Hentes (2461350) | more than 2 years ago | (#37961188)

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

Re:Randomness is not an objective thing (1)

maxwell demon (590494) | more than 2 years ago | (#37961326)

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.

Re:Randomness is not an objective thing (1)

SuricouRaven (1897204) | more than 2 years ago | (#37961368)

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.

Re:Randomness is not an objective thing (1)

Odinlake (1057938) | more than 2 years ago | (#37961950)

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 [sbg.ac.at] (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 [wikipedia.org] has a cycle of 2^19937-1.

Re:Randomness is not an objective thing (2)

FrangoAssado (561740) | more than 2 years ago | (#37961426)

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).

Re:Randomness is not an objective thing (1)

Rockoon (1252108) | more than 2 years ago | (#37961534)

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."

Re:Randomness is not an objective thing (2)

FrangoAssado (561740) | more than 2 years ago | (#37961708)

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".

Re:Randomness is not an objective thing (1)

dotancohen (1015143) | more than 2 years ago | (#37961854)

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/ [xkcd.com]

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!

I know this guy (1)

M0j0_j0j0 (1250800) | more than 2 years ago | (#37961216)

This kind of problem bugs only attention whores.

Re:I know this guy (0)

Anonymous Coward | more than 2 years ago | (#37961246)

Totally agree.

Wait (1)

atari2600a (1892574) | more than 2 years ago | (#37961242)

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

THIS FP FOR GNAA (-1)

Anonymous Coward | more than 2 years ago | (#37961322)

Goo3 mann ers [goat.cx]

WTF? Random??? (1)

Sooner Boomer (96864) | more than 2 years ago | (#37961348)

"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.

Re:WTF? Random??? (0)

Anonymous Coward | more than 2 years ago | (#37961512)

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.

Re:WTF? Random??? (1)

brusk (135896) | more than 2 years ago | (#37961794)

Perhaps he hand-engraves his music onto vinyl.

Re:WTF? Random??? (1)

Tyrannosaur (2485772) | more than 2 years ago | (#37962084)

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

Simple, faster, better (0)

Anonymous Coward | more than 2 years ago | (#37961364)

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

You can't be serious (0)

Anonymous Coward | more than 2 years ago | (#37961418)

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

Stupid thread (1)

Grieviant (1598761) | more than 2 years ago | (#37961432)

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.

Re:Stupid thread (1)

Rockoon (1252108) | more than 2 years ago | (#37961566)

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.

Re:Stupid thread (1)

Grieviant (1598761) | more than 2 years ago | (#37961704)

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?

Random is as random does (1)

Freddybear (1805256) | more than 2 years ago | (#37961614)

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

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.

Re:Random is as random does (1)

The Askylist (2488908) | more than 2 years ago | (#37961738)

both of which concluded that the numbers are sound

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

Random (1)

Squeeself (729802) | more than 2 years ago | (#37961660)

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

Ah, not quite what I expected... (0)

Anonymous Coward | more than 2 years ago | (#37961732)

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

Disappointing.

Define cheating (1)

Culture20 (968837) | more than 2 years ago | (#37961812)

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?

Obviated. (1)

RightSaidFred99 (874576) | more than 2 years ago | (#37961836)

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

"bring your packet captures to life!" (1)

gstrickler (920733) | more than 2 years ago | (#37961972)

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

Seriously? (1)

88NoSoup4U88 (721233) | more than 2 years ago | (#37962014)

What kind of clown posts these things?!

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

computer music?? (1)

Tyrannosaur (2485772) | more than 2 years ago | (#37962052)

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/ [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.

rdrand (0)

Anonymous Coward | more than 2 years ago | (#37962082)

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

Minor problem (1)

PPH (736903) | more than 2 years ago | (#37962326)

Most of my network traffic involves downloading porn.

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

Impossible to prove true randomness exists. (1, Insightful)

anwyn (266338) | more than 2 years ago | (#37962366)

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.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?
or Connect with...

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>