Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GltRandomLFSRMix Class Reference
[GLT Math]

Multiple LFSR (Linear Feedback Shift Register) generator. More...

#include <random.h>

List of all members.

Public Methods

 GltRandomLFSRMix (const uint32 seed1=199125, const uint32 seed2=90618, const uint32 seed3=189419)

 GltRandomLFSRMix (const GltRandomLFSRMix &rng)
 Copy constructor.

 ~GltRandomLFSRMix ()

uint32 rand () const
 32-bit random number

uint32 max () const
 Maximum possible random number: 0xFFFFFFFF.

GltRandomLFSRMix & base ()
 Base random number generator.

const GltRandomLFSRMix & base () const
 Base random number generator.

Static Public Attributes

GltRandomLFSRMix rng
 A global LFSRMix random number generator for convenience.

Detailed Description

Multiple LFSR (Linear Feedback Shift Register) generator.

Larry Smith , Nigel Stewart, RMIT (
Original Pascal implementation from unknown source
This random number generator uses three LFSRs (Linear Feedback Shift Registers) to create long sequences of random bits. Each bit is equally randomised. The origins of this exact algorithm is unknown. This implementation is based on the ctools module rndnums by Larry Smith, used with permission.

It is not really known how good this method is for random number generation - but it has the advantage of generating 32 random bits. Probably not recommended for crypto applications....

Further information about LFSRs:

B. Schneier, Applied Cryptography, 2nd Ed, Johyn Wiley & Sons

Definition at line 111 of file random.h.

The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:45 2002 for GLT by doxygen1.2.18