Chaos Lab

Tool

Chaos-based PRNG

Convert any of five chaotic maps into a deterministic byte stream keyed by a seed and a parameter. Visualise byte uniformity (histogram + lag plot), check Shannon entropy + χ² uniformity, then download the bytes as raw binary or a hex dump.

Byte histogram

Lag plot byte_n vs byte_{n+1}

Statistics

Shannon entropy (bits/byte)7.7497 / 8.0000
Mean (expected 127.5)131.265
Std dev (expected ≈ 73.9)89.062
χ² (uniform, 255 d.o.f.)32373.94 (p ≈ 0.0000)

First 32 bytes: ff 00 02 0a 29 8a fe 06 1a 5e ed 43 c6 b3 d7 89 fe 05 16 51 dd 77 fe 05 14 4b d4 8f fc 0f 3a b3

The same (map, seed, parameter) tuple deterministically reproduces the full stream. Treat (seed, parameter) as the symmetric key.

Diagnostic interpretation

  • Histogram should be roughly flat at the expected level (256 bins, height ≈ N/256).
  • Lag plot should be a uniform speckled square. Visible lines or curves mean strong correlations.
  • Shannon entropy ≈ 8.0 bits/byte for ideal randomness.
  • χ² with 255 d.o.f. should be near 255 (p ≈ 0.5). χ² ≫ 290 or p ≪ 0.01 means the byte distribution is non-uniform.

Pair this tool with /tools/nist to run the full SP800-22 sub-suite on the bit stream.

Cross-link: feed the bytes (or just use the same parameters) into /tools/nist to run the full NIST SP800-22 sub-suite.

FAQ

Frequently asked questions