Article View: sci.crypt
Article #2940Wanted: very fast random number generator
From: Tom Lane
Date: Tue, 26 Jan 1993 19:36
Date: Tue, 26 Jan 1993 19:36
15 lines
1310 bytes
1310 bytes
This isn't exactly a cryptographic problem, but I suspect sci.crypt is the best place to ask. What I need is a very very fast random number generator; it does NOT need to be cryptographically strong. The application is in generating random noise for dithering a color image. I need about 8 random bits on each call (randomness of the low order bits is less important than the higher). Ideally it would take, say, just a shift and XOR per value. The code has to be portable C, so circular shifts and other non-C operations are out. I think something along the lines of a shift register with a constant pattern XORed in after every shift might solve my problem. But I don't know how to design such a thing. Info or references would be appreciated. thanks, tom lane
Technical Details
Message-ID:
<C1H7tG.7At.2@cs.cmu.edu>Path:
arc1-ca.pugleaf.net!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!tglShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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 From: tgl+@cs.cmu.edu (Tom Lane) Newsgroups: sci.crypt Subject: Wanted: very fast random number generator Summary: maybe a shift register would do? Message-ID: <C1H7tG.7At.2@cs.cmu.edu> Date: 26 Jan 93 19:36:45 GMT Sender: news@cs.cmu.edu (Usenet News System) Organization: School of Computer Science, Carnegie Mellon Lines: 15 Nntp-Posting-Host: g.gp.cs.cmu.edu