# Random Number Generation via Hardware

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

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