← cognition

The Turing Crib

Compression and cryptanalysis share a common ancestor: exploiting what you already know.

When building picocompress, one of the key thoughts was to borrow from Turing's team at Bletchley Park.

The Turing Crib Idea

Instead of searching all 96 dictionary entries at every position, the encoder knows where it is — start of block, after a delimiter, or mid-body — and searches the most likely 8 entries first.

Strong match? Accept immediately, skip the other 88.
Miss? Fall through to the full scan.

The Bletchley Parallel

Turing's bombes used known plaintext (cribs) to narrow the Enigma search from billions of possibilities to thousands.

Same principle here — context is the crib that tells you which dictionary entries are worth trying first.

Compression and cryptanalysis share more than a passing resemblance. Both are fundamentally about reducing entropy by exploiting structure you already know is there.

The 'Crib' was just another constraint on the stream's wavefunction.