Compressocrat

History

The Compressocrat cipher type was introduced in the May-Jun 1983 edition of the American Cryptogram Association (ACA) magazine The Cryptogram  by ACA member SHMOO.  It compresses normal English text by converting the alphabetic letters to numbers which are then combined  into groups of three and converted back to text in  a similar way to the Fractionated Morse cipher type.

Description

The Compressocrat cipher first converts individual plaintext letters to numbers using a lookup table which converts the letters to number groups between 2 and 6 numbers long. The most common letters such as E, T, A etc. use 2-letter groups and less common letters are converted to 6-letter groups using the following lookup table:

E 31  I 322  P 3212  B 32112

T 12  R 323  F 3213  G 32113

A 13  S 112  C 1112  V 11111

O 22  H 113  U 1113  K 11112

N 23  L 212  M 2111  Q 11113

      D 213  W 2112  X 321111

             Y 2113  J 321112

                     Z 321113

The numbering is created to ensure that the number groups representing a particular symbol is never a prefix of a number group representing any other symbol. This is similar to the Huffman code which is often used for lossless data compression.

The plaintext is then converted to a string of numbers using the above table so, for example the word cipher becomes 

1112 322 3212 113 31 323
  C   I   P    H  E   R

or

1112322321211331323

Then a keyed alphabet is created from a key word of phrase. For example the keyword MARKTWAIN is reduced to MARKTWIN when repeated letters are removed. Appending unused alphabet letters produces the following keyed alphabet:

MARKTWINBCDEFGHJLOPQSUVXYZ

This is then assigned to a table of permutations of the numbers 1, 2 and 3 as follows:

MARKTWINBCDEFGHJLOPQSUVXYZ
11111111122222222233333333
11122233311122233311122233
12312312312312312312312312 

The string of digits created from the lookup table is then divided into groups of three numbers and each group is converted to a letter using the keyed alphabet table. So the example above forms the groups:

111 232 232 121 133 132 3

As the last group only contain a single number a dummy group is added to form the final group to produce 311. Each group is then converted back to text using the keyed alphabet lookup table to form the ciphertext.

111 232 232 121 133 132 311
M   L   L   K   B   N   P

After grouping the ciphertext into groups of five the final cipher is:

MLLKB NP

Example

Keyword: MARKTWAIN

Plaintext: If you tell the truth, you don't have to remember anything.


Plaintext:        If you tell the truth, you don't have to remember anything.

Converted text: 322 3213 2113 22 1113 12 31 212 212 12 113 31 12 323 1113 12 113 2113 22 1113 213 22 23 12 113 13 11111 31 12 22 323 31 2111 31 2111 32112 31 323 13 23 2113 12 113 322 23 32113 1 (dummy number added to fill final group of three)

Number groups:  322 321 321 132 211 131 231 212 212 121 133 112 323 111 312 113 211 322 111 321 322 231 211 313 111 113 112 223 233 121 113 121 113 211 231 323 132 321 131 211 332 223 321 131

Ciphertext:    VUUNC IJDDK BAXMQ RCVMU VJCSM RAHOK RKRCJ XNUIC ZHUI

You'll see that the ciphertext contains 44 letters and is much shorter than the plaintext which contains 59 letters.

Solving

Solving methods: Hill Climbing and Dictionary keyword search.

The Compressocrat cipher type can be solved with a dictionary search though this can be slow due to the number of keys tested. If using this method it is recommended to use a smaller word list.

The recommended method of solving is the hill-climbing which solves faster than a dictionary search when a tip is available.

Using the hill-climbing search, on selecting the Solve button in the main CryptoCrack window a dialog box will appear to enable the tip and tip location to be set. On selecting OK the program will search for a solution.

Tip – Enter the tip or crib in the Tip field.

Click on the Locate tip button will populate the Tip location list with possible locations for the tip.

Tip location – Select the location of the tip from the list then press OK. When a tip location is selected the ciphertext and plaintext positions are shown below the Tip location.