Dennis Shasha/Codes, Puzzles, and Conspiracy/3/Humpty Dumpty at the Irish Cliffs

== Code ==
::Jkwr K wbj N:
:Ox on kwrhf Nwxzrjwf iarbobt wbj O iotmy haoy el xeil yb klipfls
:ynm jmzzmt zc zon wddm pevro hvoonov. Po avo ef edv paj be
:Svolafn. Haryovqfego rct ifd tshye hgy uedm. V'p ihe ugyr stn,
:sdksyf fufg vu sgtu hwzy uvnzyzlm haivc h yxmdj omnqwdzijamn
:xajy Wnojuwn Emvkmdn, nyoxe nc Xu Pjabon. Dxezkeb az jqpac
:mbmn vqp mha sqyerj, tpn E zqptn en.
::Ca daayd dpdgeseqpdxv cnhhw. "Odc Uzghhf sh Asedk," fe
:hqzh ltxxivn gji hsxfj hkti nehtkwoh, "uji Afmnnl yn Gykjq. Ezy
:kngg gntj wlki, Kcca, O wi nzrk."
::O wi bax. Dzx pahhal ik xa Orkhwbj. If bkvx hkxxkr lohh dk
:ob xml Vxjlo jaolaj pc Dbsv. P nygm kylm y ozgra ds hrqrarew ra
:opofoiov S'm sf bqp bwpb. Kfe qtmm utgo crq ifxcdgx dg jq c
:tdxchzq jfd tuhiqxq ncpl hcoqp Chhq G'Ighhqnn. Ngicn wqgwnq
:dsvib uts'v kzegn twfu fqq vub hgre kz Ylmg xhklu mgboyldx yl
:Yburglt. Njh xwv zy hm lkiyihmuzme evmvhslezyi. Ivss xwd rml idw
:jdranf jm banv rmld omlzan Aziio M'Omnnwtt. Zyx ybuu gbrx snm
:kzy poly.
:::::U
== Solution ==
;Initial Observations
The message is a letter.
It is assumed that it is written in a substitution cipher such that the punctuation and word structure are unchanged.
Based on the first coded letter, the first line is clearly
Jkwr K wbj N:
Dear E and S:
where E and S stand for Evangeline and Scarlet.
It is also assumed that the U at the end is J.
It can be seen that there are several occurrences of a single-letter word consisting of one capital letter.
There is only one such in the English language, that is: I.
Initial observation suggests that the key is the same as that for the first coded letter.
This assumption is based directly on the fact that wbj means and in both letters.
Recall:
S psll feb
I will not
ho ahlo be dro bqsr geno axasf.
be able to use this code again.
Bqo ofgensfx et bqo morraxo S loaio fozb bsmo psll vebabo
The encoding of the message I leave next time will rotate
efgo oagq bsmo bqo morraxo gefbasfr bqo lobbov ... poll, jed psll
once each time the message contains the letter ... well, you will
tsxdvo sb edb.
figure it out.
Recall the key for the initial ciphertext:
:$\begin {array} {c|c} \text {Plaintext} & \texttt A & \texttt B & \texttt C & \texttt D & \texttt E & \texttt F & \texttt G & \texttt H & \texttt I & \texttt J & \texttt K & \texttt L & \texttt M & \texttt N & \texttt O & \texttt P & \texttt Q & \texttt R & \texttt S & \texttt T & \texttt U & \texttt V & \texttt W & \texttt X & \texttt Y & \texttt Z \\ \hline \text {Ciphertext} & \texttt W & \texttt D & \texttt C & \texttt J & \texttt K & \texttt P & \texttt T & \texttt M & \texttt O & \texttt G & \texttt U & \texttt H & \texttt I & \texttt B & \texttt A & \texttt Q & \texttt S & \texttt R & \texttt N & \texttt X & \texttt Z & \texttt E & \texttt L & \texttt V & \texttt F & \texttt Y \end {array}$
Let us translate the letter, and see what makes sense.
We go at least as far as the occurrences of O in the third paragraph.
Jkwr K wbj N:
Dear E and S:
Ox on kwrhf Nwxzrjwf iarbobt wbj O iotmy haoy el xeil yb klipfls
It is early Saturday morning and I migh loi w t m n ewmfyw
ynm jmzzmt zc zon wddm pevro hvoonov. Po avo ef edv paj be
 sh dhuuhg uc uis abbh f vri lviisiv. Fi ovi bv fod n
