Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

DES Q4) The following is a special case of a permutation cipher: Let m, n be positive integers.

Partition the plaintext to segments of nm letters each. Write down each plaintext segment by rows in an n-by-m matrix. The ciphertext is created by going over the columns of the matrix. For example if n= 3, m= 4 the plaintext "cryptography" will lead to the matrix c r y p t o g r a p h y and the ciphertext will be "ctaropyghpry" Decipher the ciphertext ( generated in the abovementioned way, not necessarily with the same m and n) "MYAMRARUYIQTENCTORAHROYWDSOYEOUARRGDERNOGW" SOLUTION: Dividing the text to six columns, i.e. seven rows (since the text characters are 42) then we will get the following table: M R E A D U E Y U N H S A R A Y C R O R N M I T O Y R O R Q O Y E G G A T R W O D W

And by trying to re-arrange the characters, we can get the following plaint text: Mary Mary quite contrary How does your garden grow? 1 M R E A D U E 2 A Y C R O R N 3 R Q O Y E G G 4 Y U N H S A R 5 M I T O Y R O 6 A T R W O D W

i.e. the key that is used to cipher the text is as follow:142536 1 M R E A D U E 4 Y U N H S A R 2 A Y C R O R N 5 M I T O Y R O 3 R Q O Y E G G 6 A T R W O D W

You might also like