home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / sci / crypt / 7163 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.3 KB

  1. Path: sparky!uunet!opl.com!hri.com!spool.mu.edu!caen!kuhub.cc.ukans.edu!husc-news.harvard.edu!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!tgl
  2. From: tgl+@cs.cmu.edu (Tom Lane)
  3. Newsgroups: sci.crypt
  4. Subject: Wanted: very fast random number generator
  5. Summary: maybe a shift register would do?
  6. Message-ID: <C1H7tG.7At.2@cs.cmu.edu>
  7. Date: 26 Jan 93 19:36:45 GMT
  8. Sender: news@cs.cmu.edu (Usenet News System)
  9. Organization: School of Computer Science, Carnegie Mellon
  10. Lines: 15
  11. Nntp-Posting-Host: g.gp.cs.cmu.edu
  12.  
  13. This isn't exactly a cryptographic problem, but I suspect sci.crypt is the
  14. best place to ask.
  15.  
  16. What I need is a very very fast random number generator; it does NOT need to
  17. be cryptographically strong.  The application is in generating random noise
  18. for dithering a color image.  I need about 8 random bits on each call
  19. (randomness of the low order bits is less important than the higher).
  20. Ideally it would take, say, just a shift and XOR per value.  The code has to
  21. be portable C, so circular shifts and other non-C operations are out.
  22.  
  23. I think something along the lines of a shift register with a constant
  24. pattern XORed in after every shift might solve my problem.  But I don't
  25. know how to design such a thing.  Info or references would be appreciated.
  26.  
  27.             thanks, tom lane
  28.