Computational research notebook

Testing bounds on historical ciphers

A small open-source research notebook testing candidate keys, null controls, and codicological boundaries across historical enigmas.

Selected Notebook
CASE-001: The 1939 D’Agapeyeff Cipher
196 PAIRS · CANDIDATE RECONSTRUCTION UNDER REVIEW

Alexander D’Agapeyeff published a 392-digit challenge (196 coordinate pairs) in the 1939 first edition of Codes and Ciphers. He later acknowledged an error during encryption, lost his original keying notes, and could not reproduce the plaintext. The ciphertext remained an open historical puzzle.

Grid observations & padding strip:
1. Arrange the 196 coordinate pairs into a 14×14 grid.
2. Column 14 contains an anomalous digit 0 (coordinate pair 04 at position 97).
3. Reflect the matrix along its diagonal (Nick Pelling's hypothesis). This moves Column 14 into the bottom 14th row.
4. Strip Row 14 as trailing padding. Exactly 182 coordinate pairs (14×13) remain.
5. The Index of Coincidence jumps from 0.0521 to 0.0670 (matching standard English prose).
14×14 Coordinate Grid Inspector
0.0521
Index of Coincidence
196 pairs
Active Payload
Col 14 (Active)
Margin Status

Candidate Bordon Camp Reading

Double columnar transposition keyed by the survey keyword HYDROGRAPHICAL followed by vertical Two-Square inversion yields this late 1939 British survey dispatch reading:

BDN GRADIE CARON GOSSOME AS SHE SEND CARDS WERE ALL THAT AID
IF IT IS TO USE ORDER MEN GET WHERE A CLOSURE
ALL IT IS A SPECIAL CASE BUT YET AT ALL BOUND WERE
FOR AS IT IS A MORNING TOIL SECTOR ENSURE DAY BY DAY
EXPERTS WING SIGNALS
Status: This text is a testable candidate under community review, not a definitive historical solve. The complete parameter sweep, negative controls, and errata table are documented in the repository.

Run the verification script

git clone https://github.com/lessthanzero/cipher-lab.git
cd cipher-lab
uv sync --all-packages --group dev
uv run pytest tests/test_dagapeyeff.py -q
uv run python -m projects.dagapeyeff.exact_14key_sweep
CASE-002: The 1897 Dorabella Cipher
87 GLYPHS · CODICOLOGICAL BOUNDS & AUTOCORRELATION

Edward Elgar wrote an 87-character cipher note to Dora Penny in July 1897 using semicircular stroke glyphs. Many proposed solutions have assumed an English anagram keyed to Dora Penny or events in Wolverhampton.

Chronological boundary:
1. Elgar penned the exact same 24-glyph semicircular alphabet on an April 1886 Franz Liszt concert programme.
2. In April 1886, Dora Penny was an 11-year-old child whom Elgar had not yet met.
3. This rules out any solution dependent on Dora Penny or 1897 personal events.
4. Autocorrelation analysis on the glyph sequence reveals a +5.08 sigma peak at lag 6.
5. Lag 6 matches the 6-letter keyword length of the Schooling Nihilist challenge Elgar solved in 1896.

Melodic hypothesis exploration

Elgar composed musical ciphers throughout his career. Below is an exploratory Web Audio synthesizer testing pentatonic modal pitches mapped to the glyph orientations:

Elgar E-flat Major Modal Fragment Web Audio demonstration only · Exploratory hypothesis
Status: This audio sketch is an exploratory harmonic hypothesis, not evidence of a confirmed plaintext. Monoalphabetic English prose searches remain largely exhausted within tested statistical budgets.

Run the verification script

uv run pytest tests/test_dorabella.py -q
uv run python -m projects.dorabella.autocorrelation_sweep
CASE-003: The Shugborough Inscription
8 CHARACTERS · SHANNON UNICITY BOUND

The 8-letter sequence O U O S V A V V is carved into the 18th-century Shepherd's Monument at Shugborough Hall in Staffordshire.

Statistical boundary:
1. The Shannon unicity distance for monoalphabetic English is approximately 25 characters.
2. Shugborough contains only 8 characters, far below this threshold.
3. Single-key substitution searches on texts this short will almost always overfit.
4. A classical Latin initialism (such as Oro Ut Omnes Salvificentur) remains mathematically more plausible than an arbitrary English anagram.

Run the verification script

uv run pytest tests/test_shugborough.py -q
Methodological Principles

Simple rules to prevent confirmation bias and overfit on short historical texts:

Rule 01
Shannon Unicity Gate
Reject single-key optimization when the ciphertext length is shorter than Shannon unicity distance. Short texts are bounded, not solved by adding extra rules.
Rule 02
Monte Carlo Null Controls
Every candidate reading must score significantly higher than random shuffles, inverted alphabets, and foil grammars.
Rule 03
Multi-Model Peer Review
Use local and cloud models as adversarial reviewers to check edge cases and inspect negative controls, rather than relying on them to generate solutions.
Rule 04
Reproducible Test Suite
All data and baseline sweeps are verified by unit tests in a clean checkout. No external cloud credentials required.
Quickstart Reproduction
git clone https://github.com/lessthanzero/cipher-lab.git
cd cipher-lab
uv sync --all-packages --group dev
uv run pytest