Saturday, April 27, 2013

D'Agapeyeff Cipher - ADFGX Postscript

I left my blog in limbo while my solver was running for approximately 14 or 15 months.  Sure, it seems crazy, but I wasn't willing to give up on the idea that the D'Agapeyeff cipher was a 98 character Polybius square encryption with a 14 column transposition key.  To fully check the likely keyspace took a lot of computer cycles.

Once I had checked all the phi values from the max (600) down to 502, I had a decision to make. I could either let the program run, or I could re-evaluate the hypothesis and possibly concede there might be another path. Each phi value below 502 has somewhere in the neighborhood of 4,000 to 8,000 key variants (plus the 5,040 column pairing permutations to consider). I deemed it extremely unlikely that D'Agapeyeff's plaintext was written with some many distinct digraphs that the phi value would drop that low - even for 98 characters of plaintext.

I believe in another blog post I talked about 75% of all 98 character plaintexts have a phi value between 540 and 660. I took this fact, and combined it with the facts that:


  • His other sample ciphers had plaintexts with phi/IC values greater than that of the expected value for texts of those lengths.
  • Most plaintexts with phi values in the expected range (540-660) will most likely have a max phi value greater than 600.
It's for both these reasons I ended my standard ADFGX attack and went back to the drawing board.

To fully beat the dead horse, I still believe the 6, 7, 8, 9, and 0 digits are nulls added after the message was enciphered to thwart cryptanalysis  What I've now decided to consider is that D'Agapeyeff may have still used a 14x14 square, but did not use columnar transposition.

He certainly could have inscribed the 196 digits from the polybius square in a 14x14 matrix, either row-wise, column-wise, or in some other pattern such as left to right alternating directions, or in a clockwise/counterclockwise circular pattern. He then could have taken these digits out of the 14x14 matrix either row-wise, column-wise of by some other pattern. This is the path I'm going down next.

Until next time.