Welcome Guest [Log In] [Register]
Viewing Single Post From: My New Cipher
jdege
Member Avatar
Elite member
[ *  *  *  *  * ]
Paarth Dave
Apr 17 2008, 11:45 PM
This is a nice cipher but can be easily broken. Just meant for fun! Anyways, how did you link my cipher 'CATASTROPHE' with the Affine & Hill ciphers? I haven't used any matrices in my system. Rather my system is quite complex to be deciphered by cryptographers even if I tell them the key.

Affine doesn't use matrices, it uses arithmetic. Your ciphers have often been based on arithmetic. That's the connection I saw.

As for making things difficult to decrypt, even with the key, that seems contrary to the purpose of ciphers - the goal is to make things easy to read with the key, and difficult to read without it.

The Affine and Hill ciphers can both be easily broken, but then, so can yours.

The Affine's greatest weakness is its keyspace. There simply aren't very many possible keys, and an exhaustive search takes a computer only microseconds.

The Hill cipher, with small matrices, also has a small keyspace. But there is no limit to the size of the matrix. The only commercial implementation of the Hill cipher used a 6x6 matrix, which cannot be brute-forced.

The Hill cipher's greatest problem is its linearity. For a 2x2 matrix, you have four unknown variables, If you can correctly guess four letters of the plaintext, you have four equations in four unknowns, with allows you to completely recover the key.

Now, how would I approach cracking your latest cipher without the key?

Your first step is a substitution, replacing each letter with a number. You're using two different alphabets for alternate letters, but in each there are only 26 possible numbers that can result. Your second step is to add one additive sequence to the even-positiioned letters, and another additive sequence to the odd-positioned letters.

Take just the numbers corresponding to the odd-positioned letters. Subtract an additive sequence from each.

If your odd-positioned letters are encoded as "60 81 111 131 52 90". Your possible additve sequences are "10 20 30 40 60 60". "20 40 60 80 61 81", "30 60 90 21 51 81", etc.

Subtract each sequence, in order, from your odd-positioned letters. Check to see if all of the results of these subtractions represent valid letters. Remember, there are only 26 valid possibilities. The results of subtracting the incorrect sequence will often generate values that are not among these possibilities. If every subtraction in a sequence generates a valid value, it's almost certain that it is the sequence that generated it.

Do the same for the even-positioned ciphers, working in the other direction.

What could you do to make this more difficult?

First, use mod-26 addition. With mod-26, every subtraction of a value would yield a valid result. Suppose you have a plaintext letter 'E', in an even position so it encrypts as 5. You added to it 120, resulting in a ciphertext of 125. In trying out various sequences, I subtract 81, giving me 44, which is not a valid possibility.

Doing the math mod-26, though, is different. 'E' encrypts as 5, Adding 120 gives 125, which is 21. Subtracting 81 gives me -60 wicth is 18. Every possible subtraction yields a valid result. This makes it much more difficult to determine whether a given sequence is correct or not. Every sequence could be correct.

Second, don't line up your periods. You're using two alphabets, on alternating letters, and you're using two additive sequences, on alternating letters. They line up The first additive sequence adds only to your first alphabet, your second additive sequence adds only to your second alphabet. They can be attacked separately.

But what would have happened had you used three alphabets? You'd have had a period of six, alphabet 1 + sequence 1, alphabet 2 + sequence 2, alphabet 3 + sequence 1, alphabet 1 + sequence 2, alphabet 2 + sequence 1, and alphabet 3 + sequence 2. Isolating the alphabets from the additive sequences would have been much more difficult.
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Offline Profile Quote Post
My New Cipher · Challenges