Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!necntc!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: sci.crypt Subject: Random number generation Message-ID: <89@lakart.UUCP> Date: 4 May 88 15:35:18 GMT Organization: Lake - The systems people Lines: 37 I post this here because having looked at sci.crypt, I see a lot of references to "random" number generators in the context of their usage as one time pads. Long time ago I saw an article that explained how to generate "random" numbers by shifting a pattern of bits, looking at two of the bits, exclusive-or'ing the two bits, and using the result as the new bit at the bottom: bits := seed and 10010000 seed := seed + seed if (bits = 10000000 or bits = 00010000) seed := seed + 1 Now my problem is as follows: Ignoring the "demon" state (all zeros) for a given bit pattern length, it may be possible to generate a maximal sequence (i.e. 2**n - 1). Whether this happens depends on the two bits you look at. Does anyone have a list of the bit pairs for various pattern lengths that will generate maximal lists. To do it by exhaustive search is feasible up to about 24 bits, but after that it starts getting rediculous. (I only have a 68020 here, and not a CRAY :-) Alternatively, if anyone else knows a different method for generating "random" numbers, preferably 32/48/64 bit I'd like to hear it. I'd try the seed = seed * const + other_const technique, except that I have been lead to believe that the bottom bits of this have a tendancy to exhibit a cyclic pattern. Thanks in advance, -- dg@lakart.UUCP - David Goodenough +---+ | +-+-+ ....... !harvard!adelie!cfisun!lakart!dg +-+-+ | +---+