Ultra-low-cost True Randomness
Cryptocrat writes "Today I blogged about a new method for secure random sequence generation that is based on physical properties of hardware, but requires only hardware found on most computer systems: from standard PCs to RFID tags." Basically he's powercycling memory and looking at the default state of the bits, which surprisingly (to me anyway) is able to both to fingerprint systems, as well as generate a true random number. There also is a PDF Paper on the subject if you're interested in the concept.
234 234838372 234 29723432891023478343589435892?
liqbase
A slightly more expensive but somehow even more random method is to seed the generator against the words and phrases that come out of the mouth of South Carolina's Miss Teen USA.
:)
But in all seriousness, I wonder how this compares to the Mersenne Twister (Java implementation & PDF)that I use at home? I am almost sure this new proposed method is more efficient and faster, when will there be (I know, I'm lazy) a universal implementation of it?
Also, this may be a stupid question, but I wonder how one measures the 'randomness' of a generator? Is there a unit that represents randomness? I mean, it would be seemingly impossible to do it using observation of the output so I guess all you can do is discuss how dependent it is on particular prior events and what they are, theoretically. Can you really say that this is 'more random' than another one because you have to know so much more before hand about the particular machine & its fingerprint in order to predict its generated number?
My work here is dung.
Randomness is definable.
Why, take a look at this Wikipedia link. You can never tell whether it represents the truth or some crackpot's claim to it or just some troll's malicious vandalism.
Voila! Randomness!
http://xkcd.com/221/
The Mersenne Twister is a pseudo-random number generator. For many uses, this is preferable to a true random number generator as it is easily repeatable. (One can also repeat the results of a true random number generator by storing the output, but depending on how many random numbers you're generating, this might be space intensive.)
That said, although this might be "true" randomness, what kind of randomness it is? Uniform over a range? Gaussian? Weibull? Most likely, none of the above if it can be used for fingerprinting systems. (No, I did not RTFA.)
Ben Hocking
Need a professional organizer?
I'm curious how a truly random number can ALSO be a fingerprint...
"Your Honor, this alleged rapist has truly random DNA."
"Dat's right, if da seed don't fit, you must acquit!"
OK, do we in this world have a problem with not sufficient randomness in our keys or something?
If you mod this up, your slashdot background will turn into a beautiful sunset!
Is pretty low cost to get some randomness. Some friends like jug wine though. Although I'm extremely cheap, so I just go for 100 proof stuff. $12.00 and you can get a whole bottle of randomness.
The contents of a power-cycled DRAM cell are highly correlated to whatever was stored in it before power was lost. Geez, think about how a DRAM works... it's a capacitor (aka an integrator)! That's the last place I'd ever look for randomness.
I wouldn't assume that these fingerprints are as unique or pattern-less as one might hope (a fact discussed in the pdf). All of the RAM chips from a given wafer or given mask may share tendencies toward some patterns of the probability of a 0 or 1. These patterns may appear as correlations between rows and columns of a given chip. Location on the wafer (in the context of nonuniformities of exposure to fab chemicals) might also systematically affect the aggregate probabilities of 0 or 1 or the repeatability of the fingerprint. The quality of these fingerprints to be consistent or random might change from run to run and from manufacturer to manufacturer. Finally, I'd bet that the probabilities vary systematically with temperature -- e.g., the probability of a 1 increases for all bits as the chip's temperature increases.
This is a very interesting phenomenon, but a lot more data is needed to show that it provides consistent behavior.
Two wrongs don't make a right, but three lefts do.
Will vary with the length of time the computer has been off. There is a suprising amount of non-volatileness in DRAM. I liked Alan Touring's suggestion that all computers come equiped with a small radioactive source and detector. The random breakdown and emission of the source is an almost ideal random number generator. It wouldn't take a source any bigger than we now have in a smoke detector.
"Eve of Destruction", it's not just for old hippies anymore...
The problem with the last is that it's a constant, not random at all.
The bigotry of the nonbeliever is for me nearly as funny as the bigotry of the believer. - Albert Einstein
Pick a question. Then keep asking that question to a politician. You should get truly randomized results. If you doubt me, just take a politician with an opposite stance, and repeat the process. The answers will not be polar opposites.
And consequently no information could be extracted that scenerio -- wow, I think I just proved that you can't transmit information across a quantum entanglement..
the true RNG properties rely on the fact that:
a: Many of the bits are sorta random, but physically random. So very biased coins, but true randomness.
b: With the right reduction function, you can turn a LOT (eg, 512 Kb) of cruddy random data to a small amount (128b-512b) of very high quality, well distributed random.
And the fingerprinting relies on the fact that:
a: Many other of the bits are physically random, but VERY VERY biased. So map where those are and record them and it is a very good fingerprint. And since it is all silicon process randomness going into that, it is pretty much a physically unclonable function.
Kevin Fu has some SMART grad students.
Test your net with Netalyzr
As an embedded engineer, I've encountered numerous cases where power cycling RAM did not alter the contents.
In fact, I've seen systems boot and run even after the power was cut for several seconds. Some types of SRAM and SDRAM have the ability to retain an (imperfect) memory image even at very low voltage levels. Sure, it's not guaranteed to be accurate by the manufacturer, but RAM "images" are a pretty well known phenomenon. In some cases, the contents of memory can be reconstructed even after the computer has been powered off and removed to a forensic laboratory.
This is not random at all. In fact, it's more likely to produce an easily exploitable RNG than anything else; I would not be at all surprised if the standard UNIX random number generator provided better security.
The society for a thought-free internet welcomes you.
You hit the nail precisely on the head as to why this is a bunch of bollocks.
If the startup state of the RAM banks are so predictable that you can base a fingerprint on it, it's not even vaguely random, is it?
-1 Uncomfortable Truth
Dieharder http://www.phy.duke.edu/~rgb/General/dieharder.php is what I used.
I learned a heck of a lot working with dieharder especially considering my lack of mathematical acumen. The author and friends were unbelievably patient and helpful. In my book it's the best tool ever.
Debian package too!
http://www.maxineudall.com/2010/02/should-economists-be-sued-for-malpractice.html
Also, this may be a stupid question, but I wonder how one measures the 'randomness' of a generator?
Read James Gleick's Chaos.
There is a method in that book that describes how they extracted attractors from a stream of data. Here's how it works.
A team of researchers had a bathtub with a dripping faucet. They tuned the dripping until the drips fell at random intervals. Nothing rhythmic about it. As the drop broke away from the faucet, it was setting up a vibration in the remaining water that would jiggle until the next drop fell. It was highly nonlinear.
They constructed a phase space where you would look at the time between any two drops. On the other axis was the time between the one previous to that. So on one axis you have the time bewteen drops 1 and 2, and on the other axis between drops 2 and 3.
It turns out that an attractor would emerge. The times did not scatter around the page randomly, they grouped in clusters. There was an underlying order that this method would expose.
So - to answer your question, what you could do would be to take your stream of numbers, and examine them in phase space looking at the differences between each data point. If nothing shows up in a two dimensional plot, go for three. Use n1-n2, n2-n3 and n3-n4 on your axis. Add dimensions if you need to beyond that. See what it takes to make your data cluster, if it ever does. The more complex your data is, the more dimensions it will take to visualize that.
Weaselmancer
rediculous.
This technique is only usefull for deeply embedded systems where you have control of the hardware from power-on and are able to fingerprint your SRAM. PCs don't really have user-accessible SRAM (except for on-chip memory in SCSI or Ethernet controllers). Even if this were applicable to DRAM, by the time your OS loads, your DRAM state is already defined. It's a shame Intel's hardware RNG implemented in their firmware hubs (82802Ax) didn't catch on more.
Any sufficiently advanced bug is indistinguishable from a feature.
You can never be sure.
Gamingmuseum.com: Give your 3D accelerator a rest.
Learn How To Use Capital Letters At The Beginning Of Sentences!
We were surprised to suddenly get attention to this paper, but apparently Slashdot readers are watching the security seminar at UMass Amhest.
Anyhow, we will be answering questions in this thread. So if you have any questions, post them here and Dan Holcomb will get back to you as soon as he can.
Cheers,
-Kevin Fu
There are 3 states the bits can fall into:
Using the bits that fall into category 2 to generate the number will result in a random number, as these are known to change randomly
Bits falling into the other two states are ignored for the random function and are used for the identification function.
You, sir, are an idiot. The article explains that only some of the bits are consistantly predictable while *others* are consistantly random. The predictable bits can be used for fingerprinting, the random ones for... random bits.
A couple of other posters mentioned the state storing across power cycles. Being too lazy to read the paper in enough detail to create a slashdot question:
This shouldn't affect the fingerprinting, because you fingerprint on the highly-biased cells.
But how does this biasing effect interact with the true RNG operation? Have you done retention time experiments?
also, DRAM is worse on the retension time, but is it perhaps still suitable for the fingerprinting? Have you evaluated this yet?
Test your net with Netalyzr
The original paper is much better than CmdrTaco's quick conclusions.
The described method is ONLY for SRAM (statical RAM), no DRAM, no SDRAM. You can find this on RFID chips and in a CPU'S cache, not in RAM. As there is no way to access a CPU's cache uninitialized, I can't see why this should be useful.
If you have to modify a CPU first, to allow access to it's unitialized caches (think about all the unwanted implications), it's much cheaper to just give it a thermal diode and register to poll (as most modern CPU's already have).
After all the described method is just another way of collecting thermal noise. As RFID's are custom designs most of the time, also there it would be cheaper to just use a thermal diode.
The only application for this would be if you had to develop strong crypto for legacy RFID chips.
Slashdot stories get worse by the day.
You can at least cite properly:
http://xkcd.com/221/
DO NOT ACCEPT SCIENCE FICTION AS FACT. THE "SCIENCE" IN SCIENCE FICTION IS A DEVICE TO MAKE THE STORY MORE BELIEVABLE AND INTERESTING.
[Reply to This ]
Post Comment
Lameness filter encountered. Post aborted!
Reason: Don't use so many caps. It's like YELLING.
It's an interesting paper, and as a means of getting randomness for RFID processors it probably works well, but I'm not sure it's that cheap for most purposes. If you're having to build a new circuit to generate randomness then using an op-amp to compare the noise out of a pair of zener diodes is likely to be cheaper. If you already have an audio input you're not using you can keep that really cheap. Of course if you want really good randomness you should use an old smoke detector.
If intelligent life is too complex to evolve on its own, who designed God?
You don't understand what random means, or the nature of the hardware you're looking at.
The level of electrical noise in the system at launch is predictable.
In some bits, the electrical noise is predictably higher than the tipping point to count it as "1".
In some bits it is predictably lower than the tipping point to count it as "0".
In some bits, it is predictably proximate to the tipping point to count it as either "1" or "0".
In ALL cases, it is predictable.
If I have a die that is weighted to land on 5 or 6 almost every time, it's not random.
If you decide to use 5 as 1 and 6 as 0, and treat them as equal probabilities because you are ignorant to the fact that 5 is weighted higher than 6, you will not see a random result. And if you play against me, you will lose because I am aware of the predictable nature of the results and you are not.
This system is not random, and is subject to gaming of any system that treats it as though it was.
And I'm most definitely not an idiot.
-1 Uncomfortable Truth
"Random" == can't predict? Can't predict because we don't understand behind-the-scene how/why. So all things are random until we understand adequately how. Equally, nothing is random, since randomness is not inhererent to the object itself, but subject to our level of knowledge.
Ok, tear the above apart and enlighten me (perhaps others). I've never encountered more rigorous definition of randomness in any math/stat courses.
Nice livejournal page.
Livejournal. Ha.
Post a question on 'Ask Slashdot'.
Have gnu, will travel.
A useful approximation is to use "compressed size". An ideal, lossless compressor would be readily calculating the kolmogorov complexity. For instance, in the 123456789012345678901234567890 sequence example, any self-respecting compressor such as Zip would create something like "1234567890 times 3", which is pretty close to the shortest program which generates the sequence.
Indeed, really-good compression is close to AI. To say the same thing in progressively shorter ways, you need to find deeper patterns. Check out this page relating AI to compression: the Hutter prize
Compiler error! return 4 does not terminate
Knowledge is power. Knowledge shared is power lost.
If not implemented in hardware i do see some problems like how to get access to the page as a normal user.. In software there are easier ways...
:)
1. IRQ's on the system since it started, for one or more more devices.
2. cpu-serial
3. check the number of cpu-cycles that passed since the seed-generator started (a bit like the chaos theory if you have many processes running)
4. uptime of the system
5. local time (do have have a little randomness due to variations op the local clock-circuit)
6. serial of the harddrives
7. do some quick benchmark on the RAM and use the latency and/or bandwidth
8. do some quick benchmark on the disk of some semi-random blocks and use the latency and/or bandwidth
9. do some benchmark on the gfx-card and use the latency or bandwidth
10. Free ram / used ram / current usage of the buffer-cache
11. Check free or used diskspace on the filesystems.
12. Got a analog tv/radio-card? Tune to a semi-random frequency read some noise..
13. read some static noise from the mic-input (with or without having a mic plugged in, usually you get some noise if you have a 'bad' soundcard)
14. ping a few semi-random addresses on the network and use the latency.
Use one or more depending on how 'random' you wanna get and use something like this:
seed(step 1 + rand())
seed(step 2 + rand())
seed(step 3 + rand())
seed(step 4 + rand())
X = rand()
and then use X as you final seed value...
Or maybe just use the number of hits per second you get when being \.'ed
In some bits, it is predictably proximate to the tipping point to count it as either "1" or "0".
In ALL cases, it is predictable.
If I flip a coin onto my hand, it's predictable that it will land on either heads or tails. That doesn't mean it's not random though.
Basically some bits are more likely to be 0, some are more likely to be 1 and some are apparently random. Many cycles are done to identify which bits fall into which category. The ones more likely to be 0 or 1 are used to determine the fingerprint. The ones that appear to be totally random are used to generate random data.
There is no such thing as random, only patterns too complex to model.
Linux already uses hardware entropy sources like hard drive seek times and peripheral input to generate secure random numbers:
http://en.wikipedia.org/wiki//dev/random
Another existing method of generating secure random numbers, used by the java VM, is starting and stopping threads and gathering statistics about how the OS allocates time to those threads, which has been shown to be fairly unpredictable.
Given the flaws with the method outlined by other posters... sounds like this really doesn't offer anything better than what we already have.
butterflies and artichokes to me.
Parent stole his joke from xkcd (posted above) without giving credit. Mod douche-nozzle parent down, please.
It is random, it just isn't fair.
What's more, you can use it to generate fair, random 0s and 1s: throw it twice, and if you get 5-6, that's a 0; if you get 6-5, that's a 1. If you get two of the same number (5-5/6-6), repeat from the start. Assuming the throws are independent (i.e. it has no memory), and the probabilities of 5&6 are both greater than zero, you'll get a 0 or 1 with equal probability.
The article plays a similar trick, but it uses a hash function to even out the probabilities...
Need to type accents and special characters in Windows? Use FrKeys
Score 4, Interesting without even reading or understanding the article. The Mersenne twister is a pseudorandom number generator, which is totally unrelated.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
I worked for a company (NE2 Encryption) that tried to do this back in 2001. I recall that their end results were that they could fingerprint a pc about 70% of the time - not good enough for commercial use, and definitely not random enough to call it a pseudo-random number generator. It also took a long time to generate the unique key, ie the computer had to be running the software in the background for about four hours. Needless to say, the technology never went anywhere. I think they did try to take out a patent on it, which may still exist, but the copmany is no longer in business.
RTFA.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
I'm patenting a random number generator that involves the use of toddlers. They make a random mess around the house, so we might as well harnass this random energy.
Table-ized A.I.
http://xkcd.com/221/
my associative arrays can kick your hash - TCL
The only way I know of generating truly random numbers (not psudorandom) is hot bits which works on the principle of single radioactive atoms decaying after a perfectly random, in every sense of the word, time. http://www.fourmilab.ch/hotbits/
Just because it is hardware does not mean it is "true" randomness.
TFA did not say just how random it is.
The idea that the data is compromised enough that significant portions of it can be used to fingerprint, which is close to the opposite of the meaning of true randomness since it is based on a pattern, sounds to me like the more random components are in fact not so random.
In other words the jitter down near the threshold of signal discrimination may look real random but actually may look a lot like the same jitter on another machine after you take away the fingerprint. Not a new idea of dialing in how much randomness you want but they will have to prove it.
I'm not entirely clear on why this is more interesting than just using timing like most of the rest of the world does. Perl has, for example, long used a setjmp/longjmp-based timing test for its Math::TrulyRandom package by Matt Blaze and Don Mitchell of AT&T and of course most modern Unix-like systems implement /dev/random and /dev/urandom again based on timing. RFC1750 has given useful directions on how to generate random numbers on generic hardware for well over a decade. I recall first reading this RFC, not long after it came out. It really changed my understanding of random numbers on computer hardware.
This just doesn't seem all that newsworthy, though it's cool enough as yet another random number generation technique, I suppose.
right....
Just i forgot the link, and the actual number, which by a random luck i choose the same....
This is a bit of old news. I have already authored and been granted several patents in this area.
6,906,962 Method for defining the initial state of static random access memory
6,828,561 Apparatus and method for detecting alpha particles
6,738,294 Electronic fingerprinting of semiconductor integrated circuits
I have several other ideas for application of this technology and would be happy to discuss if someone is interested.
Paul
So again I'll explain the cheapest method of true randomness: a transistor run "backwards" to produce plain analog white noise, a sample-and-hold circuit to capture the voltage output of the transistor, and an A/D converter to get this voltage to digital form. It's not new or revolutionary (though I am certain some bstrd will eventually re-invent it, claim fame, and call it "new technology"), it's not complex, but it works, it is true random, it costs nothing, and - lo and behold - I've found that it has been used many a times before to create random number generator devices for computers.
I too came up with the idea myself many years ago as a way of achieving a step-less, frequency-tunable noise generator for an analog synthesizer project of mine.
- JRL
I've assembled a small SRAM memory circuit as part of a computer and I've observed at least part of the behaviors he describes. In the circuit, both my address counters always initialize to zero. The first byte of the ram chip is always 11111111, the second always 00000000, and after that they are apparently random. But if you're going to *powercycle your ram* to get randomness, wouldn't it be simpler to just use a hardware stream generator?
Wait! My cheating unit malfunctioned! You gotta give me a do-over!
If fate makes you a motorcycle, you become a motorcycle.
If you knew how much it cost to buy one, you'd realize why a low cost solution is so necessary.
Then again, if you paid enough for your politician, he'd be less random on your particular issue. Hmm.....
Is it just my observation, or are there way too many stupid people in the world?
(1) please tell me that you're joking, I don't have time to look up patent numbers right now.
(2) if you're not joking, were you some key figure at NE2 encryption, noted by an AC a few posts up?
Is it just my observation, or are there way too many stupid people in the world?
Most bits are constant, but it is a function of the component matching capability of the manufacturing process. The better the matching, the better the process. This is especially true when the process is used for analog circuits, where matching is an important feature/assumption. Fortunately, the better the matching, the more bits that will be random. Paul
"If I have a die that is weighted to land on 5 or 6 almost every time, it's not random.
If you decide to use 5 as 1 and 6 as 0, and treat them as equal probabilities because you are ignorant to the fact that 5 is weighted higher than 6, you will not see a random result. And if you play against me, you will lose because I am aware of the predictable nature of the results and you are not.
This system is not random, and is subject to gaming of any system that treats it as though it was."
All random sources are of a similar nature. It is a random system. You just have to process it to get the randomness into the results you want, such as equally likely 1's and 0's.
If you want cheap true randomness, the answer is simple, grab a microphone, take the input signal, mod 1 it (or mod 255 for random bytes, etc. etc.)
True randomness based on atmospheric conditions. Even if the microphone doesn't work too well, there still tends to be some form of static generated from the motherboard itself.
-JW
First, I'm sorry to bring this comment to your attention:
http://it.slashdot.org/comments.pl?sid=292837&cid=20543831
I've only looked at one of them:
http://www.patentstorm.us/patents/6738294.html
Second - what can you say about NH as an entropy distiler? Are there any nice provable properties that follow from it being a universal hash function?
Thanks for doing interesting work!
Xenu loves you!
While it's already been pointed out that this paper only applies to SRAM (which requires a constant power input), not DRAM (which only requires a periodic power input), it reminds me of an interesting electronics lab I performed in my undergraduate years.
We took SDRAM chips (the original plain old SDR technology), coded up an FPGA circuit to write its contents and then check for errors, then experimented with increasing the refresh interval. We then experimented with different parameters to see how they affected the retention time. Interestingly (if a bit obviously), SDRAM at room temperature would hold data just fine for at least several seconds, and if you chilled it only slightly, it would last much, much longer. Heating the chips naturally had the opposite effect.
I always thought it was pretty cool how long the state remained in memory just at room temperature, though, without a single bit error. SDRAM refreshes its contents every tens of ms, probably just to be conservative, but it doesn't really need to.
perl -e 'print 1..9,0..9,0..9,0'
The article makes a short note on metastability, but wouldn't this be more appropriately applied to a register array of flip-flops, which are much more susceptible to falling into a metastable state, instead of a ram? If he's using the SRAM (he never clarifies), he's counting on the charge of a single capacitor being randomly dispersed in order to enforce randomness, not the properties of the transistors at all. Using flip-flop circuits by violating their setup/hold times seems like it'd be more effective. It has probably already been explored. The article says so itself. So what's novel here?
There is no such thing as "true randomness". When an event is random, it does not mean that it is impossible to predict, but rather that it is impractical to predict. When you toss a coin, it is entirely possible to remove external disturbances and make absolute predictions on the outcome of each toss. The reason we call tossing a coin random is that we don't know the outcome, not because nature doesn't know the outcome. This confusion between a state of nature is so common, it has a name: mind projection fallacy.
Back in 1996 I figure out that ping times are an excellent source for Random number, especially if your connected to the internet which usually thats where you'd want them.
Just start pinging several of your favorite sites, like Google etc.
Then take the least significant digits, scramble them a bit and presto, good random number.
It's almost impossible to attack the system to De-randomize the ping times.
Of the the things I don't see people mention about random numbers is, how many can you generate per second.
If you just need one ever now and then, there are may ways, but if you build a large system that relies on long random number heavily,
then it really comes down to how many random bits per second can you generate.
I was using this for some online gambling sites, and it was critical that the card shuffles an dice rolls didn't have any possible patterns someone could exploit, since where would be a lot of money at stake.
I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
Wouldn't a Really Hot Cup of Tea be cheaper?
I guess Brownian Motion Analyzers must be too expensive to make it a practical alternative...
not all systems have user input.
not all systems are connected to the 'net.
finger prints themselves are measured with probability. If you gather the state of all bits of a system and ignore the minority "noise" that changes too often you have a fingerprint. If you take those noisy bits you ignored, you have fodder for random numbers. And you don't have to do categorization explicitly if you don't want to, if you combine all the data one way you have a random number. If you interpret it differently you have a statistical probability of a fingerprint.
At least that's what I gleaned from that article, rather than rejecting it outright.
“Common sense is not so common.” — Voltaire
Bah. I keep a jar of dice in my desk. 2 6-sided die, 36 combinations, 10 digits + 26 letters. 2d6 >> 1 character. Hardest to remember passwords, but most random.
The generation of random numbers is too important to be left to chance.
- Robert R. Coveyou
Linux has an entropy pool that allows you to turn low-quality randomness into high-quality random numbers. If you were to use this with Linux, you would likely use it as an input into that entropy pool. But it doesn't seem that this is practical or useful on typical PCs.
New sources of entropy are always at least academically interesting.
> truly random, depending upon quantum interactions
Misguided quantum mechanics who persist in thinking that their theory is in any way logical, are invited to read this paper, which clearly describes the error of their ways.
If a sequence was random is there a way to prove it? Apparently not:
Sergio B. Volchan
"What Is a Random Sequence,"
The American Mathematical Monthly, Vol. 109, 2002, pp. 46-63.
http://links.jstor.org/sici?sici=0002-9890(200201)109%3A1%3C46%3AWIARS%3E2.0.CO%3B2-L
This article won a Lester R. Ford Award in 2003 for "expository excellence".
The validity of your PDF is considerably lowered by the grammatical errors. Perhaps you should study a few English grammar rules --especially capitalization.