Under construction. A new version of this site is being built. Everything here still works: records still verify and contributions are still accepted.

open-liber-primus · topics

Autokey and chain ciphers (the text keys itself)

Each rune is keyed by an earlier rune of the plaintext or of the ciphertext. Plaintext autokey, ciphertext autokey and chain ciphers with a key that ignores the plaintext are ruled out; a feedback rule that changes the key only sometimes is open.

partly ruled outautokeyfeedbackself-keyingchainmixed alphabet

What it is

Instead of a separate key, the message keys itself: each rune is shifted by the plain rune (plaintext autokey) or by the encrypted rune (ciphertext autokey) some places before it. A chain cipher adds a key as well: each cipher rune is the previous cipher rune plus the plain rune plus a key rune.

What was tried

What follows

Plaintext autokey, judged by repeated neighbours: ruled out on all 8 unsolved sectionsEach real section's count of repeated neighbours is lower than in all 199 simulated ciphers050100150200repeated neighbours (count)sectionsection 7: this text 4; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out7ruled outsection 8: this text 6; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out8ruled outsection 9: this text 9; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out9ruled outsection 11: this text 10; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out11ruled outsection 12: this text 11; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out12ruled outsection 13: this text 13; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out13ruled outsection 14: this text 12; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out14ruled outsection 15: this text 21; 0 of 199 simulated ciphers of this kind are as low or lower · ruled out15ruled outsection 1 (solved: a control): this text 16; 67 of 199 simulated ciphers of this kind are as low or lower · fits1fitssection 5 (solved: a control): this text 9; 62 of 199 simulated ciphers of this kind are as low or lower · fits5fitssection 16 (solved: a control): this text 2; 78 of 199 simulated ciphers of this kind are as low or lower · fits16fits199 simulated ciphers (box 25–75%, whiskers 1–99%)real: ruled outreal: fitssolved sections
Figure 1. Each rune is keyed by the plaintext rune 1 to 20 places before it (a primer starts it off), added or subtracted, as its index or its prime. Judged by how often a rune is followed by the same rune. For each section, 199 such ciphers are drawn at random and applied to English of the section's length; the box plot shows what they give, the marker shows the real section. The kind is ruled out where the real value lies beyond 99% of the simulations (p ≤ 0.01). Shaded: solved sections. No solved section uses this kind, so there is no control.
No chain cipher with a key that ignores the plaintextAny such cipher lies on or above the curve; the pages lie below it (chance at most 8e-06, at the cipher's best point)1.001.011.021.031.04IoC after undoing the chainshare of neighbours that repeat (%)possible for a chain cipherthe unsolved pages: 0.66% repeats, IoC 1.0244 (95%: ±0.14 points, ±0.0026)the unsolved pagesattack: chain ciphers keyed at the optimum, on Englishthe cipher's best point: 0.94% repeats0.400.600.801.001.201.401.601.802.00the unsolved pages, 95% both waysleast any chain key allowsattack: best chain ciphers on English
Figure 2. A chain cipher c_i = c_(i-1) + p_i + k_i repeats a rune exactly when p_i + k_i = 0. Few repeats force the key onto a few letters, and then plaintext plus key (what undoing the chain leaves) is uneven. Orange: the least unevenness possible at each repeat rate, for this book's English (the cautious model); shaded: where chain ciphers can be. The pages sit below it. Open circle: the cipher's best point, combining both uncertainties. Diamond: chain ciphers built at the optimum, on English, land on the curve. Sections 7–15 together.

Still open

Gathered from the records

key searches on unsolved sections (24)
  • section 11: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg11-autokey1
  • section 12: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg12-autokey1
  • section 13: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg13-autokey1
  • section 14: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg14-autokey1
  • section 15: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg15-autokey1
  • section 7: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg07-autokey1
  • section 8: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg08-autokey1
  • section 9: autokey(29 primers, map∈{index,prime}, mode∈{sub,add}) search-seg09-autokey1
  • section 11: difference(mode∈{sub,add}) → shift(k∈0..28) seg11-chain-shift
  • section 12: difference(mode∈{sub,add}) → shift(k∈0..28) seg12-chain-shift
  • section 13: difference(mode∈{sub,add}) → shift(k∈0..28) seg13-chain-shift
  • section 14: difference(mode∈{sub,add}) → shift(k∈0..28) seg14-chain-shift
  • section 15: difference(mode∈{sub,add}) → shift(k∈0..28) seg15-chain-shift
  • section 7: difference(mode∈{sub,add}) → shift(k∈0..28) seg07-chain-shift
  • section 8: difference(mode∈{sub,add}) → shift(k∈0..28) seg08-chain-shift
  • section 9: difference(mode∈{sub,add}) → shift(k∈0..28) seg09-chain-shift
  • section 11: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg11-chain-streams
  • section 12: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg12-chain-streams
  • section 13: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg13-chain-streams
  • section 14: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg14-chain-streams
  • section 15: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg15-chain-streams
  • section 7: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg07-chain-streams
  • section 8: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg08-chain-streams
  • section 9: difference(mode∈{sub,add}) → stream(name∈{primes,totient_primes,fibonacci,naturals}, skip∈0..199, mode∈{sub,add}) seg09-chain-streams
class tests (41)
open tasks (10)
claims from elsewhere (not checked) (3)

Check this report: bin/olp topic autokey --check re-runs every record it cites. Improve it: edit topics/autokey.md (every claim needs a citation; see the format in olp/topics.py). Related: The missing repeats (the main open lead), Secret alphabets (Quagmire, Gromark, keyed alphabets)

Curiosity above all. Nobody here is paid, ranked or promised anything. The Liber Primus is worked on because it is interesting: a careful dead end, an odd statistic, a better tool, a good question, all count. Bring your curiosity; the checker keeps us honest.