Without mathematical formalism the contents of this section read: |
A shift cipher replaces each letter of the plaintext by the letter that follows a certain number, of positions in the alphabet. This number is the key. |
Decryption works in the reverse direction: Count backwards from the ciphertext letter. |
For encryption we simply count, for example using our fingers: M, M+1 = N, M+2=O, M+3=P, if 3 is the key—therefore we replace the letter M by the letter P. If we reach the end of the alphabet (that is Z for the standard alphabet) we restart with A. For example: plaintext = Y, Y+1=Z, Y+2=A, Y+3=B = ciphertext.
See also: mathematical description
1.) The »original CAESAR« uses the standard alphabet {A,...Z} with A ↔ 0, B ↔ 1, ..., Z ↔ 25 and the fixed key 3. An example looks like this:
C A E S A R | +3 (plaintext) ----------- F D H V D UThe following figure illustrates the procedure.
[Note that the original Roman alphabet had only 23 letters without J, U, W. Nevertheless we use our 26 letter alphabet (almost) always in these lectures.]
2.) ROT13
3.) XOR
4.) The absurd story of the Mafia boss Bernardo Provenzano shows that such simple ciphers are in use even today.
A »precondition« such as the assignment A ↔ 0 etc., that is not secret and doesn't depend on a key is used with almost all encryption methods. A modern example is the representation of files by sequences of bits or bytes. Such a transformation is called a code.
FAQ: What is the difference between »codes« and »ciphers«?