Today is the 3rd lab session of Information Technology Security. Before that, Mr. Zaki already taught us about the Caesar cipher and Vigenere cipher in lecture class. In this lab, we had to complete 2 tasks that are deciphering simple substitution cipher text and encrypt and decrypt using vigenere cipher. These 2 tasks are done in order to strengthen our cryptography theory. In the end of the lab, Mr. Zaki asks us to do the review question and pass up the lab report (lab1-lab3) to him. In the lab 3 review question 3, we have to use kasiski method to decrypt the vigenere cipher text as below:
To decrypt the above Vigener cipher text, we have to find out the key letter that use for encrypt. First, find out the repeated cipher text string. Then, we have to find the different spacing between the repeated strings. After that, we have to find the factors based to the number of the different spacing. For example, QLTJSU string first time appear at position 65, then it appear again at position 165, between this two strings is 100 so we find the factor of 100. Below table shown the result:
After find all the factors, the most factors repeated are 2 and 4. This number represent the key length for the key letter; either 2 or 4. In this case, we try number 4 first.
Divide the cipher text into 4 letters as shown below:
LIOM WGFE GGDV WGHH CQUC RHRW AGWI OWQL KGZE TKKM EVLW PCZV GTHV TSGX QOVG CSVE TQLT JSUM VWVE UVLX EWSL GFZM VVWL GYHC USWX OHKV GSHE EVFL CFDG VSUM PHKI RZDM PHHB VWVW JWIX GFWL TSHG JOUE EHHV UCFV GOWI CQLT JSUX GLW
Then we take out every first letter of the cipher text:
LWGWCRAOKTEPGTQCTJVUEGVGUOGECVPRPVJGTJEUGCJG
After that, we calculate the frequency of the character
From the above table, the highest frequency is G. In English language, the highest frequency is E. So we set the G into E and get the table as below:
So, we can know that the first letter of the key letter is C.
Next, we continue to find the second letter and third letter of the key. The method is just same like the method to find the first letter.
Then we can find the key letter is COD.
However, when want to find the fourth key. I face some problems. List down the every fourth letter of the cipher text:
MEVHCWILEMWVVXGETMEXLMLCXVELGMIMBWXLGEVVITX
After that, we calculate the frequency of the character:
From the above table, the highest frequency is V, E and M. In English language, the highest frequency is E. So we set the V, E and M into E:
From the above table, we still can't find the key letter. This is because CODR, CODA or CODI is not an exist word in English. So, we have to try the second highest frequency or third highest frequency.
By using try and error method, we finally find the key letter which is CODE and use it to decrypt the Vigenere cipher text. Below is the plain text:
JULIUS CAESAR USED A CRYPTO SYSTEM IN HIS WAR WHICH IS NOW REFERRED TO AS CAESAR CIPHER IT IS A SHIT CIPHER WITH THE KEY SETTM THREE EACH CHARACTER IN THE PLAINTEXT IS SHIFTER THREE CHARACTER SO CREATE A CIPHERTEXT
To decrypt the above Vigener cipher text, we have to find out the key letter that use for encrypt. First, find out the repeated cipher text string. Then, we have to find the different spacing between the repeated strings. After that, we have to find the factors based to the number of the different spacing. For example, QLTJSU string first time appear at position 65, then it appear again at position 165, between this two strings is 100 so we find the factor of 100. Below table shown the result:
After find all the factors, the most factors repeated are 2 and 4. This number represent the key length for the key letter; either 2 or 4. In this case, we try number 4 first.
Divide the cipher text into 4 letters as shown below:
LIOM WGFE GGDV WGHH CQUC RHRW AGWI OWQL KGZE TKKM EVLW PCZV GTHV TSGX QOVG CSVE TQLT JSUM VWVE UVLX EWSL GFZM VVWL GYHC USWX OHKV GSHE EVFL CFDG VSUM PHKI RZDM PHHB VWVW JWIX GFWL TSHG JOUE EHHV UCFV GOWI CQLT JSUX GLW
Then we take out every first letter of the cipher text:
LWGWCRAOKTEPGTQCTJVUEGVGUOGECVPRPVJGTJEUGCJG
After that, we calculate the frequency of the character
From the above table, the highest frequency is G. In English language, the highest frequency is E. So we set the G into E and get the table as below:
So, we can know that the first letter of the key letter is C.
Next, we continue to find the second letter and third letter of the key. The method is just same like the method to find the first letter.
Then we can find the key letter is COD.
However, when want to find the fourth key. I face some problems. List down the every fourth letter of the cipher text:
MEVHCWILEMWVVXGETMEXLMLCXVELGMIMBWXLGEVVITX
After that, we calculate the frequency of the character:
From the above table, the highest frequency is V, E and M. In English language, the highest frequency is E. So we set the V, E and M into E:
From the above table, we still can't find the key letter. This is because CODR, CODA or CODI is not an exist word in English. So, we have to try the second highest frequency or third highest frequency.
By using try and error method, we finally find the key letter which is CODE and use it to decrypt the Vigenere cipher text. Below is the plain text:
JULIUS CAESAR USED A CRYPTO SYSTEM IN HIS WAR WHICH IS NOW REFERRED TO AS CAESAR CIPHER IT IS A SHIT CIPHER WITH THE KEY SETTM THREE EACH CHARACTER IN THE PLAINTEXT IS SHIFTER THREE CHARACTER SO CREATE A CIPHERTEXT
No comments:
Post a Comment