Transposition ciphers - rail fence, rotating grille, multiple-stage columnar Flashcards
What is a transposition cipher?
- Perform some sort of permutation on the plaintext letters.
- Works on blocks of letters of the plaintext
What is the formal definition of transposition cipher?
- For block length t, let K be the set of permutations on {1, . . . , t}.
- For each e ∈ K and m ∈ M Ee(m) = me(1) me(2) · · ·me(t)
- The set of all such transformations is called a transposition cipher.
- To decrypt c = c1 c2 · · · ct compute Dd (c) = cd(1) cd(2) · · · cd(t), where d is inverse permutation.
- Letters unchanged so one can exploit frequency analysis for dipthongs, tripthongs, words, etc.
What is the rail-fence cipher/zig-zag cipher?
- Plaintext is written down as a sequence of diagonals and then read off as a sequence of rows.
- The depth specific how many rows of diagonals you should have.
How to encrypt and decrypt the rail-fence cipher?
ENCRYPT: write the plaintext as diagonals based on the depth (no of rows) and then obtain ciphertext by reading row by row.
DECRYPT: make the grid again
a. number of rows = key length/ depth
b number of columns = length of the ciphertext.
c. Place the first letter in the first square, and then dash the diagonal down spaces until we get back to the top row, and place the second letter here. Continuing to fill the top row and then repeat for each row.
What is the rotating grille cipher and how does it work?
- Use a mask (“grille”) with pre-cut holes. A grille is a sheet of squares, some of which are cut-out.
- The plaintext is written in these squares and then rotated by 90 degrees counter-clockwise and then rest of the plaintext is written and so on…
- every time the grille is turned, the cut out
squares are precisely positioned at squares not yet filled. You need are at a situation where you have the cut out square on a square that is already filled. - Read the ciphertext left -> right and top -> bottom
How to prepare the cut out grille for the rotating-grille cipher?
- divide the 6 x 6 grid into 4 3 × 3 quadrants, number squares of each quadrant - from 1 - 9.
ORDER -> then ↓ then 9. - You are choosing exactly one square to be cut out from among the four squares for each number.
What is the columnar transposition cipher and how does it work?
- Write message in a rectangle, row by row, and read message off, column by column, but PERMUTE the order of the columns.
- The order of the columns thus is the key to the algorithm. For example, with key 4312567 (and with padding to fill the grid)
Key: 4 3 1 2 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 (order is 1,2,3,4,5,6,7) based on the columns and add padding to fill up all the columns.
How can you make a transposition cipher more secure?
Perform more than just one stage of transposition so that there is a more complex permutation that cannot be easily reconstructed.
Single stage columnar transposition cipher - NOT SECURE (pure cipher) hence can be attacked easily.
What is a multiple-stage columnar cipher?
Do the same thing as columnar cipher BUT encrypt it more than once using the same algorithm.
Multiple stages of encryption can produce an algorithm that is significantly more difficult to cryptanalyze.
This is as true of substitution ciphers as it is of transposition ciphers.