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.
Plaintext: I Love You
Cipher text: VULYOOIE
(first column will be written down as fourth, second as second, third as third, fourth as first)
Vulnerability is caused by simple cryptoanalysis using known/chosen plaintext attack.