HOME

TheInfoList



OR:

In
cryptography Cryptography, or cryptology (from "hidden, secret"; and ''graphein'', "to write", or ''-logy, -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of Adversary (cryptography), ...
, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code, or Caesar shift, is one of the simplest and most widely known
encryption In Cryptography law, cryptography, encryption (more specifically, Code, encoding) is the process of transforming information in a way that, ideally, only authorized parties can decode. This process converts the original representation of the inf ...
techniques. It is a type of
substitution cipher In cryptography, a substitution cipher is a method of encrypting in which units of plaintext are replaced with the ciphertext, in a defined manner, with the help of a key; the "units" may be single letters (the most common), pairs of letters, t ...
in which each letter in the
plaintext In cryptography, plaintext usually means unencrypted information pending input into cryptographic algorithms, usually encryption algorithms. This usually refers to data that is transmitted or stored unencrypted. Overview With the advent of comp ...
is replaced by a letter some fixed number of positions down the
alphabet An alphabet is a standard set of letter (alphabet), letters written to represent particular sounds in a spoken language. Specifically, letters largely correspond to phonemes as the smallest sound segments that can distinguish one word from a ...
. For example, with a left shift of 3, would be replaced by , would become , and so on. The method is named after
Julius Caesar Gaius Julius Caesar (12 or 13 July 100 BC – 15 March 44 BC) was a Roman general and statesman. A member of the First Triumvirate, Caesar led the Roman armies in the Gallic Wars before defeating his political rival Pompey in Caesar's civil wa ...
, who used it in his private correspondence. The encryption step performed by a Caesar cipher is often incorporated as part of more complex schemes, such as the
Vigenère cipher The Vigenère cipher () is a method of encryption, encrypting alphabetic text where each letter of the plaintext is encoded with a different Caesar cipher, whose increment is determined by the corresponding letter of another text, the key (crypt ...
, and still has modern application in the
ROT13 ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet. ROT13 is a special case of the Caesar cipher which was developed in ancient Rome, used by Julius Caesar in the 1st centur ...
system. As with all single-alphabet substitution ciphers, the Caesar cipher is easily broken and in modern practice offers essentially no
communications security Communications security is the discipline of preventing unauthorized interceptors from accessing telecommunications in an intelligible form, while still delivering content to the intended recipients. In the North Atlantic Treaty Organization ...
.


Example

The transformation can be represented by aligning two alphabets; the cipher is the plain alphabet rotated left or right by some number of positions. For instance, here is a Caesar cipher using a left rotation of three places, equivalent to a right shift of 23 (the shift parameter is used as the key): When encrypting, a person looks up each letter of the message in the "plain" line and writes down the corresponding letter in the "cipher" line. Plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG Ciphertext: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD Deciphering is done in reverse, with a right shift of 3. The encryption can also be represented using
modular arithmetic In mathematics, modular arithmetic is a system of arithmetic operations for integers, other than the usual ones from elementary arithmetic, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to mo ...
by first transforming the letters into numbers, according to the scheme, A → 0, B → 1, ..., Z → 25. Encryption of a letter ''x'' by a shift ''n'' can be described mathematically as, : E_n(x) = (x + n) \mod . Decryption is performed similarly, : D_n(x) = (x - n) \mod . (Here, "mod" refers to the
modulo operation In computing and mathematics, the modulo operation returns the remainder or signed remainder of a Division (mathematics), division, after one number is divided by another, the latter being called the ''modular arithmetic, modulus'' of the operatio ...
. The value ''x'' is in the range 0 to 25, but if or are not in this range then 26 should be added or subtracted.) The replacement remains the same throughout the message, so the cipher is classed as a type of '' monoalphabetic substitution'', as opposed to '' polyalphabetic substitution''.


History and usage

The Caesar cipher is named after
Julius Caesar Gaius Julius Caesar (12 or 13 July 100 BC – 15 March 44 BC) was a Roman general and statesman. A member of the First Triumvirate, Caesar led the Roman armies in the Gallic Wars before defeating his political rival Pompey in Caesar's civil wa ...
, who, according to
Suetonius Gaius Suetonius Tranquillus (), commonly referred to as Suetonius ( ; – after AD 122), was a Roman historian who wrote during the early Imperial era of the Roman Empire. His most important surviving work is ''De vita Caesarum'', common ...
, used it with a shift of three (A becoming D when encrypting, and D becoming A when decrypting) to protect messages of military significance. While Caesar's was the first recorded use of this scheme, other substitution ciphers are known to have been used earlier. His nephew,
Augustus Gaius Julius Caesar Augustus (born Gaius Octavius; 23 September 63 BC – 19 August AD 14), also known as Octavian (), was the founder of the Roman Empire, who reigned as the first Roman emperor from 27 BC until his death in A ...
, also used the cipher, but with a right shift of one, and it did not wrap around to the beginning of the alphabet: Evidence exists that Julius Caesar also used more complicated systems, and one writer,
Aulus Gellius Aulus Gellius (c. 125after 180 AD) was a Roman author and grammarian, who was probably born and certainly brought up in Rome. He was educated in Athens, after which he returned to Rome. He is famous for his ''Attic Nights'', a commonplace book, ...
, refers to a (now lost) treatise on his ciphers: It is unknown how effective the Caesar cipher was at the time; there is no record at that time of any techniques for the solution of simple substitution ciphers. The earliest surviving records date to the 9th-century works of
Al-Kindi Abū Yūsuf Yaʻqūb ibn ʼIsḥāq aṣ-Ṣabbāḥ al-Kindī (; ; ; ) was an Arab Muslim polymath active as a philosopher, mathematician, physician, and music theorist Music theory is the study of theoretical frameworks for understandin ...
in the
Arab Arabs (,  , ; , , ) are an ethnic group mainly inhabiting the Arab world in West Asia and North Africa. A significant Arab diaspora is present in various parts of the world. Arabs have been in the Fertile Crescent for thousands of years ...
world with the discovery of
frequency analysis In cryptanalysis, frequency analysis (also known as counting letters) is the study of the frequency of letters or groups of letters in a ciphertext. The method is used as an aid to breaking classical ciphers. Frequency analysis is based on th ...
. A piece of text encrypted in a
Hebrew Hebrew (; ''ʿÎbrit'') is a Northwest Semitic languages, Northwest Semitic language within the Afroasiatic languages, Afroasiatic language family. A regional dialect of the Canaanite languages, it was natively spoken by the Israelites and ...
version of the Caesar cipher not to be confused with
Atbash Atbash (; also transliterated Atbaš) is a monoalphabetic substitution cipher originally used to encrypt the Hebrew alphabet. It can be modified for use with any known writing system with a standard collating order. Encryption The Atbash ciph ...
, is sometimes found on the back of Jewish
mezuzah A ''mezuzah'' ( "doorpost"; plural: ''mezuzot'') is a piece of parchment inscribed with specific Hebrew language, Hebrew verses from the Torah, which Jews affix in a small case to the doorposts of their homes. These verses are the Biblical pa ...
scrolls. When each letter is replaced with the letter before it in the
Hebrew alphabet The Hebrew alphabet (, ), known variously by scholars as the Ktav Ashuri, Jewish script, square script and block script, is a unicase, unicameral abjad script used in the writing of the Hebrew language and other Jewish languages, most notably ...
the text translates as "
YHWH The TetragrammatonPronounced ; ; also known as the Tetragram. is the four-letter Hebrew-language theonym (transliterated as YHWH or YHVH), the name of God in the Hebrew Bible. The four Hebrew letters, written and read from right to left, a ...
, our God, YHWH", a quotation from the main part of the scroll. In the 19th century, the personal advertisements section in newspapers would sometimes be used to exchange messages encrypted using simple cipher schemes. David Kahn (1967) describes instances of lovers engaging in secret communications enciphered using the Caesar cipher in ''
The Times ''The Times'' is a British Newspaper#Daily, daily Newspaper#National, national newspaper based in London. It began in 1785 under the title ''The Daily Universal Register'', adopting its modern name on 1 January 1788. ''The Times'' and its si ...
''. Even as late as 1915, the Caesar cipher was in use: the Russian army employed it as a replacement for more complicated ciphers which had proved to be too difficult for their troops to master; German and Austrian cryptanalysts had little difficulty in decrypting their messages. Caesar ciphers can be found today in children's toys such as secret decoder rings. A Caesar shift of thirteen is also performed in the
ROT13 ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the Latin alphabet. ROT13 is a special case of the Caesar cipher which was developed in ancient Rome, used by Julius Caesar in the 1st centur ...
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
, a simple method of obfuscating text widely found on
Usenet Usenet (), a portmanteau of User's Network, is a worldwide distributed discussion system available on computers. It was developed from the general-purpose UUCP, Unix-to-Unix Copy (UUCP) dial-up network architecture. Tom Truscott and Jim Elli ...
and used to obscure text (such as joke punchlines and story spoilers), but not seriously used as a method of encryption. The
Vigenère cipher The Vigenère cipher () is a method of encryption, encrypting alphabetic text where each letter of the plaintext is encoded with a different Caesar cipher, whose increment is determined by the corresponding letter of another text, the key (crypt ...
uses a Caesar cipher with a different shift at each position in the text; the value of the shift is defined using a repeating keyword. If the keyword is as long as the message, is chosen at
random In common usage, randomness is the apparent or actual lack of definite pattern or predictability in information. A random sequence of events, symbols or steps often has no order and does not follow an intelligible pattern or combination. ...
, never becomes known to anyone else, and is never reused, this is the
one-time pad The one-time pad (OTP) is an encryption technique that cannot be Cryptanalysis, cracked in cryptography. It requires the use of a single-use pre-shared key that is larger than or equal to the size of the message being sent. In this technique, ...
cipher, proven unbreakable. However the problems involved in using a random key as long as the message make the one-time pad difficult to use in practice. Keywords shorter than the message (e.g., " Complete Victory" used by the Confederacy during the
American Civil War The American Civil War (April 12, 1861May 26, 1865; also known by Names of the American Civil War, other names) was a civil war in the United States between the Union (American Civil War), Union ("the North") and the Confederate States of A ...
), introduce a cyclic pattern that might be detected with a statistically advanced version of frequency analysis. In April 2006, fugitive
Mafia "Mafia", as an informal or general term, is often used to describe criminal organizations that bear a strong similarity to the Sicilian Mafia, original Mafia in Sicily, to the Italian-American Mafia, or to other Organized crime in Italy, organiz ...
boss Bernardo Provenzano was captured in
Sicily Sicily (Italian language, Italian and ), officially the Sicilian Region (), is an island in the central Mediterranean Sea, south of the Italian Peninsula in continental Europe and is one of the 20 regions of Italy, regions of Italy. With 4. ...
partly because some of his messages, clumsily written in a variation of the Caesar cipher, were broken. Provenzano's cipher used numbers, so that "A" would be written as "4", "B" as "5", and so on. In 2011, Rajib Karim was convicted in the United Kingdom of "terrorism offences" after using the Caesar cipher to communicate with Bangladeshi Islamic activists discussing plots to blow up
British Airways British Airways plc (BA) is the flag carrier of the United Kingdom. It is headquartered in London, England, near its main Airline hub, hub at Heathrow Airport. The airline is the second largest UK-based carrier, based on fleet size and pass ...
planes or disrupt their IT networks. Although the parties had access to far better encryption techniques (Karim himself used PGP for data storage on computer disks), they chose to use their own scheme (implemented in
Microsoft Excel Microsoft Excel is a spreadsheet editor developed by Microsoft for Microsoft Windows, Windows, macOS, Android (operating system), Android, iOS and iPadOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a ...
), rejecting a more sophisticated code program called Mujahedeen Secrets "because 'kaffirs', or non-believers, know about it, so it must be less secure".


Breaking the cipher

The Caesar cipher can be easily broken even in a ciphertext-only scenario. Since there are only a limited number of possible shifts (25 in English), an attacker can mount a
brute force attack In cryptography, a brute-force attack or exhaustive key search is a cryptanalytic attack that consists of an attacker submitting many possible Key (cryptography), keys or passwords with the hope of eventually guessing correctly. This strategy can ...
by deciphering the message, or part of it, using each possible shift. The correct description will be the one which makes sense as English text. An example is shown on the right for the ciphertext ""; the candidate plaintext for shift four "" is the only one which makes sense as English text. Another type of brute force attack is to write out the alphabet beneath each letter of the ciphertext, starting at that letter. Again the correct decryption is the one which makes sense as English text. This technique is sometimes known as "completing the plain component". Another approach is to match up the frequency distribution of the letters. By graphing the frequencies of letters in the ciphertext, and by knowing the expected distribution of those letters in the original language of the plaintext, a human can easily spot the value of the shift by looking at the displacement of particular features of the graph. This is known as
frequency analysis In cryptanalysis, frequency analysis (also known as counting letters) is the study of the frequency of letters or groups of letters in a ciphertext. The method is used as an aid to breaking classical ciphers. Frequency analysis is based on th ...
. For example, in the English language the plaintext frequencies of the letters , , (usually most frequent), and , (typically least frequent) are particularly distinctive. Computers can automate this process by assessing the similarity between the observed frequency distribution and the expected distribution. This can be achieved, for instance, through the utilization of the
chi-squared statistic A chi-squared test (also chi-square or test) is a statistical hypothesis test used in the analysis of contingency tables when the sample sizes are large. In simpler terms, this test is primarily used to examine whether two categorical variables ...
or by minimizing the sum of squared errors between the observed and known language distributions. The
unicity distance In cryptography, unicity distance is the length of an original ciphertext needed to break the cipher by reducing the number of possible spurious keys to zero in a brute force attack. That is, after trying every possible key, there should be just ...
for the Caesar cipher is about 2, meaning that on average at least two characters of ciphertext are required to determine the key. In rare cases more text may be needed. For example, the words "" and "" can be converted to each other with a Caesar shift, which means they can produce the same ciphertext with different shifts. However, in practice the key can almost certainly be found with at least 6 characters of ciphertext. With the Caesar cipher, encrypting a text multiple times provides no additional security. This is because two encryptions of, say, shift ''A'' and shift ''B'', will be equivalent to a single encryption with shift . In mathematical terms, the set of encryption operations under each possible key forms a
group A group is a number of persons or things that are located, gathered, or classed together. Groups of people * Cultural group, a group whose members share the same cultural identity * Ethnic group, a group whose members share the same ethnic iden ...
under
composition Composition or Compositions may refer to: Arts and literature *Composition (dance), practice and teaching of choreography * Composition (language), in literature and rhetoric, producing a work in spoken tradition and written discourse, to include ...
.


See also

*
Scytale In cryptography, a scytale (; also transliterated skytale, ''skutálē'' "baton, cylinder", also ''skútalon'') is a tool used to perform a transposition cipher, consisting of a cylinder with a strip of parchment wound around it on which is wr ...


Notes


Bibliography

* * Chris Savarese and Brian Hart,
The Caesar Cipher
', Trinity College, 1999


Further reading

*


External links

*
Use this decoder, Agent 2S.
{{Cryptography navbox , classical, state=collapsed Classical ciphers Group theory Julius Caesar