Solving a 6×6 Tri-Square Cipher

Recently I had occasion to tackle a 6×6 Tri-Square cipher published on a puzzle geocache.  I had some misadventures but eventually solved it. I thought the process might be both amusing and instructive to some, so I am writing up my experience. First, here’s the ciphertext in case you want to try it.

JEX PQD YHN 979 L00 ALT Q91 BKZ Q0B 990 SEX 8LW KTD 5RE 2RT PGW OWH 962 SZQ P4V CEI BRA KSN L0C JLD O9A EKS P6G CTO HIA 3T4 ZIP 2CY 0M8 3SQ 1U6 990 IEX O17 CSL T0A 7TO 6NA L1E S9J ALT O6R S0E 2R0 Z7G 9VT LUP 5RE P5Z YH3 8M0 Q11 6LW N9J MYP XVW TEP RBQ JUF 5HO PQD 7L4 G3D 2RJ 8PZ QGT 9VT ZCZ 4K7 1TQ S4H ZIA crib: characters sharing the same common environments

With the crib, it’s not very hard to solve the plaintext. That was accomplished quickly. But to get the coordinates I needed, one must enter the key(s) into an online checker. It is thus the process of recovering the keys that was challenging and is set forth here.

The first obstacle was my lack of computer tools for a 6×6 Tri-Square. I have one for the 5×5, but not the 6×6. This meant I either had to rewrite the one I had, or solve with paper and pencil. I chose the latter option. After solving the plaintext I had many equivalencies established in all three cipher squares, that is, I knew various letters had to be in the same row or column as other letters. For the leftmost square (Sq. 1) I saw an alphabetic series that told me the probable route used. I also saw what I thought was the beginning of the key. Bear in mind that with a 6×6 key, under American Cryptogram Association (ACA) rules the letters A-J are followed by the numbers 1 – 0. Thus BAD would be written B2A1D4 and an entire row or column may be filled with only three letters.

I decided to try finding the key to that square using a tool I had: a 6×6 Polybius square solver. The solver uses word lists. I ran it and was unable to find a one-word key that met all the known letter relationships in any of the ACA routes. That told me the key was not a single word, or, possibly, was not a common word. I reran the program using some very complete word lists still without results. I decided to move on to the other keysquares. I should mention that I have always positioned the squares differently from the way they are shown in the linked ACA page. I always put the square marked 2 (the one on top) underneath the corner square. I always thought of them in a different order for that reason, with the numbering of squares 2 and 3 reversed from the diagram. I will use the standard diagram numbering for reference here, but I still think of the corner square as being in the middle and thus number 2, with the others being 1 and 3.

With square 2 I worked in a similar way and was able to reconstruct a large part of the square. Once again I tried my polybius square solver and confirmed that no one-word key worked completely, but I got some keys that had almost all the right equivalencies. I was confident enough that I knew the first word of the phrase, that I modified my program to run through the word list again tacking the first word of the phrase in front of every word to make a two-word key. I got several good-looking keys this way that were almost perfect, but not quite. There were still some conflicts. I was able to produce a list of keys and select only the letters that were the same in all of them. Then I went back to square 1 and working with paper and pencil again, I was able to fill in more of that keysquare. The numerals actually helped finish off that square since if you know the route and can place a numeral, you know the letter that comes before it, and vice versa. Thus I completed square 1 first. I could tell it was a phrase, and while I recognized all the words in the phrase, the phrase itself made no sense to me. I had never seen those words in that combination. I searched the complete phrase online and got no hits on Google.

Going  back to sq. 2 again, I was able to complete the first, third, and fourth rows of the square, but still had gaps in the others. Still, working with the letters I was sure of in squares 1 and 2, I was able to fill in sq. 3 enough that I could tell the route and much of the alphabetic sequence. Eventually I was able to completely fill sq. 3. Again, I recognized the first word, but could not tell what the complete phrase was for sq. 3. After completing that square, I was then able to go back to sq. 2 and complete it. Like the others, I recognized the first word, but could not tell what the full phrase was for sqs. 2 or 3. Bear in mind that polybius square keys use condensed forms. That is, repeated letters are removed, so Banana Rebel will condense to BANREL which could equally be Ban Barbell or various other things. Since I was confident of the three initial words, and they were vaguely related, I tried searching them together online to find a common thread. I did not succeed. As it turned out, this was because I had two of the words wrong.

So there I sat with the three key squares filled in completely but did not know two of the phrases, and had no confidence in the one I thought I did have (sq. 1). Here, another factor came into play. The online checker for the geocache page shows how many successful and unsuccessful attempts had been made. It showed 5 successful attempts and no unsuccessful ones. This meant the solvers had known exactly what to enter and didn’t have to guess. This made me nervous, because even if I figured out the complete phrases, it seemed to me that there were six possible ways to enter the keys, at least if one were to enter all three phrases. I began entering the keys in their condensed forms one by one and kept getting rejected. Obviously I need to figure out the complete phrases. I felt somewhat bad spoiling the perfect 5-0 record on the checker, racking up multiple wrong guesses. It began to look like I was guessing randomly. A true solver, I thought, shouldn’t enter a key until he was certain of the answer, so I stopped. I felt very inadequate.

I don’t know how long I sat there staring at the keys before I finally realized that the square 2 key first word could be another word, one not in my word list. Using that as the first word, the remaining letters made a logical phrase. I searched that phrase online and something popped up immediately, something that made sense. I had to do a bit of research since I was unfamiliar with the subject matter, but once I did, I quickly knew what all three phrases were. It turns out that previously  I had had only the first word right in sq. 1, but none of the words right in sq. 2, or sq. 3. That is to say, I had the keys right in condensed form, but had not deduced the full form correctly, even a single word. The checker, I thought, required the full phrases spelled out. I zipped back to the checker and entered them in using what I thought was the most logical order. I got rejected once again. Aarghh! It must not be the three keys, after all, I thought. Instead, I became sure it was the common subject matter that connected the three keys. That was a much shorter phrase that was very recognizable. I entered that into the checker and still got rejected. I tried using variations of it and still no luck.

I gave up and began writing an email to the cache owner for a hint. As I was composing it I started to say I had tried entering all the keys in without luck as well as the connecting phrase in all its variations when I realized that I actually had not entered in the three keys in every possible order, only in the most logical order. I went back to the checker and entered the keys in using a different order, then another, and so on until I got to the only remaining possible order. I was sure that wasn’t going to work, either, and was composing my email in my head when I hit enter and saw the checker return with a thumbs up and the coordinates to the cache! It had taken me thirteen wrong guesses before I got the correct key despite having completely solved the cipher and the three keysquares. My total unfamiliarity with the subject matter connecting the keys was part of the problem, but not the only problem. I understand now how others could enter the full correct keys in the correct order without having to guess. If you have read this whole post carefully, you can probably figure out why, too.

 

Leave a Reply

Your email address will not be published. Required fields are marked *