EmbeddedRelated.com
Forums

Random Number Generation via Hardware

Started by karthikbalaguru December 7, 2007
Hi,
Is it possible to generating Random Numbers via any hardware ?

Thx in advans,
Karthik Balaguru
karthikbalaguru wrote:
> Hi, > Is it possible to generating Random Numbers via any hardware ? > > Thx in advans, > Karthik Balaguru
Sure. But the solution depends on the requirements. Do you need a random number to simulate the throw of a die in a game, or do you need to create a one-time pad that the NSA can't crack ?
On Fri, 7 Dec 2007 00:59:28 -0800 (PST), I said, "Pick a card, any
card" and karthikbalaguru <karthikbalaguru79@gmail.com> instead
replied:

>Hi, >Is it possible to generating Random Numbers via any hardware ? > >Thx in advans, >Karthik Balaguru
Yes, and all it takes is a normally open switch and the inability of the human interface (our fingertips) to control the press of the button with any real precision. Use as high a clock as you can on your processor. Start an internal timer on power-up which cycles forever. Await a button press closure from your switch on any I/O line. When it happens, save the counter value. Again waiting for the opening of the same (now closed) button, save that new counter value when it happens. Do any simple math on the two numbers to use as a random number seed. For example, multiply them and use the result as the seed. Multiply the first by 5, the second by 2 and add them disregarding any overflow. You can use the individual digits of the counter itself to create the math. Let's say the decimal equivalent of 30335 is in one counter. Add all the digits together repeatedly until you have only a single digit. 3+0+3+3+5=14. Then, 1+4=5. Do the same with the second and use those as multipliers. You can then sample the timer again after your program completes the math to get the final seed. The possibilities are endless but you get the idea. Even someone intent on making an exactly timed button press won't have a chance against 8 million cycles per second in doing both the opening and the closing exactly the same two times. In human time, this process will occur within a few thousandths of a second. -- Ray
On Fri, 7 Dec 2007 00:59:28 -0800 (PST), karthikbalaguru
<karthikbalaguru79@gmail.com> wrote:

>Hi, >Is it possible to generating Random Numbers via any hardware ?
Pseudo random numbers (which repeat after a certein period) can be made with shift registers with feedbacks. For *true* randomness you can measure physical processes with built-in randomness like thermal noise oder radioactive decay and generate your numbers from these results. Mit freundlichen Gr&#4294967295;&#4294967295;en Frank-Christian Kr&#4294967295;gel
Le Fri, 07 Dec 2007 00:59:28 -0800, karthikbalaguru a &eacute;crit:

> Hi, > Is it possible to generating Random Numbers via any hardware ? > > Thx in advans, > Karthik Balaguru
I did it many years ago. I implemented (In LCA Xilinx) the well-known Lewis-Payne Fibonnacci-based pseudo RNG that is Xn = (X(n-24) + X(n-55))mod 2^32 The period of this RNG is # 2^85 Theory about RNG's --> D.E. Knuth Books BTW, you can simulate this in C and plotting samples (with gnuplot) to evaluate random distribution. I did not remember exactly bu it seemed to me that it was a quasi uniform distibution. -- HBV
>Is it possible to generating Random Numbers via any hardware ?
In fact, it's not possible to generate random numbers any other way. Do you want random or pseudo-random? Do you want numbers that theoretically cannot be predicted, numbers that we don't know how to predict (or if we know, we aren't telling), or numbers that are merely hard to predict? Are you defending against COTS technology, nation-states, quantum technology, or alien technology? -- mac the na&#4294967295;f
"karthikbalaguru" <karthikbalaguru79@gmail.com> schreef in bericht 
news:be043875-4c67-425a-b97c-7a9b7f779396@s8g2000prg.googlegroups.com...
> Hi, > Is it possible to generating Random Numbers via any hardware ? >
Google for 'Noise Diode' -- Posted via a free Usenet account from http://www.teranews.com
karthikbalaguru wrote:
> Hi, > Is it possible to generating Random Numbers via any hardware ? > > Thx in advans, > Karthik Balaguru
Yes, and many system already do. Seeded generators are very simple, but not truly random. Anyone who knows the exact time when they were seeded, can predict their next result. Analog systems can be either (multiple) Ring Oscillators, and/or deliberately noisy circuits. Ring Oscillators should be spread-sectrum to avoid snooping systems being able to derive information. -jg
On 2007-12-07, karthikbalaguru <karthikbalaguru79@gmail.com> wrote:
> Hi, > Is it possible to generating Random Numbers via any hardware ?
Yes, and it doesn't even need to be particularly complex. See http://willware.net/hw-rng.html However, to be doubly sure of good randomness I'd recommend hashing the resulting data with e.g. MD5 to remove any biases caused by the hardware itself. -- Andrew Smallshaw andrews@sdf.lonestar.org
On Dec 7, 12:16 pm, "Jim Relsh" <jrel...@gmail.com> wrote:
> "karthikbalaguru" <karthikbalagur...@gmail.com> schreef in berichtnews:be043875-4c67-425a-b97c-7a9b7f779396@s8g2000prg.googlegroups.com... > > > Hi, > > Is it possible to generating Random Numbers via any hardware ? > > Google for 'Noise Diode'
Or "Johnson Noise" "Random number" -=Dave