The IBAA64 CSPRNG (Cryptographically Secure Pseudo Random Number Generator) was developed to add a 64-bit capability to Bob Jenkins' IBAA CSPRNG. Not only does it provide a 64-bit capability, but it also provides a minimum 64-bit cycle length (through the use of an optional 64-bit unsigned counter).

The author finds the IBAA algorithm of great interest due to the fact that there is a mathematical proof of its security, as stated in the original paper by Bob Jenkins' ( IBAA ).

Note: The use of the counter should ensure that there are no bad initial states (tests confirm this).

IBAA64 passes the DIEHARD randomness test-suite.

As reported on Wikipedia, and verified by myself, IBAA and IBAA64 suffer from weak initial states.
The IBAA64 class provides the IBAA64::WarmUp() method to discard an initial amount of data, thereby bypassing weak initial states.


The IBAA64 algorithm:

IBAA64.h (The IBAA64 Algorithm; C++ header)

An IBAA64 C++ test program (which outputs 12e6 bytes for use with DIEHARD):

IBAA64.cxx


The IBAA32 CSPRNG (Cryptographically Secure Pseudo Random Number Generator) was developed to address:

  1. The short-cycle problem, and
  2. The Golden Ratio SHIFT value discrepancies in Bob Jenkins' IBAA CSPRNG.

IBAA32 provides a minimum 32-bit cycle-length through the use of an optional 32-bit unsigned counter.

Note: The use of the counter should ensure that there are no bad initial states (tests confirm this)

IBAA32 passes the DIEHARD randomness test-suite.

Whilst developing this CSPRNG, it was discovered that the use of the Golden Ratio (applied to BETA/32 divided by 1.6180339887) yields a somewhat different SHIFT value (20 as opposed to 19; relative to the original IBAA algorithm), when rounded up.

As reported on Wikipedia, and verified by myself, IBAA and IBAA32 suffer from weak initial states.
The IBAA32 class provides the IBAA32::WarmUp() method to discard an initial amount of data, thereby bypassing weak initial states.


The IBAA32 algorithm:

IBAA32.h (The IBAA32 Algorithm; C++ header)

An IBAA32 C++ test program (which outputs 12e6 bytes for use with DIEHARD):

IBAA32.cxx


Copyright © 2010 Robin Carey. All rights reserved.