Jump to content

User:Matt Crypto/MediaWiki:Classical cryptography

From Wikipedia, the free encyclopedia

In cryptography, a Caesar cipher, also known as a Caesar shift cipher or shift cipher, is a substitution cipher in which the cipher alphabet is is the plain alphabet rotated left or right by some number of positions. For instance, here is a Caesar cipher using a right rotation of three places ("3" being the key):

Plain:  ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: XYZABCDEFGHIJKLMNOPQRSTUVW

To encipher a message, simply look up each letter of the message in the "plain" line and write down the corresponding letter in the "cipher" line. To decipher, do the reverse. Because this cipher is a group, multiple encryptions and decryptions provide NO additional security against any attack, including brute-force.

History

[edit]

The Caesar cipher is named after Julius Caesar, who used it with a key of 3 to protect a message of military significance to Marcus Cicero. It was secure at the time because Caesar's enemies could often not even read plaintext, let alone ciphertext; furthermore, no cryptanalytic method was known which would reliably break such a cypher. Others are known to have used such cyphers before Caesar, so it was certainly not invented by him. Since the discovery of frequency analysis in the Arab world around 1000CE, any such cypher has been easily broken. None are suitable for secure communication now, and indeed for the past 1000 years or so. An ancient book on cryptography, now lost, is said to have discussed the use of such cyphers at considerable length. Our knowledge is due to references in other writings, such as Suetonius.

Breaking the cipher

[edit]

Frequency analysis

[edit]

By graphing the frequencies of letters in the ciphertext and those in the original language of the plaintext, a human can trivially spot the value of the key by looking at the displacement of particular features of the graph. For example in the English language the frequencies of the letters Q, R, S and T have a particularly distinctive pattern.

Computers can also do this trivially by means of an auto-correlation function.

Brute force

[edit]

As the system only has 26 possible keys (or as many characters as there are in the alphabet used) it is trivial even for a human to cycle through the keys trying each one until they find one which allows the ciphertext to be converted into plaintext. See brute force attack.

Cipher strength

[edit]

The Caesar cipher is much weaker than the (competently done) random substitution ciphers used in newspaper cryptogram puzzles. The most commonplace Caesar ciphers found today are in children's toys such as secret decoder rings and in the ROT13 cipher on Usenet (which, of course, is meant to be trivial to decrypt).

See also

[edit]
[edit]


Classical cryptography
Ciphers: ADFGVX | Affine | Atbash | Autokey | Book | Caesar | Permutation | Playfair | Polyalphabetic | Running key | Substitution | Transposition |

Vigenère

Cryptanalysis: Frequency analysis | Index of coincidence &nbsp Misc: Cryptogram | Scytale | Straddling checkerboard