Transposition Ciphers

Why
Transposition ciphers are important because they are used in modern cipher blocks

What
Transposition ciphers are ciphers whose encoding algorithm simply rearranges the elements of the original messages  instead of replacing them with new elements.

Vulnerability
The transposition ciphers are vulnerable to frequency analysis techniques because the identities of the letters do not change.

How
We start with a message $$m$$ and a block size $$b$$. We start by breaking up the message into $$b$$ sized blocks. Then, we use our key $$\pi$$, which is one of the $$b!$$ permutations possible given our block size, to scramble up each block one by one.

Example 1
Setup:
 * Given block size of 3
 * Given key of (2, 1, 3)

Question: What is the encoded string of the message "hey man"
Answer: ehyamn

Question: What is the decoded string of the message "baabmosohoot"
Answer: bambooshoot