Diving into the History of Cryptorgaphy

Romulan era can be identified as  a very beginning of designing new ciphers. From the Romulan era to what we use today as a "secure" method of encrypting our data, there has been many "unsafe" and "insecure" ciphers. Following few will be examples of it along with why they are considered as weak ciphers.

1.) Substitution Cipher

Now this is something that many people would have done in their kindergarten. This is the technique where basically there is a alphabet map where each letter is assigned to some other letter. Let’s consider the following table for a brief idea about it.

Original letter
Cipher Letter
A
S
B
Q
C
A

Z
J

                Here we have Assigned A to S, B to Q and like wise every letter to some other letter and at last Z to J. So now while we want to send a message “ABZC” to someone it will be encrypted to “SQJA” and when that ciphered text will be received by the recipient, he/she can simply reverse it again with this letter table. Hence it was a very basic method of encrypting and decrypting the text.



Caesar Cipher:



Now, Caeser cipher isn’t really a cipher as it has no key and and the encryption algorithm is fixed for e.g say shift every letter by 4. So A will become E, B will become F and so on and Y will become C and Z will become D. But as there is no random key for every encryption if the attacker knows the encryption pattern, he will solve every cipher texts very easily.

So now going back to the substitution ciphers  the total number of possible switches between letter is 26!(26 factorials). This is obvious as it is a basic permutational table of alphabets and every letter is arranged at the place of some other letter. Now we can see that 26! Is approximately near to the 288 . This is a very big key space. But still it is terribly easy to crack a substitution cipher. Now lets see how it is so easy to break a substitution cipher. We know a fact that the most common letter in English text is letter “E”. And for the fact it appears for about 12.7 % of the time in standard English texts. Now when I know that the cipher text is in English language and the most common letter is letter E we can move forward. So what I’ll do is check the cipher text and then count every letter in the cipher text and then the most repeating letter in the cipher text is more likely to be the encrypted version of the English alphabet E. So now I am able almost able to get one entry from the key table. And the next most common letter in the English alphabet is the letter “T” with the appearing probability of letter “T” is about 9.1%. So now I again count how many times the letters in the cipher text are repeating and the second most appearing letter is most likely to be the letter “T”.  And by doing that I have recovered the second entry from the key table. Similarly the third most frequent letter in the English text is the letter “A” with the repeating probability of about 8.1 %. So by that I have recovered almost three entries of the key table. But what next. Almost all the letters except these are having the same probability of repeating themselves. So we then move forward to the second step that is use of digrams (frequently occurring pairs of letters). So we know that frequently occurring pairs of letters in English language is like “he”, “or”, “an” or like “th”. So again I can figure out some other letters in the cipher text. Similarly we can also find other elements from the key table by going forward for trigrams and so on. So the point here is that the substitution cipher is amongst the worst technique of encrypting the document as it can be solved by cipher method itself that is the attacker only needs a cipher text and he can figure out what the real message is.




Comments

  1. How can we differentiate between original and cipher letters ?

    ReplyDelete
    Replies
    1. As we know that a cipher consists of a triplet( A plain text, A key and A cipher Text). Now, while we are encrypting a plain text, we will be actually defining a function where we take the plain text and a Key ( Here a difference between original letter and cipher letter). Now after encrypting the plain text, we will be getting a total gibberish of letter and that will be our cipher text consisting of cipher letters.

      Delete

Post a Comment

Popular Posts