View Single Post
  #39   Report Post  
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
John Larkin John Larkin is offline
external usenet poster
 
Posts: 1,420
Default Random Bit Generator

On Sat, 23 Oct 2010 20:00:32 -0700, Robert Baer
wrote:

Vladimir Vassilevsky wrote:


Jim Thompson wrote:

I'd like to conjure up a random bit generator.


Question: Why it is impossible to have sex in the middle of the Red
Square in Moscow?

Answer: Because every idiot bystander will be eager to give his
invaluable advice.


So everybody is suggesting the LSFR. LSFRs are trivial; zero state
problem has to be dealt with. I try doing something different just for
the sake ot it.

Take a binary counter, compute some ugly logical function from its
output.

Vladimir, What's your definition of "ugly" ?:-)


Take two binary counters. One counts to 2^N, the other one counts to
some odd number. Compute parity function of both counters. Here you go.

Take a binary adder and a register. Add some odd number at every cycle.
Tale a bit somewhere from the middle of the register.

Take a binary adder and a register. Multiply by (2^N - 1), i.e.
leftshift and subtract. Set the LSB to 1 to avoid all zero state.

There is approximately a zillion of ways of making quazi random (or true
random) generator from whatever stuff you got in the drawers. BTW, some
25 years ago I made random generator from relays. However, that was LSFR
:-)



Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

One CANNOT compute (or generate from logic) a truly random number.
Now, quasi-random number generators are a dime a dozen, like you imply.



There are lots of digital chips, including some Intel processors, that
have cryptographic-grade random number generators on-chip. One common
technique is to use a bunch of asynchronous ring oscillators to
scramble pseudo-random shift registers. Lots of references on the web.

I have a technique that uses an i/o pin as a noisy/chaotic RC ramp
generator. Fun, but essentially useless.

John