Chaos Lab

Applications · Information security

Chaos in cryptography

Chaotic dynamical systems share several useful properties with cryptographic primitives: extreme sensitivity to initial conditions (analogous to the avalanche property), broadband-like output spectra, ergodic invariant densities, and parameterised families with many free 'keys'.

Toy chaotic image cipher

step 1 (permutation):  apply Arnold cat map (k rounds) to scramble pixel positions
step 2 (diffusion):    XOR each pixel with a logistic-map keystream
                          x_{n+1} = r · x_n · (1 − x_n),  byte = floor(x · 256)

key = (x_0, r, k).  Reverse: regenerate keystream, XOR, then inverse cat map
(period 48 on a 64×64 grid).  Drift the decrypt seed by 0.001 — the picture
falls apart, classic SDIC consequence in chaos-based cryptography.

Tightly bound to the master Hash Lab discussion at hash.suparnpatra.com.

r > 3.57 is chaotic; r = 4 is the canonical full chaos. Try r = 3.7 to see weaker mixing.

Overall score: 4 / 8 tests passed at α = 0.01

Testp-valueVerdict (α = 0.01)What it checks
Frequency (monobit)0.057433PASSAre 0s and 1s balanced overall?
Block frequency (M = 128)0.020173PASSIs the 1-density similar in every 128-bit window?
Runs0.000000FAILAre runs of identical bits the right length?
Longest run (block = 8)0.000000FAILMax run of 1s within each 8-bit block.
Cumulative sums0.112266PASSMax excursion of the ±1 walk should match a Brownian-bridge tail.
Serial (m = 3)0.000000FAILAre all 3-bit patterns equally likely?
Approximate entropy (m = 3)0.000000FAILBandt-Pompe-style block entropy.
DFT spectral (first 2048 bits)0.239553PASSPeriodic structure in the bit stream?

Toy NIST SP800-22 scoreboard

Four of the simplest tests: monobit frequency, runs, longest-run (block = 8), and approximate-entropy (block = 3). p-value < 0.01 rejects the random null. The deliberately biased source should fail multiple tests; a well-tuned chaotic PRNG should pass.

Caveat: passing these toy tests is necessary but not sufficient for cryptographic use.

Stream ciphers

A chaotic map iterated under a secret seed produces a pseudo-random sequence used as a keystream. Examples: logistic-map ciphers, PWLCM-based ciphers, multi-stage coupled-map ciphers. Strength depends critically on finite-precision quantisation, which can destroy the underlying ergodicity.

Block ciphers

Baptista's 1998 cipher (Phys. Lett. A) used the logistic map as a substitution; modern cipher designs use Hénon, Arnold cat, or coupled maps for image and video encryption with confusion-diffusion structure.

Chaos-based hash functions

Hash compression functions built from chaotic maps are a research topic: PWLCM-based hashes, Chebyshev-polynomial hashes. Suparn's thesis explores cryptographic hashing using chaos — see the dedicated chaos-hash section at hash.suparnpatra.com (Hash Lab).

S-boxes

Chaotic maps generate S-boxes for AES-like designs. Strength is measured by nonlinearity, differential uniformity, and bit-independence; chaos-generated S-boxes often score comparably to AES's once linearity is checked.

Pitfalls

Alvarez and Li (2006) list standard mistakes: parameters revealed by analytic forms, quantisation eliminating positive Lyapunov exponents, key space that looks large but has equivalents, and a lack of provable-security tradition. Statistical NIST STS tests are necessary but not sufficient.

See also


Back to all applications.

Quick quiz

Test yourself on cryptography

8 multiple-choice questions. Pick an answer for each, then submit to see explanations.

  1. Q1.Why are chaotic maps appealing for cryptography?

  2. Q2.Baptista (1998) used which map for his cipher?

  3. Q3.A standard pitfall of chaos-based ciphers is:

  4. Q4.Alvarez & Li (2006) cataloged:

  5. Q5.Public-key chaos crypto based on Chebyshev maps was:

  6. Q6.Which property is most important for a chaos-based S-box?

  7. Q7.Chaos-based image encryption typically combines:

  8. Q8.Suparn Patra's PhD thesis applied chaos to:

0 of 8 answered