Here’s a randomly generated Vigenere running key cipher. I solved it without a crib using a key search program and a combination interactive solver and hill-climbing program. Both of these programs used local servers to run. The word search server was listening on port 3000, and the hill-climber was listening on port 8080. The search program ran through a list of about 600,000 words and phrases, looking for a corresponding plaintext that included a word or phrase at least 7 letters long. The key search returned four possibilities, one with a 9 letter phrase and three with 7 letters phrases. Three out of the four results actually occurred in the solution. I filled in the rest of the plaintext by switching back and forth between the hill-climber and the interactive solver.
For a crib I’ll include the (caesar-shifted) phrase whose corresponding plaintext included the 9 letter phrase.
Vigenere running key:
UUOHZ LWHJM AATPD XIEZC TVYAO XPJBZ OXFHC VNTLV XZWYD YDYZX JXMLX PMHDZ PXEOS.
caesar-shifted crib: NKSJHJXXFWD
update: I’ll add a caesar-shifted hint:
Hint: YMJ XTQZYNTS XYFWYX BNYM F SFRJ FSI JSIX BNYM F SFRJ
Here’s a randomly generated cipher of unknown type. All my ID tests put the correct type on top. PH hill-climbing solved it without a crib. Key search solved it also. I’ll include a caesar-shifted crib.
OEUGF LONEG HRUIO FVLBI RUGQB ESGGU LZOMU WIUGD RFXCB MSBHO KHFDT
SENEV DOQIN CEUDF CIILI MOOPU IFFLD CLOOT ICUIF PXFCL OODGG SKFIV
KGDEM OPOUU ECBOC IGDLP OEMOV PFQTI.
caesar-shifted crib: JWJPSFWNJXFSIJ
My program to identify the primer is dependent on repeated digits at the crib location. Thus it depends on knowing the crib location. The process is to increment every 5-digit primer from 1 to 99999, extend the full primer until the digits cover the crib location, then take the segment of the primer where the crib is located and call that primer2. In the preceding con, the crib is 14 letters long. I test each primer2 first for three-digit triplets and search to see if the corresponding crib letters appear as a sequence in the ct. For example, if the primer2 were 19692055125063, my program would first test the three 5’s. The corresponding crib letters for the 5’s triplet would be MOT for the crip “TOPOFAMOUNTAIN”. If MOT does not appear in the ct, then that primer cannot be correct. If it does, I give the primer a score of 5 points. Then I do the same with 2-digit doubles, like the 1, 6, 9 and 0. Those corresponding crib letters form digraphs. If any of those digraphs don’t appear in the ct, again the primer is rejected. If they do, 1 point is given for each such pair. Once all primers have been tested and a score given to each one that isn’t rejected, those are then ordered by score and decryption attempted with the highest-scoring primers first. The process could be extended to 4- or 5-digit groups, but the crib would have to be quite long in most cases.
In the preceding con, there was only one 4-primer group that outscored the correct group. I tested this method on the same con with a shorter crib (12 letters) without a triplet in the corresponding primer2 and the correct primer appeared in the highest-scoring 200 primers. If the crib were to occur over a sequence without many triplets or doubles, this method would not be effective. If the crib were long enough, one would not need to know its location in advance because there would probably be only one 4-primer group and crib location that would work.
Here’s a Sequence Transposition cipher:
YUOTW TOEAH NHCSS TFEND WDEOT MNEAA TNOSO INBOO OULOW TNPNI RTSPT NKOTT ONOUT WGTHI IDAEA LDINE HAUAE OFRTA OTBDH OTOC 6
The crib is “TOPOFAMOUNTAIN” located above OOOULOWTNPNIRT, or more accurately, beginning at the 39th letter of the plaintext since the ciphertext letters at that point do not relate to the crib. I wrote a program that identifies the most likely primers given the ct, a crib, and the crib placement, assuming sufficient crib length. For this example my program placed the correct primer tied for 5th most likely along with 39 other primers. As an added hint, the check number at the end is 6.
The text is a random sentence from Gutenberg.org.
Here’s a randomly generated keyphrase cipher. My hill-climber and word search programs were enough to solve it without a crib. I’ll include a caesar-shifted crib. The punctuation was left out of the ciphertext.
SSSEHORONH AH TEOSNLR SSSEHORONH LRN RSESS FR ON ORS LENLOOOEN ON IROLR IS RES LE NEO TEEHSO ORRO O OSH ET HEF.
caesar-shifted crib: BMNHM.
Note: The key was randomly selected from a list of about 1000 keyphrases. I generated the list by looping through lines of poetry. From each line of poetry I removed the beginning words until there were 26 letters left if possible, also I tried removing words from the end until 26 letters were left, and also I tried removing words at random until 26 letters were left. This particular key makes sense and can be found with an internet search.
Making a keyphrase by removing words at random is probably not a very efficient method of proceeding. I think a problem like this is called a “knapsack” problem in the literature. Knapsack problems are like traveling salesman problems — there is no general algorithm for solving them, but some reasonably good algorithms probably exist.
Here’s a randomnly generated unknown cipher. I’ll give a hint because all my ID tests got this one wrong. I needed the crib to solve it.
YIIXA JPKNL FCFFK XYCMJ XKGWF FPEFB FFNSE EIZRM OFYAM AGHIK ELXYB
VFFMO RIXJG CRJES UOOFF FDXFY XMFXM IEXMD SGZZF OHLLI JJVUP CFZRM
JFMEM ORJID XOFFF ONRKX YBFYT WFTCR MCTVE SFTFP UER.
caesar-shifted crib: FYLTTIBNQQNYITYTUN
Apple Jack has joined. Welcome. I hope you enjoy it.
OMWMB IHDDR PYOTQ WYWNA THSUH CWZTT HDWWQ OSCGX YNKQX XHQOT FRWWX MHWFQ DRKYW WNVBO RWQYU MNGDP
My analyzer had trouble with this one, placing the correct type in 17th place. It’s a random selection from Gutenberg.org. I had to peek at the worksheet to get the type and a crib. My hillclimber did not solve it without the crib. I’m including a crib: WYCDOFOBI
I have created a cryptographic story. If you successfully complete the story, please leave a comment saying how long it took. Let me know if you find any errors.