Welcome Guest [Log In] [Register]
Viewing Single Post From: My New Cipher
jdege
Member Avatar
Elite member
[ *  *  *  *  * ]
Paarth Dave
Apr 20 2008, 01:12 AM
You say that my cipher is completely based on substitution and it has maximum 26 possibilities for each number.

You misunderstand me.

Your cipher isn't a simple substitution. It doesn't use one alphabet, it uses two. And then it applies two different additives to them.

What I'm saying is that within each of the two separate substitutions you are doing, having multiple processes for accomplishing the substitution makes for more work, but not for more security.
Quote:
 
This conversion is according to the value of A being 01 but the next part includes conversing alternate numbers according to the value of A being 02 starting from the second letter. So the modified conversion is
03 00 20 00 19 19 18 14 16 07 05

Now I will rearrange these numbers from last to first including the swapping of the indices. So the arrangement will be as follows:-
50 70 61 41 81 91 91 00 02 00 30
What I'm saying is that having these two steps, substituting numbers for the letters, then swapping the indexes, is nor more secure than having one. And, in fact, it's less secure than just having one, if that one provided for a larger set of possible substitutions.

Think about the Caesar shift - this is a simple substitution made by shifting the standard alphabet by a specified amount - adding a constant to each letter. In a Caesar shift of distance three, each letter is replaced by the third letter following:
Code:
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Now consider a Caesar shift of distance five:
Code:
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
The consider what would happen if you applied a Caesar shift of distance three and then applied a Caesar shift of distance five. You'd get exactly the same results as if you applied a Caesar shift of distance eight:
Code:
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
In just the same way, applying one substitution to the output of another substitution doesn't make for a more secure cipher, because the result is just another substitution. So if we take the ancient Hebrew AtBash cipher:
Code:
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
, and then apply a Caesar shift of three, we get:
Code:
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
W V U T S R Q P O N M L K J I H G F E D C B A Z Y X
, which is just another substitution cipher.

My point is that your habit of using substitutions made up of two separate steps are more difficult to apply than single substitutions, but they're not more difficult to crack. And I think you're thinking that the complexity you're adding to the encryption process ss adding more security, and it's not.

So, how could you make the substitution step of your cipher both less work and more secure? Try doing a straight keyword substitution. In the ACA puzzles, they have four ways of doiing this. They take a keyword, and remove repeated letters, "SECRET" becomes "SECRT". Then for a K1 key, they us that to mix the plaintext alphabet:K1:
Code:
 
q u v w x y z s e c r t a b d f g h i j k l m n o p
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Notice how the keyword, with the duplicate letters removed is inserted into the alphabet at a specified position with the remaining letters following. The keyword is not placed aligned with 'A', because that would result in 'x y z' encrypting as 'X Y 'Z' anytime the keyword didn't have 'x y 'z.

The K2 key uses the keyword to mix the ciphertext alphabet. The K3 key uses the keyword to mix both the plaintex and the ciphertext alphabets, inserted at different positions. The K4 key uses two different keywords to mix the plaintext and the ciphertext keys/

Personally, I prefer columnar transposition key mixing. The keyword is written at the top of a series of columns, one column for each unique letter in the keyword. The remaining alphabet is written beneath, row by row, and the ciphertext alphabet is read off column by column, in alphabetic order of the columns.

Written out in rows:
Code:
 

S E C R T
A B D F G
H I J K L
M N O P Q
U V W X Y
Z
Read off in columns:
Code:
 
a b c d e f g h i j k l m n o p q r s t u v w x y z
C D J O W E B I N V S A H M U Z R F K P X T G L Q Y
So, what I'm suggesting is that for the first substitution step, instead of using a fixed substitution for each of your two alphabets, you use keyword-mixed alphabets for the substitution.

This is the first of a number of suggestions, as to how to create a cipher that has the same structure as that you had suggested, but uses more secure primitives at each step. The result will be a a pretty nasty cipher - the sort that would have caused WWI-era cryptographers real headaches.

I'm not listing all of my suggestions now, because I don't want to overwhelm. Each is fairly simple, individually, and the concepts underlying them are worth discussing independently.

Do you understand why using a keyword-mixed alphabet is more secure than simply assigning numbers with or without swapping digits? Your system always used the same substitution for each half of the letters. Using a keyword to mix the alphabet results in a very different cipher every time you change the keyword. And it's a lot easier to change a keyword than to change a system.
When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
Offline Profile Quote Post
My New Cipher · Challenges