In: Computer Science
Use Vigenère Cipher to decrypt the following plaintext with the given key
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ans) ( given in the question, there is an error/mistake, cant decrypt the "plaintext "( which is not encrypted first ) so here one can encrypt the given plain text using the key mentioned. then can able to decrypt it also
Vigenere cipher :
Is an encryption method consist of alphabetic from A to Z, known as polyalphabetic substitution type method,( here cipher is made using multiple substitution alphabets ), encryption is performed using vigenere table.
For encryption the Vigenere table contains the letters from A to Z aligned in row wise , ie 26 letters are labeled in rowwise and coloumn wise , and below each coloumn and corresponding rows again the letters are arranged as : A TO Z , and in the second row the letter are left circular shifted by one , compared with the previous alphabet.
the table contains a total of 26*26 entries.
ENCRYPTION and DECRYPTION BY TABLE METHOD : ( PLAINTEXT = ABCFRDWERT )
if the plaintext first letter is A ( assume ) and if the key is of length 5 ( key= BNGRY ) then it should be repeated until equals to the size of the plain text, ie ( BNGRYBNGRY )
encryption :
-now to find the first letter of cipher text, take the fisrt letter of plaintext (= A ) and of the key ( = B ) now find the row labeled as " A ' and in that row find the coloumn named as "B" , now take the letter that comes in the entry as the cipher text
decryption :
take the first letter of the key and in the row locate it, and check for the entry named the first letter of cipher text , then see the label of the column( coloumn name at the top of the table ) now that will be the plain text.
A MORE EASY WAY OF FINDING ENCRYPTION AND DECRYPTION :
Assign value for alphabets as from [ 0 to 25 ] , ( A=0, B=1, C=2,,,,,,,,,,,,,,,Z=25 )
NOW JUST CONSIDER THIS EQUATION TO FIND THE CIPHERTEXT ( ENCRYPTION Ei ) and decryption ( Di )
encryption ------ Ei = ( Pi + Ki ) mod 26 - p = plain text , k= key , i= ith charecter of text
decryption -------- Di = ( Ei - Ki + 26 ) mod 26
ANSWER FOR THE ABOVE QUESTION : ( USING THE EASY METHOD )
ENCRYPTION : ( GIVEN , key: deceptivedeceptivedeceptive , plaintext: wearediscoveredsaveyourself )
FOR DECRYPTION, TAKE THE CIPHER TEXT VALUE AND FIND THE CORRESPONDING PLAINTEXT USING THE DECRYPTION EQUATION - ( Ei - Ki + 26) mod 26