DSPRelated.com
Forums

8 bit white noise algorithm

Started by sonos August 4, 2006
Hi,

any suggestions for an 8 bit white noise algorithm?
"sonos" <sonos@nospam.com> wrote in message 
news:MumdneYfc8rInEnZnZ2dnUVZ_oWdnZ2d@giganews.com...
> Hi, > > any suggestions for an 8 bit white noise algorithm?
Use the Advanced Encryption Standard (AES) to encrypt a 16-byte counter yielding a block of 16 random bytes. Increment the counter and encrypt each time you need another 16 random bytes. http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf Obviously, the stream is pseudo-random, but you probably will never be able to distinguish it from random white noise. (If you could, it would mean that AES is broken.) There are other variations on this theme and there's at least one USENET group with this specific focus: sci.crypt.random-numbers. When it comes to long periods and other desirable properties, this technique beats the snot out of Linear Feedback Shift Registers and Linear Congruential Generators. Could you be a little more specific about what you want?
"sonos" <sonos@nospam.com> wrote in message 
news:MumdneYfc8rInEnZnZ2dnUVZ_oWdnZ2d@giganews.com...
> Hi, > > any suggestions for an 8 bit white noise algorithm?
Use the Advanced Encryption Standard (AES) to encrypt a 16-byte counter yielding a block of 16 random bytes. Increment the counter and encrypt each time you need another 16 random bytes. http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf Obviously, the stream is pseudo-random, but you probably will never be able to distinguish it from random white noise. (If you could, it would mean that AES is broken.) There are other variations on this theme and there's at least one USENET group with this specific focus: sci.crypt.random-numbers. When it comes to long periods and other desirable properties, this technique beats the snot out of Linear Feedback Shift Registers and Linear Congruential Generators. Could you be a little more specific about what you want?
sonos <sonos@nospam.com> writes:

> Hi, > > any suggestions for an 8 bit white noise algorithm?
Perform the following 16-bit linear congruential sequence generator: x[n] = ((9821 * x[n-1]) + 6925) mod 65535 and then use the upper byte and lower byte. The multiplier and addend are from Stephen Park. -- % Randy Yates % "Bird, on the wing, %% Fuquay-Varina, NC % goes floating by %%% 919-577-9882 % but there's a teardrop in his eye..." %%%% <yates@ieee.org> % 'One Summer Dream', *Face The Music*, ELO http://home.earthlink.net/~yatescr
sonos <sonos@nospam.com> wrote in 
news:MumdneYfc8rInEnZnZ2dnUVZ_oWdnZ2d@giganews.com:

> Hi, > > any suggestions for an 8 bit white noise algorithm?
I've always like the linear feedback shift register approach. It's dirt simple to implement with simple bit ops. See http://en.wikipedia.org/wiki/Linear_feedback_shift_register -- Scott Reverse name to reply
Scott Seidman <namdiesttocs@mindspring.com> wrote in 
news:Xns981857C695215scottseidmanmindspri@130.133.1.4:

> sonos <sonos@nospam.com> wrote in > news:MumdneYfc8rInEnZnZ2dnUVZ_oWdnZ2d@giganews.com: > >> Hi, >> >> any suggestions for an 8 bit white noise algorithm? > > I've always like the linear feedback shift register approach. It's dirt > simple to implement with simple bit ops. See > http://en.wikipedia.org/wiki/Linear_feedback_shift_register > > >
Oops-- missed the 8-bit part. Sorry. -- Scott Reverse name to reply
Scott Seidman wrote:
> sonos <sonos@nospam.com> wrote in > news:MumdneYfc8rInEnZnZ2dnUVZ_oWdnZ2d@giganews.com: > >> Hi, >> >> any suggestions for an 8 bit white noise algorithm? > > I've always like the linear feedback shift register approach. It's dirt > simple to implement with simple bit ops. See > http://en.wikipedia.org/wiki/Linear_feedback_shift_register
According to Knuth, the bits _within_ the SR aren't very random, even though successive _output_ bits exhibit little correlation. An SR is nice, but you need to advance it once for each output bit. Running parallel SRs of different characteristics is a good hardware speedup, but does nothing for a single processor. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Scott Seidman wrote:

> Oops-- missed the 8-bit part. Sorry.
We're evidently on the same page. &#1407;&#4294967295; &#4294967295; Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins wrote:
> Scott Seidman wrote:
>> I've always like the linear feedback shift register approach. >> It's dirt simple to implement with simple bit ops. See >> http://en.wikipedia.org/wiki/Linear_feedback_shift_register > > According to Knuth, the bits _within_ the SR aren't very random, > even though successive _output_ bits exhibit little correlation. > An SR is nice, but you need to advance it once for each output > bit. Running parallel SRs of different characteristics is a good > hardware speedup, but does nothing for a single processor.
It may do something when the processor has multiple execution units and/or deep pipelines, no? Martin -- I am an Indian and looked upon by the whites as a foolish man; but it must be because I follow the advice of the white man. --Shunka Witko
Jerry Avins <jya@ieee.org> wrote in news:GIOdneiE98-G5ErZnZ2dnUVZ_v-
dnZ2d@rcn.net:

> Scott Seidman wrote: > >> Oops-- missed the 8-bit part. Sorry. > > We're evidently on the same page. &#1407;&#4294967295; > &#4294967295; > Jerry
I suppose you can run eight of these guys and seed them separately, but there would be some concerns. Still, a great way to get a pseudo random bit stream, but that's about it. -- Scott Reverse name to reply