Transposition Ciphers

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Transposition Ciphers

• now consider classical transposition or permutation ciphers


• these hide the message by rearranging the letter order
• without altering the actual letters used
• can recognise these since have the same frequency distribution as the
original text
Transposition cipher techniques

1.Rail Fence Cipher


2.Columnar Transposition
 Simple Columnar Transposition
 Double Columnar Transposition
1. Rail Fence Cipher

• In this method plain text is written downwards on “rails of fence “ , starting a


new column when bottom is reached.
• Algorithm:
1. First write down plain text message as a sequence of diagonals.
2. Read the plain text written in first step as a sequence of rows.
1. Rail Fence Cipher

Example:
Plain text: come home tomorrow

• Cipher text: cmhmtmrooeoeoorw


• The above rail fence cipher is of depth-2
• We can have of any depth….e.g
1. Simple Columnar Transposition
• In this method the message is written in rows of fixed
length and then read out column by column
• Column are selected in some in some scrambled
order.
• The number of columns are defined by the length of
key.
• Algorithm:
1. Write the plain text message row by row in a
rectangle of predefined size.(length of key)
2. Read the message column by column according t the
selected order thus obtained message is a cipher
text.
1. Simple Columnar Transposition

Key: ZEBRAS
plain text: welcome home
Order : 6 3 2 4 1 5

Cipher text: MLOEHCMWEOE


2.Double Columnar Transposition

• Single columnar transposition can be attack by guessing possible column lengths.


• Therefore to make it stronger double transposition is used.
• This is simple columnar transposition technique applied twice.
• Here same key can be used for transposition or two different keys can be used.
2.Double Columnar Transposition

• First apply simple columnar transposition


Key: ZEBRAS
plain text: welcome home
Order : 6 3 2 4 1 5

Cipher text: MLOEHCMWEOE


2.Double Columnar Transposition

Cipher text 1: MLOEHCMWEOE


Order : 6 3 2 4 1 5

Final Cipher Text: COELWEOMMHE


Rail Fence cipher
• write message letters out diagonally over a number of rows
• then read off cipher row by row
• eg. write message out as:
m e m a t r h t g p r y
e t e f e t e o a a t
• giving ciphertext
MEMATRHTGPRYETEFETEOAAT
The twisted path cipher
• This is an elaboration of the letter scrambling technique of the Rail-
fence cipher.
• It uses a rectangular grid or checkerboard of empty spaces.
• The grid/checkerboard can be of your choice, or must be known at
receiver and transmitter side.
• E.g: meet me Thursday night.
• Check/count the letters and make it completely dividable into fix rows
and columns.
• Trace the matrix at a particular path.
• The shape of which is agreed upon by everyone using this algo.
• Is it good to start row wise?
• How about plow path…?
• How about spiral path..?
• This could be make
Harder by combining
the two.
• Lines do not need to be continuous, can be broken too.

Diagonal plow
Row Transposition Ciphers
• This sort of thing would be trivial to cryptanalyze
• a more complex transposition is to write letters of message out in rows
over a specified number of columns
• then reorder the columns according to some key before reading off the
rows
• Attach postponed until two a.m
Key: 3 4 2 1 5 6 7
Plaintext: a t t a c k p
o s t p o n e
d u n t i l t
w o a m x y z
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
• A pure transposition cipher is easily recognized because it has the same
letter frequencies as the original plaintext.
• For the type of columnar transposition just shown, cryptanalysis is fairly
straightforward and involves laying out the ciphertext in a matrix and
playing around with column positions.
• Digram and trigram frequency tables can be useful.
• The transposition cipher can be made significantly more secure by
performing more than one stage of transposition. The result is a more
complex permutation that is not easily reconstructed. Thus, if the foregoing
message is re-encrypted using the same algorithm.
• Encrypted the above encrypted message again using the same algo.
• To visualize the result of this double transposition, designate the letters in
the original plaintext message by the numbers designating their position.
• This will be much difficult to crypt-analyze.
Scrambling with key-words
• Key words are easy to remember rather than the whole code.
Product Ciphers
• A pure transposition cipher is easily recognized because it has the
same letter frequencies as the original plaintext.
• ciphers using substitutions or transpositions are not secure because
of language characteristics
• hence consider using several ciphers in succession to make harder,
but:
• two substitutions make a more complex substitution
• two transpositions make more complex transposition
• but a substitution followed by a transposition makes a new much harder
cipher
• this is bridge from classical to modern ciphers
Summary
• have considered:
• classical cipher techniques and terminology
• monoalphabetic substitution ciphers
• cryptanalysis using letter frequencies
• Playfair cipher
• polyalphabetic ciphers
• transposition ciphers
• product ciphers

You might also like