Simple encryption algorithms, which were invented long before first computers, are based on substitution and transposition of single plaintext characters. Meanwhile, the operations performed in modern encryption algorithms are usually similar but they affect single bits and bytes.
The substitution ciphers are about replacing each group of plaintext letters with another predefined group. For decrypting, one should use a reverse substitution. There are four main categories of substitution ciphers:
- Simple substitution ciphers, which replace each character with another predefined character:
- Homophonic substitution ciphers, which replace each plaintext character with one of a few characters available to it:
- Polygraphic substitution ciphers, in which the whole groups of characters are substituted:
- Polyalphabetic substitution ciphers, in which each plaintext character is replaced with another character. The substitution changes for every character and it depends on its position in the text:
Transposition ciphers do not substitute any plaintext characters but they change positions of the letters.
- Transposition ciphers:
First electro-mechanical machines started to be used for encryption as early as at the end of the 19th century. Rotor machines, which were developed after World War I, were equipped with internal movable rotors that implemented polyalphabetic substitution ciphers.
It is a simple substitution cipher which operates on single bits and bytes, instead of on leters.