Welcome Guest [Log In] [Register]
Viewing Single Post From: Crumble (New Cipher)
jdege
Member Avatar
Elite member
[ *  *  *  *  * ]
There are 26! possible keys in the first stage, and there are 2^52 possible keys in the second stage, but they don't multiply because they can be attacked separately.

The Index of Coincidence works fine on quite modest texts. Take a very short phrase, like "When, in the course of human events". Only 28 letters, with 15 distinct letters, and it has an IC of 0.078. Random text has an IC of 0.038. Even on a text as short as that, plaintext is clearly distinguishable from random.

Now as for a hillclimber, the approach is simple. You choose a key at random. You do a test decryption. You run a scoring routine on the result. You modify the key slightly, creating what is called an "adjacent" key, decrypt with it and score again. If the result scores higher than your previous key, you keep it, if it does not, you go back to the previous key. You keep tryin the adjacent keys, scoring, and keeping the best until you find a key for which all of the adjacent keys have in lower scores. Conceptually, you are walking uphill until you find a local maximum. You keep track of the top key and its score.

Then you repeat the process, starting with another random key, and climb to the top of that key's hill. If the score is higher than the previous top score, you print it out, and make it your new top score, then repeat again, beginning with a new random key.

In your case, the keys I would be trying would be the bit partitions from the second stage. The decryption would be to reverse the bit assignments, then to use any arbitrary assignment of five-bit groups to letters, and then to calculate the Index of Coincidence of the result.

There are 2^52 possible keys, in your second stage. But there are 26! possible keys in a simple substitution, as I said, more than 80 billion times as you have in your second state, and hill climbers routinely find the correct key after trying only a few tens of thousands of keys. I expect that one would find the correct stage two key in under a minute.

Then, having stripped the second stage encryption, what you're left with is a simple substitution. Which is no protection at all.
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Offline Profile Quote Post
Crumble (New Cipher) · General