Caesar cipher

The Caesar cipher (also known as Caesar cipher, Caesar algorithm, Caesar shift, shift cipher or as Plain Caesar ) is a simple symmetric encryption method, which is based on the monographic and the mono-alphabetic substitution. As one of the simplest and least secure method it is now used mainly to illustrate basic principles of cryptology vividly.

When encrypting each letter of the plaintext is mapped to a ciphertext letter. This figure is obtained by cyclically shifting the character of an ordered alphabet by a certain number to the right ( rotated ). The number of shifted characters is the key, which remains unchanged for the entire encryption.

Example of a shift by three characters:

Clear y z Secret: DEFGHIJKLMNOPQRSTUVWX YZABC From the plain text " caesar " is thus the ciphertext " FDHVDU ". For decryption, the alphabet for the same number of characters is rotated to the left.

Mathematically describe the Caesar cipher with the help of modulo addition. For this purpose, first all the characters of the alphabet are mapped to a residue class ring, for example a = 0, b = 1, c = 2, ..., z = 25 The encryption of a plaintext letter with a shift of characters and an alphabet with 26 characters is then defined as:

Corresponding to this is the decryption of a ciphertext letter:

History

The name of the Caesar cipher is derived from the Roman general Gaius Julius Caesar, who has used according to the tradition of the Roman writer Suetonius this type of secret communication for its military correspondence. Here Caesar used a shift of the alphabet by three letters.

Suetonius describes the process as follows:

Also the Roman emperor Augustus used Suetonius After the procedure, but with a shift of one letter and without rotation of the alphabet. Instead of an X, the last letter of the then Roman alphabet, Augustus AA wrote.

Leon Battista Alberti improved the method in the 15th century by the development of cipher. The cipher facilitates the implementation of the Caesar cipher with arbitrary shifts, by the inner disc to the number of shifted characters to the outer disk is rotated, and thus can read the replaced character. In addition, Alberti also described the use of cipher or their variants for the implementation of more complex monoalphabetic and polyalphabetic substitution method.

Trithemius in 1508 described a polyalphabetic substitution method with the help of which he invented tabula recta. This method, which was known in the 16th century as a Vigenere encryption, is essentially based on the Caesar cipher, but each letter alternating with another shift, which greatly increases safety.

Deciphering and Safety

Like all monoalphabetic encryption method also offers the shift cipher not a sufficient security against unauthorized deciphering and can easily be "cracked". The unequal distribution in the natural language of the letters is not hidden by this type of encryption, so that a frequency analysis reveals the workings of a simple mono alphabetic substitution. Even simpler, the attacker uses the very small number of possible keys. Since the size of the key space is only 25, which corresponds to a " key length " of less than 5 bits, is before after trying at least after the 25th attempt the plaintext. An exhaustive key search ( Exhaustion ) is trivial to achieve with the Caesar cipher. Because this with little effort is also possible without a computer or calculator, the safety of the Caesar cipher was already to their beginnings not on the secrecy of the key, but mainly due to the secrecy of the proceedings, and thus does not correspond to the postulated in the 19th century principle of Auguste Kerckhoffs.

Key letter

The number of shifted characters is the key dar. Instead of specifying the offset as a number, you can also specify a key letter. There are two common conventions:

The first convention arises when you remove the key letters from the two superimposed alphabets reads ("a" to "D " is a shift to three characters). This is also common in the related Vigenere encryption. In addition, this convention the figure of letter corresponds to number, as is commonly done for the modulo calculation. The second convention corresponds to the natural numbering of the shifts. A historical reference that Caesar and Augustus each their initial letters used as the key letter is not recorded by Suetonius.

Since contradict both conventions, the specification of a key letter specifying is misleading, as a number, however, clearly.

Variants

Today is the Caesar cipher as ROT13 with a shift to 13 characters in use to obfuscate text content such as spoilers or punch against inadvertent reading. Since the current Latin alphabet consists of 26 characters, it is first encrypted by the cyclic shift to 13 characters of text and reaches a total displacement of 26 characters by a second encryption with the same key and thus recovered the original text. This is a particularly simple case of a self-reciprocal encryption. A method for encryption and decryption involutory are identical, and a two-fold application of the method gives the original plaintext back.

In addition to the use of a modified alphabet, in which about numbers and special characters are included, there is also the variant of the inverse or reverted Caesar cipher. Here, the order of the secret alphabet before the displacement is reversed. In a shift of 3 characters then gives the following alphabet:

Clear y z Secret: DCBAZYXWVUTSRQPONMLKJ IHGFE In this case would consist of " caesar " ciphertext " BDZLDM " arise. Another variant arises when one omits the shift in the reverted Caesar cipher and thus gives the following alphabet:

Clear y z Secret: ZYXWVUTSRQPONMLKJIHGF EDCBA This variant is known, using the Hebrew alphabet as Atbasch.

158615
de