Permutation cipher is another member of transposition ciphers family. Encryption is realized through the following steps:

  • choose the length of the key N; it specifies number of columns we will use for encryption
  • create a permutation of numbers 1 to N; for instance for N = 4, it could be [2,4,3,1]
  • write the plain text to columns (from left to right, from top to bottom)
  • shuffle it based on the key and write to rows; in our case key [2,4,3,1] says column one will be second part of the cipher text, column two will be fourth, etc.

It gives us N! possible keys.

Example:

Plaintext: I Love You
Key: [4,2,3,1]
Cipher text: VULYOOIE

(first column will be written down as fourth, second as second, third as third, fourth as first)

 

I L O V
E Y O U

Vulnerability is caused by simple cryptoanalysis using known/chosen plaintext attack.