In
cryptography
Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
, a classical cipher is a type of
cipher
In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure. An alternative, less common term is ''encipherment''. To encipher or encode i ...
that was used historically but for the most part, has fallen into disuse. In contrast to modern cryptographic algorithms, most classical ciphers can be practically computed and solved by hand. However, they are also usually very simple to break with modern technology. The term includes the simple systems used since Greek and Roman times, the elaborate Renaissance ciphers, World War II cryptography such as the
Enigma machine and beyond.
In contrast, modern
strong cryptography
Strong cryptography or cryptographically strong are general terms applied to cryptographic systems or components that are considered highly resistant to cryptanalysis.
Demonstrating the resistance of any cryptographic scheme to attack is a co ...
relies on new algorithms and computers developed since the 1970s.
Types of classical ciphers
Classical ciphers are often divided into ''
transposition cipher
In cryptography, a transposition cipher is a method of encryption which scrambles the positions of characters (''transposition'') without changing the characters themselves. Transposition ciphers reorder units of plaintext (typically characters o ...
s'' and ''
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 ...
s''.
Substitution ciphers
In a substitution cipher, letters (or groups of letters) are systematically replaced throughout the message for other letters (or groups of letters).
A well-known example of a substitution cipher is the
Caesar cipher. To encrypt a message with the Caesar cipher, each letter of message is replaced by the letter three positions later in the alphabet. Hence, A is replaced by D, B by E, C by F, etc. Finally, X, Y and Z are replaced by A, B and C respectively. So, for example, "WIKIPEDIA" encrypts as "ZLNLSHGLD". Caesar rotated the alphabet by three letters, but any number works.
Another method of substitution cipher is based on a keyword. All spaces and repeated letters are removed from a word or phrase, which the encoder then uses as the start of the cipher alphabet. The end of the cipher alphabet is the rest of the alphabet in order without repeating the letters in the keyword. For example, if the keyword is CIPHER, the cipher alphabet would look like this:
The previous examples were all examples of monoalphabetic substitution ciphers, where just one cipher alphabet is used. It is also possible to have a
polyalphabetic substitution cipher, where multiple cipher alphabets are used. The encoder would make up two or more cipher alphabets using whatever techniques they choose, and then encode their message, alternating what cipher alphabet is used with every letter or word. This makes the message much harder to decode because the codebreaker would have to figure out both cipher alphabets.
Another example of a polyalphabetic substitution cipher that is much more difficult to decode is the
Vigenère square, an innovative encoding method. With the square, there are 26 different cipher alphabets that are used to encrypt text. Each cipher alphabet is just another rightward Caesar shift of the original alphabet. This is what a Vigenère square looks like:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z A B C D E F G H I J K L M N O P Q R S T U V W X Y
To use the Vigenère square to encrypt a message, a coder first chooses a keyword to use and then repeats it until it is the same length as the message to be encoded. If is the keyword, each letter of the repeated keyword will tell what cipher (what row) to use for each letter of the message to be coded. The cipher alphabet on the second row uses B for A and C for B etc. That is cipher alphabet 'B'. Each cipher alphabet is named by the first letter in it. For example, if the keyword is and the message to encode is , then the encoding is:
Some substitution ciphers involve using numbers instead of letters. An example of this is the
Great Cipher, where numbers were used to represent syllables. There is also another number substitution cipher that involves having four different number pair options for a letter based
on a keyword.
Instead of numbers, symbols can also be used to replace letters or syllables. One example of this is
Zodiac
The zodiac is a belt-shaped region of the sky that extends approximately 8° north or south (as measured in celestial latitude) of the ecliptic, the apparent path of the Sun across the celestial sphere over the course of the year. The p ...
alphabet, where signs of the zodiac were used to represent different letters, for example, the symbols for the sun stood for A, Jupiter stood for B, and Saturn stood for C. Dots, lines, or dashes could also be used, one example of this being
Morse Code
Morse code is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called ''dots'' and ''dashes'', or ''dits'' and ''dahs''. Morse code is named after Samuel Morse, one ...
, which is not a cipher, but uses dots and dashes as letters nonetheless. The
pigpen cipher uses a grid system or lines and dots to establish symbols for letters. There are various other methods that involve substituting letters of the alphabet with symbols or dots and dashes.
Transposition ciphers
In a transposition cipher, the letters themselves are kept unchanged, but their order within the message is scrambled according to some well-defined scheme. Many transposition ciphers are done according to a geometric design. A simple (and once again easy to crack) encryption would be to write every word backwards. For example, "Hello my name is Alice." would now be "olleH ym eman si ecilA." A
scytale
In cryptography, a scytale (; also transliterated skytale, grc, σκυτάλη ''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 ...
is a machine that aids in the transposition of methods.
In a columnar cipher, the original message is arranged in a rectangle, from left to right and top to bottom. Next, a key is chosen and used to assign a number to each column in the rectangle to determine the order of rearrangement. The number corresponding to the letters in the key is determined by their place in the alphabet, i.e. A is 1, B is 2, C is 3, etc. For example, if the key word is CAT and the message is THE SKY IS BLUE, the message would be arranged thus:
C A T
3 1 20
T H E
S K Y
I S B
L U E
Next, the letters are taken in numerical order and that is how the message is transposed. The column under A is taken first, then the column under C, then the column under T, as a result the message "The sky is blue" has become: HKSUTSILEYBE
In the Chinese cipher's method of transposing, the letters of the message are written from right to left, down and up columns to scramble the letters. Then, starting in the first row, the letters are taken in order to get the new
ciphertext
In cryptography, ciphertext or cyphertext is the result of encryption performed on plaintext using an algorithm, called a cipher. Ciphertext is also known as encrypted or encoded information because it contains a form of the original plaintext ...
. For example, if the message needed to be enciphered was THE DOG RAN FAR, the Chinese cipher would look like this:
R R G T
A A O H
F N D E
The cipher text then reads: RRGT AAOH FNDE
Many transposition ciphers are similar to these two examples, usually involving rearranging the letters into rows or columns and then taking them in a systematic way to transpose the letters. Other examples include the Vertical Parallel and the Double Transposition Cipher.
More complex
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
s can be formed by mixing substitution and transposition in a
product cipher; modern
block cipher
In cryptography, a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called ''blocks''. Block ciphers are specified cryptographic primitive, elementary components in the design of many cryptographic protocols and ...
s such as
DES iterate through several stages of substitution and transposition.
Cryptanalysis of classical ciphers
Classical ciphers are commonly quite easy to break. Many of the classical ciphers can be broken even if the attacker only knows sufficient ciphertext and hence they are susceptible to a
ciphertext-only attack. Some classical ciphers (e.g., the
Caesar cipher) have a small key space. These ciphers can be broken with a
brute force attack
In cryptography, a brute-force attack consists of an attacker submitting many passwords or passphrases with the hope of eventually guessing correctly. The attacker systematically checks all possible passwords and passphrases until the corr ...
, that is by simply trying out all keys.
Substitution ciphers can have a large key space, but are often susceptible to a
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 ...
, because for example frequent letters in the plaintext language correspond to frequent letters in the ciphertexts. Polyalphabetic ciphers such as the
Vigenère cipher
The Vigenère cipher () is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers, based on the letters of a keyword. It employs a form of polyalphabetic substitution.
First described by Giovan Battista Bellas ...
prevent a simple frequency analysis by using multiple substitutions. However, more advanced techniques such as the
Kasiski examination can still be used to break these ciphers.
On the other hand, modern ciphers are designed to withstand much stronger attacks than ciphertext-only attacks. A good modern cipher must be secure against a wide range of potential attacks including
known-plaintext attack
The known-plaintext attack (KPA) is an attack model for cryptanalysis where the attacker has access to both the plaintext (called a crib), and its encrypted version ( ciphertext). These can be used to reveal further secret information such as s ...
s and
chosen-plaintext attacks as well as
chosen-ciphertext attack
A chosen-ciphertext attack (CCA) is an attack model for cryptanalysis where the cryptanalyst can gather information by obtaining the decryptions of chosen ciphertexts. From these pieces of information the adversary can attempt to recover the hidden ...
s. For these ciphers an attacker should not be able to find the key even if they know any amount of plaintext and corresponding ciphertext and even if they could select plaintext or ciphertext themselves. Classical ciphers do not satisfy these much stronger criteria and hence are no longer of interest for serious applications.
Some techniques from classical ciphers can be used to strengthen modern ciphers. For example, the
MixColumns step in
AES
AES may refer to:
Businesses and organizations Companies
* AES Corporation, an American electricity company
* AES Data, former owner of Daisy Systems Holland
* AES Eletropaulo, a former Brazilian electricity company
* AES Andes, formerly AES Gener ...
is a
Hill cipher.
See also
*
History of cryptography
Cryptography, the use of codes and ciphers to protect secrets, began thousands of years ago. Until recent decades, it has been the story of what might be called classical cryptography — that is, of methods of encryption that use pen and paper, ...
References
Hand CiphersPencil-and-paper ciphers on Ciphermachines & Cryptology
Trinity College Department of Computer Science: Historical CryptographyInformation about many different types of encryption algorithms including substitution and transposition ciphers
*
Singh, Simon.
The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography. New York: Anchor, 2000.
*D'Agapeyeff, Alexander. Codes and Ciphers. Oxford UP, 1939.
*
William Friedman
William Frederick Friedman (September 24, 1891 – November 12, 1969) was a US Army cryptographer who ran the research division of the Army's Signal Intelligence Service (SIS) in the 1930s, and parts of its follow-on services into the 1950s. I ...
American Army Field Codes In the American Expeditionary Forces During The First World War U.S. War Department, June 1942
*Laffin, John. Codes and Ciphers: Secret Writing through the Ages. Abelard-Schuman, 1964.
*Wrixon, Fred B. Codes, Ciphers, and Secret Languages. New York: Bonanza Books, 1989.
{{DEFAULTSORT:Classical Cipher