PMIT-6204:: Cryptography & Steganography
PMIT-6204:: Cryptography & Steganography
PMIT-6204:: Cryptography & Steganography
for
Slide- 2 IIT, JU
Transposition Ciphers
Slide- 3 IIT, JU
Slide- 4
These are simple transposition ciphers and were used in the past.
Slide- 5 IIT, JU
Keyless Transposition Ciphers
Example:
1st Method: Written column by column and transmitted row by row
A good example of a keyless cipher using the first method is the rail
fence cipher.
By sending the first row followed by the second row, Alice then creates the ciphertext
“MEMATEAKETETHPR”.
Bob receives the ciphertext and divides in half (in this example, the second half has
one less character). The first half forms the first row; the second half forms the
second row. She reads the result in zigzag.
Because there is no key and the number of rows is fixed (2 here), the cryptanalysis of
the ciphertext would be very easy for Eve.
Slide- 6 IIT, JU
Keyless Transposition Ciphers
Example:
2nd Method: Written row by row and transmitted column by column
Alice and Bob can agree on the number of columns and use the second
method. Alice writes the same plaintext, row by row, in a table of four
By transmitting the characters column by column, Alice then creates the ciphertext
“MMTAEEHREAEKTTP”.
Bob receives the ciphertext and follows the reverse process. He writes the received
message column by column and reads it row by row as the plaintext.
Eve can easily decipher the message if she knows the number of columns.
Slide- 7 IIT, JU
Keyless Transposition Ciphers
Example:
The cipher in the previous example is actually a transposition cipher. The
following shows the permutation of each character in the plaintext into the
ciphertext based on the positions.
The first character in the plaintext has not changed its position. The
second character in the plaintext has moved to the fifth position in the
ciphertext; the third character has moved to the ninth position; and so on.
Although the characters are permuted, there is a pattern in the
permutation: (01, 05, 09, 13), (02, 06, 10, 14), (03, 07, 11, 15), and (04,
08, 12). In each section, the difference between the two adjacent numbers
Slide- 8
is 4. IIT, JU
Keyed Transposition Ciphers
Slide- 9 IIT, JU
Keyed Transposition Ciphers
Example:
❑ Alice needs to send the message “Enemy attacks tonight” to Bob.
❑ They have agreed to divide the text into groups of five characters and then
permute the characters in each group.
❑
The key used for encryption and decryption is a permutation key, which shows how
the character are permuted. For the above message, we assume that Alice and Bob
used the following key:
The third character in the plaintext
block becomes the first character in
the ciphertext block. Similarly, the first character in the plaintext block becomes
the second character in the ciphertext block , and so on.
The permutation yields:
Slide- 11 IIT, JU
Columnar Transposition Ciphers
Example:
Encrypt the message “enemy attacks tonight” using Columnar
transposition cipher.
Solution: The encryption and decryption is illustrated in the figure below.
▪ The ciphertext is
created by reading
the 2nd table
column by column.
Slide- 12
Figure: Combining Two Approaches IIT, JU
Columnar Transposition Ciphers
Keys
In the previous example, a single key was used in two directions for
the column exchange:
❑ downward for encryption
Slide- 13 IIT, JU
Key inversion in a transposition cipher
How can the inverse of a key be created if the initial or original key is
given, or vice versa?
The process can be done manually in a few steps.
Figure below shows how to invert an encryption key, i.e. how to find the
Slide- 14 IIT, JU
Columnar Transposition Ciphers
Using Matrices
We can use matrices to show the encryption/decryption process for a
transposition cipher.
Figure below shows the encryption process.
Slide- 16 IIT, JU
Traditional Vs. Modern Symmetric-key Ciphers:
The traditional symmetric-key ciphers were used in the past. They
are character-oriented ciphers.
Traditional ciphers are simpler than modern ciphers and easier to
understand. They can be easily attacked using a computer.
Example:
Given plaintext: 10011011110100001
Plaintext : 10011011110100001
Keystream : 10101010101010101
Ciphertext : 00110001011110100 (by XORing each plaintext bit with corresponding keystream bit)
Example
Plaintext : The only thing we have to fear is fear itself
Plaintext blocks : Theonlyt hingweha vetofear isfearit selfXend (break the plaintext into 8-character block)
Ciphertext blocks : tylnoehT ahewgnih raefotev tiraefsi dneXfles (just reverse each plaintext block)
Ciphertext : tylnoehTahewgnihraefotevtiraefsidneXfles
Slide-19 IIT, JU
Discussion Points
Slide-20 IIT, JU
Slide-21
Thank you…
Have a question?