ISAAC: a fast cryptographic random number generator

I have a challenge and small prize associated with breaking ISAAC.

The files below implement ISAAC in C. The function randinit() must be called before ISAAC can be used, but after that any module that #includes rand.h can call rand() to get 32-bit random values.

ISAAC (Indirection, Shift, Accumulate, Add, and Count) generates 32-bit random numbers. Averaged out, it requires 18.75 machine cycles to generate each 32-bit value. Cycles are guaranteed to be at least 240 values long, and they are 28295 values long on average. The results are uniformly distributed, unbiased, and unpredictable unless you know the seed.

Others have translated ISAAC into other languages:

ISAAC-64 generates a different sequence than ISAAC, but it uses the same principles. It uses 64-bit arithmetic. It generates a 64-bit result every 19 instructions. All cycles are at least 272 values, and the average cycle length is 216583.

The following files implement ISAAC-64. The constants were tuned for a 64-bit machine, and a complement was thrown in so that all-zero states become nonzero faster.

There are lots of random number generators out there. Why use ISAAC?

Attacks on ISAAC by someone other than Bob Jenkins:

Internal links:
Hash functions and block ciphers
Perpetual motion machines
Table of Contents