RNG White Noise Tests

aesofb_spectrograph-web

aesofb_spectrum

For the upcoming White Noise Boutique, I’ll be generating bespoke white noise for visitors using a variety of methods. These quick tests show that, while they sound essentially the same, different algorithms do in fact generate different white noise. For each generator, a spectrogram and frequency plot are shown for a ten-second sample. The plots were generated with Audacity.

Above: the AES_OFB algorithm from the Dieharder suite, one of two cryptographically-secure methods.

congruential_spectrograph-web

congruential_spectrum

Linear congruential generator, an old-fashioned and non-secure generator.

devrandom_spectrograph-web

devrandom_spectrum

The only “true” generator here, via the operating system’s built-in “dev/random” command, which creates random numbers from hard drive entropy.

threefish_spectrograph-web

threefish_spectrum

The Threefish generator, also via the Dieharder suite and the other cryptographically-secure algorithm.

2d Array Generation Stats

While wrapping up an Arduino-based game project, I wanted to see how large a level (stored as a 2d array) could be stored on the Arduino while not making the user wait too long. Running some test code (available as a Gist here), two interesting discoveries:

  1. It seems that a 2d array of integers larger than 28×28 integers will crash (no error message, just stop responding)
  2. Varying the array size below that has basically no impact on creation time. A 10×10 and 28×28 array with 1000 random steps through the array both take 145ms from boot. Increasing the number of steps to 2000 increases the load time to 289ms.