Double Transposition

Suppose we want to encrypt the plaintext message (where "x" represents a space)

      attackxatxdawn

In a double transposition cipher, we would put the plaintext into an array and permute the rows and columns. For example, we could put the message above into a 3 x 5 matrix as below.

col 1 col 2 col 3
row 1 att
row 2 ack
row 3 xat
row 4 xda
row 5 wnx

Suppose we permute the columns (1,2,3) → (1,3,2) and the rows (1,2,3,4,5) → (3,5,1,4,2). The result is

col 1 col 3 col 2
row 3 xta
row 5 wxn
row 1 att
row 4 xad
row 2 akc

Then the ciphertext is

      xtawxnattxadakc

Anyone who knows the key (i.e., the row and column permutations) can easily recover the plaintext.