in reply to Cryptographic Random Numbers
Some of the newer chipsets from Intel and AMD have built-in hardware RNGs. IIRC, AMD's newest chips are getting them built into the CPU itself.
If you don't have one of those, it's quite easy to build one yourself. You need a resistor and some way to precisely measure its resistance and send the values into a serial or parrellel port. The method of choosing a resistor get's stood on its head from normal practices--older resistors with high tolerance values are better (more entropy), provided it still conducts electricity.
In the program that reads the data from the RNG, you want to throw away the first couple of decimal places (maybe down the the ten-thousandth place, maybe more, depending on your level of paranoia). Gather a few thousand bits (again, adjust for your level of paranoia, as more bits == higher entropy) and run it through an SHA1 sum. You now have 160 bits of high-quality random numbers.
You should be able to accomplish this in a user-space driver. On *nix systems, it would be preferable to put it right in the kernel in order to feed the bits into /dev/random.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Cryptographic Random Numbers
by John M. Dlugosz (Monsignor) on Jul 09, 2003 at 18:12 UTC |