Ciphers

Quagmire I

The ACA's first Quagmire. A keyed plain alphabet slides along a straight one. An indicator word says how far.
IDquagmire-114 / 69classical · polyalphabetic
Cipher / Polyalphabetic

Quagmire I

A keyed plain alphabet over a straight one, slid by an indicator word.

Keyspace
26! × 26^indicatorLength
Decode
same options back
Works on
A-Z, the rest passes
Family
14 in polyalphabetic
required 2 / 3

Options

keystring
required
Keyword for the plain alphabet, the rest of A-Z after it
indicatorstring
required
Indicator keyword, written down the column under indicatorUnder: each letter sets the cipher row for one letter of the text, in turn
indicatorUnderstring
default A
The plain letter the indicator keyword stands under

Access

Createcreate("quagmire-1")
CLIciphers encode quagmire-1 'THE QUAG ONE' --key SPRINGFEVER --indicator FLOWER
Tryplayground with the sample above
Kinvigenere, gronsfeld, beaufort, porta +9

Vigenère in a disguise. The ACA numbers its Quagmires the way it numbers keyed alphabets, so Quagmire I keys the plain side and leaves the cipher side straight. SPRINGFEVER turns the plain alphabet into SPRINGFEVABCD…. Then a second word, the indicator, runs down the column under plain A. Each of its letters sets one row of the tableau, and the text takes the rows in turn.

ts
const quagmire = create("quagmire-1");
const keys = { key: "SPRINGFEVER", indicator: "FLOWER" };
quagmire.encode("The quag one", keys).text; // "Qpm gqrb uju"
quagmire.decode("QPMGQRBUJU", keys).text; // "THEQUAGONE"

That's the start of the ACA's example. FLOWER has six letters, so the rows come round every six.

What does the indicator do?

Look down the column under plain A. The first row has F there, then L, O, W, E and R. That's the whole trick. The cipher alphabet slides until the indicator letter sits under A, and every other letter follows.

Under A every time? Not quite. Some puzzles hang the indicator under another letter. indicatorUnder names that letter, A by default. Get it wrong and the text comes out as confident garbage, so check the puzzle's wording.

The rest of the text

Only ASCII letters move the indicator along. Spaces and punctuation pass through. Lowercase stays lowercase unless preserveCase is false, and stripNonAlpha drops everything outside A to Z first. The keywords ignore case and anything that isn't a letter. A missing one is a MissingOptionError, one without letters an InvalidOptionError.

Breaking one

It's periodic, so period finds the indicator's length. On the 319 letters that open A Tale of Two Cities, under a seven letter indicator, it put 7 first for each of the four Quagmires. Ignore the key it prints next to it though. That's a Vigenère guess, and here it means nothing.

recover doesn't know the Quagmires, so the rest is yours. Every column is one substitution, and all of them come from one keyed alphabet. Rebuild that alphabet once and the columns fall together. Fun, in a long evening kind of way.