Svolafn. Haryovqfego rct ifd tshye hgy uedm. V'p ihe ugyr stn,
 viwoys. Lor iv y i rcg myb g l l bh. X'f ml r gs,
sdksyf fufg vu sgtu hwzy uvnzyzlm haivc h yxmdj omnqwdzijamn
 be y y y x g lau xsu uwh lomxc l th d ihs abumdohs
xajy Wnojuwn Emvkmdn, nyoxe nc Xu Pjabon. Dxezkeb az jqpac
tod Asid as hxehbs, s it sc T Fdonis. Bt ue n o d foc
mbmn vqp mha sqyerj, tpn E zqptn en.
hnhs x f lo rd, gfs u fgs s.
Ca daayd dpdgeseqpdxv cnhhw. "Odc Uzghhf sh Asedk," fe
Co boo b bfb fbtx slla. "Ibc u lly l O be," y
hqzh ltxxivn gji hsxfj hkti nehtkwoh, "uji Afmnnl yn Gykjq. Ezy
l ul wgttmxs dm l tyd legm s lgeail, " dm Oyhssw s eda. u
kngg gntj wlki, Kcca, O wi nzrk."
es sgd awem, Ecco, I am sure."
O wi bax. Dzx pahhal ik xa Orkhwbj. If bkvx hkxxkr lohh dk
I am not. But follow me to Ireland. My next letter will be
ob xml Vxjlo jaolaj pc Dbsv. P nygm kylm y ozgra ds hrqrarew ra
in thw Xtdwi doiwod fc Bn x. 
We have enough of this translated to see that the letter triggering the rotation is h.
Here is the code, in all $26$ variants:
$\quad \begin{array}{c|cccccccccccccccccccccccccc}
& \texttt A & \texttt B & \texttt C & \texttt D & \texttt E & \texttt F & \texttt G & \texttt H & \texttt I & \texttt J & \texttt K & \texttt L & \texttt M & \texttt N & \texttt O & \texttt P & \texttt Q & \texttt R & \texttt S & \texttt T & \texttt U & \texttt V & \texttt W & \texttt X & \texttt Y & \texttt Z \\ \hline
1 & \texttt W & \texttt D & \texttt C & \texttt J & \texttt K & \texttt P & \texttt T & \texttt M & \texttt O & \texttt G & \texttt U & \texttt H & \texttt I & \texttt B & \texttt A & \texttt Q & \texttt S & \texttt R & \texttt N & \texttt X & \texttt Z & \texttt E & \texttt L & \texttt V & \texttt F & \texttt Y \\
2 & \texttt X & \texttt E & \texttt D & \texttt K & \texttt L & \texttt Q & \texttt U & \texttt N & \texttt P & \texttt H & \texttt V & \texttt I & \texttt J & \texttt C & \texttt B & \texttt R & \texttt T & \texttt S & \texttt O & \texttt Y & \texttt A & \texttt F & \texttt M & \texttt W & \texttt G & \texttt Z \\
3 & \texttt Y & \texttt F & \texttt E & \texttt L & \texttt M & \texttt R & \texttt V & \texttt O & \texttt Q & \texttt I & \texttt W & \texttt J & \texttt K & \texttt D & \texttt C & \texttt S & \texttt U & \texttt T & \texttt P & \texttt Z & \texttt B & \texttt G & \texttt N & \texttt X & \texttt H & \texttt A \\
4 & \texttt Z & \texttt G & \texttt F & \texttt M & \texttt N & \texttt S & \texttt W & \texttt P & \texttt R & \texttt J & \texttt X & \texttt K & \texttt L & \texttt E & \texttt D & \texttt T & \texttt V & \texttt U & \texttt Q & \texttt A & \texttt C & \texttt H & \texttt O & \texttt Y & \texttt I & \texttt B \\
5 & \texttt A & \texttt H & \texttt G & \texttt N & \texttt O & \texttt T & \texttt X & \texttt Q & \texttt S & \texttt K & \texttt Y & \texttt L & \texttt M & \texttt F & \texttt E & \texttt U & \texttt W & \texttt V & \texttt R & \texttt B & \texttt D & \texttt I & \texttt P & \texttt Z & \texttt J & \texttt C \\
6 & \texttt B & \texttt I & \texttt H & \texttt O & \texttt P & \texttt U & \texttt Y & \texttt R & \texttt T & \texttt L & \texttt Z & \texttt M & \texttt N & \texttt G & \texttt F & \texttt V & \texttt X & \texttt W & \texttt S & \texttt C & \texttt E & \texttt J & \texttt Q & \texttt A & \texttt K & \texttt D \\ 
7 & \texttt C & \texttt J & \texttt I & \texttt P & \texttt Q & \texttt V & \texttt Z & \texttt S & \texttt U & \texttt M & \texttt A & \texttt N & \texttt O & \texttt H & \texttt G & \texttt W & \texttt Y & \texttt X & \texttt T & \texttt D & \texttt F & \texttt K & \texttt R & \texttt B & \texttt L & \texttt E \\
8 & \texttt D & \texttt K & \texttt J & \texttt Q & \texttt R & \texttt W & \texttt A & \texttt T & \texttt V & \texttt N & \texttt B & \texttt O & \texttt P & \texttt I & \texttt H & \texttt X & \texttt Z & \texttt Y & \texttt U & \texttt E & \texttt G & \texttt L & \texttt S & \texttt C & \texttt M & \texttt F \\
9 & \texttt E & \texttt L & \texttt K & \texttt R & \texttt S & \texttt X & \texttt B & \texttt U & \texttt W & \texttt O & \texttt C & \texttt P & \texttt Q & \texttt J & \texttt I & \texttt Y & \texttt A & \texttt Z & \texttt V & \texttt F & \texttt H & \texttt M & \texttt T & \texttt D & \texttt N & \texttt G \\
10 & \texttt F & \texttt M & \texttt L & \texttt S & \texttt T & \texttt Y & \texttt C & \texttt V & \texttt X & \texttt P & \texttt D & \texttt Q & \texttt R & \texttt K & \texttt J & \texttt Z & \texttt B & \texttt A & \texttt W & \texttt G & \texttt I & \texttt N & \texttt U & \texttt E & \texttt O & \texttt H \\
11 & \texttt G & \texttt N & \texttt M & \texttt T & \texttt U & \texttt Z & \texttt D & \texttt W & \texttt Y & \texttt Q & \texttt E & \texttt R & \texttt S & \texttt L & \texttt K & \texttt A & \texttt C & \texttt B & \texttt X & \texttt H & \texttt J & \texttt O & \texttt V & \texttt F & \texttt P & \texttt I \\
12 & \texttt H & \texttt O & \texttt N & \texttt U & \texttt V & \texttt A & \texttt E & \texttt X & \texttt Z & \texttt R & \texttt F & \texttt S & \texttt T & \texttt M & \texttt L & \texttt B & \texttt D & \texttt C & \texttt Y & \texttt I & \texttt K & \texttt P & \texttt W & \texttt G & \texttt Q & \texttt J \\
13 & \texttt I & \texttt P & \texttt O & \texttt V & \texttt W & \texttt B & \texttt F & \texttt Y & \texttt A & \texttt S & \texttt G & \texttt T & \texttt U & \texttt N & \texttt M & \texttt C & \texttt E & \texttt D & \texttt Z & \texttt J & \texttt L & \texttt Q & \texttt X & \texttt H & \texttt R & \texttt K \\
\end{array}$
$\quad \begin{array}{c|cccccccccccccccccccccccccc}
14 & \texttt J & \texttt Q & \texttt P & \texttt W & \texttt X & \texttt C & \texttt G & \texttt Z & \texttt B & \texttt T & \texttt H & \texttt U & \texttt V & \texttt O & \texttt N & \texttt D & \texttt F & \texttt E & \texttt A & \texttt K & \texttt M & \texttt R & \texttt Y & \texttt I & \texttt S & \texttt L \\
15 & \texttt K & \texttt R & \texttt Q & \texttt X & \texttt Y & \texttt D & \texttt H & \texttt A & \texttt C & \texttt U & \texttt I & \texttt V & \texttt W & \texttt P & \texttt O & \texttt E & \texttt G & \texttt F & \texttt B & \texttt L & \texttt N & \texttt S & \texttt Z & \texttt J & \texttt T & \texttt M \\
16 & \texttt L & \texttt S & \texttt R & \texttt Y & \texttt Z & \texttt E & \texttt I & \texttt B & \texttt D & \texttt V & \texttt J & \texttt W & \texttt X & \texttt Q & \texttt P & \texttt F & \texttt H & \texttt G & \texttt C & \texttt M & \texttt O & \texttt T & \texttt A & \texttt K & \texttt U & \texttt N \\
17 & \texttt M & \texttt T & \texttt S & \texttt Z & \texttt A & \texttt F & \texttt J & \texttt C & \texttt E & \texttt W & \texttt K & \texttt X & \texttt Y & \texttt R & \texttt Q & \texttt G & \texttt I & \texttt H & \texttt D & \texttt N & \texttt P & \texttt U & \texttt B & \texttt L & \texttt V & \texttt O \\
18 & \texttt N & \texttt U & \texttt T & \texttt A & \texttt B & \texttt G & \texttt K & \texttt D & \texttt F & \texttt X & \texttt L & \texttt Y & \texttt Z & \texttt S & \texttt R & \texttt H & \texttt J & \texttt I & \texttt E & \texttt O & \texttt Q & \texttt V & \texttt C & \texttt M & \texttt W & \texttt P \\
19 & \texttt O & \texttt V & \texttt U & \texttt B & \texttt C & \texttt H & \texttt L & \texttt E & \texttt G & \texttt Y & \texttt M & \texttt Z & \texttt A & \texttt T & \texttt S & \texttt I & \texttt K & \texttt J & \texttt F & \texttt P & \texttt R & \texttt W & \texttt D & \texttt N & \texttt X & \texttt Q \\
20 & \texttt P & \texttt W & \texttt V & \texttt C & \texttt D & \texttt I & \texttt M & \texttt F & \texttt H & \texttt Z & \texttt N & \texttt A & \texttt B & \texttt U & \texttt T & \texttt J & \texttt L & \texttt K & \texttt G & \texttt Q & \texttt S & \texttt X & \texttt E & \texttt O & \texttt Y & \texttt R \\
21 & \texttt Q & \texttt X & \texttt W & \texttt D & \texttt E & \texttt J & \texttt N & \texttt G & \texttt I & \texttt A & \texttt O & \texttt B & \texttt C & \texttt V & \texttt U & \texttt K & \texttt M & \texttt L & \texttt H & \texttt R & \texttt T & \texttt Y & \texttt F & \texttt P & \texttt Z & \texttt S \\
22 & \texttt R & \texttt Y & \texttt X & \texttt E & \texttt F & \texttt K & \texttt O & \texttt H & \texttt J & \texttt B & \texttt P & \texttt C & \texttt D & \texttt W & \texttt V & \texttt L & \texttt N & \texttt M & \texttt I & \texttt S & \texttt U & \texttt Z & \texttt G & \texttt Q & \texttt A & \texttt T \\
23 & \texttt S & \texttt Z & \texttt Y & \texttt F & \texttt G & \texttt L & \texttt P & \texttt I & \texttt K & \texttt C & \texttt Q & \texttt D & \texttt E & \texttt X & \texttt W & \texttt M & \texttt O & \texttt N & \texttt J & \texttt T & \texttt V & \texttt A & \texttt H & \texttt R & \texttt B & \texttt U \\
24 & \texttt T & \texttt A & \texttt Z & \texttt G & \texttt H & \texttt M & \texttt Q & \texttt J & \texttt L & \texttt D & \texttt R & \texttt E & \texttt F & \texttt Y & \texttt X & \texttt N & \texttt P & \texttt O & \texttt K & \texttt U & \texttt W & \texttt B & \texttt I & \texttt S & \texttt C & \texttt V \\
25 & \texttt U & \texttt B & \texttt A & \texttt H & \texttt I & \texttt N & \texttt R & \texttt K & \texttt M & \texttt E & \texttt S & \texttt F & \texttt G & \texttt Z & \texttt Y & \texttt O & \texttt Q & \texttt P & \texttt L & \texttt V & \texttt X & \texttt C & \texttt J & \texttt T & \texttt D & \texttt W \\
26 & \texttt V & \texttt C & \texttt B & \texttt I & \texttt J & \texttt O & \texttt S & \texttt L & \texttt N & \texttt F & \texttt T & \texttt G & \texttt H & \texttt A & \texttt Z & \texttt P & \texttt R & \texttt Q & \texttt M & \texttt W & \texttt Y & \texttt D & \texttt K & \texttt U & \texttt E & \texttt X
\end{array}$
So we continue.
Every time we encounter the encoding for the letter h, we change key.
Jkwr K wbj N:
Dear E and S:
Ox on kwrhf Nwxzrjwf iarbobt wbj O iotmy haoy el xeil yb klipfls
It is early Saturday morning and I might just be able to deliver
ynm jmzzmt zc zon wddm pevro hvoonov. Po avo ef edv paj be
the letter to the good horse breeder. We are on our way to
Svolafn. Haryovqfego rct ifd tshye hgy uedm. V'p ihe ugyr stn,
Ireland. Baskerhound has cut short our stay. I'm not sure why, 
sdksyf fufg vu sgtu hwzy uvnzyzlm haivc h yxmdj omnqwdzijamn
except that he made this decision after a short conversation
xajy Wnojuwn Emvkmdn, nyoxe nc Xu Pjabon. Dxezkeb az jqpac
with Donaldo Rumtupo, owner of El Casino. Perhaps he knows
mbmn vqp mha sqyerj, tpn E zqptn en.
that you are coming, but I doubt it.
Ca daayd dpdgeseqpdxv cnhhw. "Odc Uzghhf sh Asedk," fe
He seems suspiciously happy. "The Cliffs of Moher," he
hqzh ltxxivn gji hsxfj hkti nehtkwoh, "uji Afmnnl yn Gykjq. Ezy
says rubbing his hands with pleasure, "The Cliffs of Moher. You
kngg gntj wlki, Kcca, O wi nzrk."
will like them, Ecco, I am sure."
O wi bax. Dzx pahhal ik xa Orkhwbj. If bkvx hkxxkr lohh dk
I am not. But follow me to Ireland. My next letter will be
ob xml Vxjlo jaolaj pc Dbsv. P nygm kylm y ozgra ds hrqrarew ra
in the Kames museum in Cork. I have made a habit of visiting it
opofoiov S'm sf bqp bwpb. Kfe qtmm utgo crq ifxcdgx dg jq c
whenever I'm in the area. You will find the curator to be a
tdxchzq jfd tuhiqxq ncpl hcoqp Chhq G'Ighhqnn. Ngicn wqgwnq
strange but sincere lady named Anne O'Connell. Local people
dsvib uts'v kzegn twfu fqq vub hgre kz Ylmg xhklu mgboyldx yl
think she's crazy with all her talk of Inca stone carvings in
Yburglt. Njh xwv zy hm lkiyihmuzme evmvhslezyi. Ivss xwd rml idw
Ireland. But she is an outstanding genealogist. Tell her you are
jdranf jm banv rmld omlzan Aziio M'Omnnwtt. Zyx ybuu gbrx snm
trying to find your cousin Isaac O'Connell. She will give you
kzy poly.
the note.
U
J
Note the mistake at Ca daayd dpdgeseqpdxv cnhhw (He seems suspiciously happy).
After the C, the code was supposed to change, but it stayed on code $17$ until the next occurrence of h
== Sources ==
* : Armada at Moher: $3$. Humpty Dumpty at the Irish Cliffs
Category:Cryptography