In classical cryptography, a permutation cipher is a transposition cipher in which the key is a permutation.
To apply a cipher, a random
permutation of size e is generated
(the larger the value of e the more
secure the cipher).
The plaintext is
then broken into segments of size e
and the letters within that segment
are permuted according to this key.
In theory, any transposition cipher
can be viewed as a permutation cipher
where e is equal to the length of the
plaintext.
This is too cumbersome a
generalisation to use in actual
practice, however.
Encryption and Decryption
Let 𝑚 be a positive integer. Let P=C=(ℤ26 )𝑚 and let K consists
of all permutations of (1, 2, . . 𝑚) .
For a key 𝜋 we define
𝑒𝜋 (𝑥1 , 𝑥2 , … 𝑥𝑚) = (𝑥𝜋(1) , 𝑥𝜋(2) ,
… 𝑥𝜋(𝑚)) and
𝑑𝜋 (𝑦1 , 𝑦2 , … 𝑦𝑚) = (𝑦𝜋−1 (1) ,
𝑦𝜋−1 (2) , … , 𝑦𝜋−1 (𝑚))
where 𝜋−1 is inverse permutationof 𝜋.