Jump to content

Classical cipher: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Reverted edit by 199.184.247.128 (talk) to last version by GreenC bot
 
(96 intermediate revisions by 66 users not shown)
Line 1: Line 1:
{{Short description|Disused cipher that was used historically}}
A [[cipher]] is a means of concealing a message, where letters of the message are substituted or transposed for other letters, letter pairs, and sometimes for many letters. In [[cryptography]], a '''classical cipher''' is a type of cipher that was used historically but now has fallen, for the most part, into disuse. In general, classical ciphers operate on an alphabet of letters (such as "A-Z"), and are implemented by hand or with simple mechanical devices. They are probably the most basic types of ciphers, which made them not very reliable, especially after new technology came about--modern schemes use [[computer]]s or other digital technology, and operate on [[bit]]s and [[byte]]s. A lot of classical ciphers were used by well-respected people, such as [[Julius Caesar]] and [[Napoleon]], who created their own ciphers which were then popularly used. A lot of ciphers found their origins in the military and were used for transporting secret messages among people on the same side. Classical schemes are often susceptible to [[ciphertext-only attack]]s, sometimes even without knowledge of the system itself, using tools such as [[frequency analysis]]. Sometimes grouped with classical ciphers are more advanced mechanical or electro-mechanical cipher machines, such as the [[Enigma machine]].
{{More footnotes|date=November 2010}}
In [[cryptography]], a '''classical cipher''' is a type of [[cipher]] 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]] relies on new algorithms and computers developed since the 1970s.
==Types of Classical ciphers==
Classical ciphers are often divided into ''[[transposition cipher]]s'' and ''[[substitution cipher]]s''.


==Types of classical ciphers==
Classical ciphers are often divided into ''[[transposition cipher]]s'' and ''[[substitution cipher]]s'', but there are also ''[[Null cipher|concealment ciphers]]''.


===Substitution ciphers===
===Substitution ciphers===
{{Main article|Substitution cipher}}
In a substitution cipher, letters (or groups of letters) are systematically replaced throughout the message for other letters (or groups of letters). For instance a simple (and therefore easy to crack) encryption would be to substitute each letter for the next letter in the alphabet (a to b, b to c, and so on with z being substituted by a). Using this encryption the sentence "Hello my name is Alice." would be encrypted as "Ifmmp nz obnf jt Bmjdf."


In a substitution cipher, letters, or groups of letters, are systematically replaced throughout the message for other letters, groups of letters, or symbols.


The [[Caesar shift]] is one of the most well-known types of substitution ciphers. It gained fame around the 2nd century AD when Julius Caesar used it to encipher messages. In order to apply a Caesar shift to a text, all the writer had to do was shift the alphabet down three letters and that would be the new cipher alphabet used to encode the message. D would become A, E would become B, F would become C, etc. So, for example, if someone wanted to encode the message "Wikipedia," it would become ZLNLSHGLD. When Caesar used this shift, he only used a shift of three letters, but subsitution ciphers work with shifts of any length.
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:


{| class="wikitable"
Another method of substitution cipher is using a keyword. You choose a word or short phrase, remove all the spaces and repeated letters and then use this 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:
! normal alphabet
| {{mono|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}}
|-
! cipher alphabet
| {{mono|c i p h e r a b d f g j k l m n o q s t u v w x y z}}
|}
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 cipher|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 [[Vigenere square|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:
'''normal alphabet''': 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

'''cipher alphabet''': c i p h e r s t u v w x y z a b d f g j k l m n o q


The previous examples were all examples of monoalphabetic substitution ciphers, where just one cipher alphabet is used. It is also possible to have a polyaphabetic substitution cipher, where multiple cipher alphabets are used. The encoded would just make up two or more cipher alphabets using whatever techniques he or she chooses, and then encode their message, alternating what cipher alphabet is used with every letter or word. This makes the message a lot hard to decode because the codebreaker would have to figure out both cipher alphabets.


Another example of a polyaphabetic substition cipher that is a lot harder to decode is the [[Vigenere 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 rightword Caesar shift of the original alphabet. This is what a Vigenere 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
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
Line 33: Line 37:
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
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
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
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
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
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
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
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
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
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
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
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
Line 51: Line 55:
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
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


In order to use the Vigenere square to encrypt a message, you first choose a keyword and then repeat it is the same length as the message you wish to encode. You then would write the message underneath the repeated keyword to see which cipher alphabet you would use for each letter of the message. The first letter of the message would be encoded using the cipher alphabet that corresponds with the first letters of the keyword. The cipher alphabet that uses B for A and C for B etc. would be cipher alphabet 'B'. Each cipher alphabet is named by the first letter in it. For example if you have a keyword of WORD and the message you want to encode is I LOVE CRYPTOGRAPHY, this is what you would do:
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 {{mono|LEMON}} 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 {{mono|LEMON}} and the message to encode is {{mono|ATTACKATDAWN}}, then the encoding is:


{| class="wikitable"
'''message''': I LOVE CRYPTOGRAPHY
! Plaintext
| {{mono|ATTACKATDAWN}}
|-
! Key
| {{mono|LEMONLEMONLE}}
|-
! Ciphertext
| {{mono|LXFOPVEFRNHR}}
|}


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{{which|date=April 2022}} that involves having four different number pair options for a letter based
'''keyword''': W ORDW ORDWORDWORDW

'''encoded text''':E ZFYA QIBLHFJNOGKU


Some subsitution 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.
on a keyword.


Instead of numbers, symbols can also be used to replace letters or syllables. One example of this is [[Zodiac]] 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]], which isn't really 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.
Instead of numbers, symbols can also be used to replace letters or syllables. One example of this is [[Zodiac]] 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]], 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===
===Transposition ciphers===
{{Main article|Transposition cipher}}
In a transposition cipher, the letters themselves are kept unchanged, but their order within the message is scrambled according to some well-defined scheme. A lot of 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]] is a machine that aids in the transposition of methods.


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]] is a machine that aids in the transposition of methods.


One specific example of a transposition is a columnar cipher. In a columnar cipher, the original message is put into a rectangle, going from left to right and top to bottom. Next, a key is chosen, in order to assign a number to each column in the rectangle to determine the order or rearranging the letters. 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, this is how you would arrange your message:
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
C A T
Line 80: Line 87:
L U E
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]]. For example, if the message needed to be enciphered was THE DOG RAN FAR, the Chinese cipher would look like this:
Next, you take the letters in numerical order and that is how you would transpose the message. You take the column under A first, then the column under C, then the column under T, as a result your message "The sky is blue" has become: HKSUTSILEYBE


R R G T
A A O H
F N D E


The cipher text then reads: RRGT AAOH FNDE
Another type of transposition cipher is the Chinese cipher. In this method of transposing, the letters of the message that need to be enciphered are written from right to left, down and up columns in order to scramble the letters. Then, starting in the first row, the letters are then taken in order to get the new ciphertext. For example, if the message needed to be enciphered was THE DOG RAN FAR, the Chinese cipher would look like this:


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.
R R G T
A A O H
F N D E


More complex [[algorithm]]s can be formed by mixing substitution and transposition in a [[product cipher]]; modern [[block cipher]]s such as [[Data Encryption Standard|DES]] iterate through several stages of substitution and transposition.
The cipher text would then read: RRGT AAOH FNDE


=== Concealment ciphers ===
{{Main article|Null cipher}}


Put simply, a concealment, or null, cipher is any cipher which involves a number of ''nulls,'' or decoy letters. A null cipher could be [[plaintext]] words with nulls placed in designated areas or even a plaintext message broken up in different positions with a null at the end of each word.<ref name=":4">{{Cite book |last1=Travis |first1=Falcon |title=The Spy's Guidebook |last2=Hindley |first2=Judy |last3=Thomson |first3=Ruth |last4=Amery |first4=Heather |last5=Rawson |first5=Christopher |last6=Harper |first6=Anita |publisher=Usborne Pocketbooks |year=1978}}</ref><ref>{{Cite book |last=Moore |first=Gareth |title=Explorer Academy Codebreaking Activity Adventure |year=2019 |publisher=National Geographic Books |isbn=9781426333071}}</ref> However, a message with only a couple nulls (for example, one at the beginning and one at the end) is ''not'' a null cipher.
A lot of transposition ciphers are similar to these two examples and usually involved rearranging the letters into rows or columns and then taking them in a systematic way in order to transpose the letters. Some other examples include the Vertical Parallel and the Double Transposition Cipher.


For example, during [[English Civil War|England's Civil War]] Royalist Sir John Trevanian was aided in his escape from a Puritan castle in [[Colchester]] by this message:<ref name=":1">{{Cite book |last=Janeczko |first=Paul B. |title=Top Secret: a Handbook of Codes, Ciphers, and Secret Writing |publisher=Candlewick Press |year=2004 |isbn=9780763629724}}</ref><blockquote>WORTHIE SIR JOHN, HOPE, THAT IS YE BESTE COMFORT OF YE AFFLICTED, CANNOT MUCH, I FEAR ME, HELP YOU NOW. THAT I WOULD SAY TO YOU, IS THIS ONLY: IF EVER I MAY BE ABLE TO REQUITE THAT I DO OWE YOU, STAND NOT UPON ASKING ME. TIS NOT MUCH THAT I CAN DO; BUT WHAT I CAN DO, BEE YE VERY SURE I WILL. I KNOW THAT, IF DETHE COMES, IF ORDINARY MEN FEAR IT, IT FRIGHTS NOT YOU, ACCOUNTING IT FOR A HIGH HONOUR, TO HAVE SUCH A REWARDE OF YOUR LOYALTY. PRAY YET YOU MAY BE SPARED THIS SOE BITTER, CUP. I FEAR NOT THAT YOU WILL GRUDGE ANY SUFFERINGS; ONLY IF BIE SUBMISSIONS YOU CAN TURN THEM AWAY, TIS THE PART OF A WISE MAN. TELL ME, AN IF YOU CAN, TO DO FOR YOU ANYTHINGE THAT YOU WOLDE HAVE DONE. THE GENERAL GOES BACK ON WEDNESDAY. RESTINGE YOUR SERVANT TO COMMAND.</blockquote>The third letter after each punctuation reveals "Panel at East end of Chapel slides".
More complex algorithms can be formed by mixing substitution and transposition in a [[product cipher]]; modern [[block cipher]]s such as [[Data Encryption Standard|DES]] iterate through several stages of substitution and transposition.


A dot or pinprick null cipher is a common classical encryption method in which dot or pinprick is placed above or below certain letters in a piece of writing.<ref name=":13">{{Cite book |last=Janeczko |first=Paul B. |title=Top Secret: a Handbook of Codes, Ciphers, and Secret Writing |publisher=Candlewick Press |year=2004 |isbn=9780763629724}}</ref> An early reference to this was when [[Aeneas Tacticus]] wrote about it in his book ''On the Defense of Fortifications.''<ref name=":3">{{Cite web |title=Aeneas Tacticus • Siege Defense, XXI‑XXXI |url=https://penelope.uchicago.edu/Thayer/E/Roman/Texts/Aeneas_Tacticus/E*.html |access-date=2022-05-28 |website=penelope.uchicago.edu}}</ref>


==Decipherment of Classical Ciphers==
==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]], that is by simply trying out all keys. [[Substitution ciphers]] can have a large key space, but are often susceptible to a [[frequency analysis]], because for example frequent letters in the plaintext language correspond to frequent letters in the ciphertexts. Polyalphabetic ciphers such as the [[Vigenère cipher]] 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.
While classical ciphers are easy to create, they are also easy to decipher, which is probably one reason for their disuse. With substitution ciphers, especially ones where the letters are just shifted down, it is just a simple matter of figuring out the shift in order to decode the message. With keywords, it can be a little difficult to figure out the keyword used, but once that is found, decipherment is a breeze. The Vigenere square is a harder substitution cipher to crack, but if cryptanalysts use [[frequency analysis]], that can aid them in breaking the cipher. Frequency analysis is just as its name implies--the cryptanalyst looks to see how often letters or combinations of letters appear in the ciphertext and compare that to their knowledge of the frequency of letters in the English alphabet, for example, "e" is the most common letter in the English alphabet, so if there is a large number of "m" in the ciphertext, it probably stands for "e". Transposition ciphers usually can be deciphered using frequency analysis but there are other methods that make them easy to crack. One way is to arrange the letters of the ciphertext into a square or rectangle based on the number or letters in the ciphertext and seeing if there is a trend in the square. If a trend is not seen immediately, it helps to take the square row by row or column by column and looking for a trend and then rearranging the square in a different way. Since transposition ciphers just involve rearranging letters, all of the letters need are in the ciphertext; it is just a matter of making sense of them. Decipherment takes time, patience, and trial and error, but it can be done.


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]]s and [[chosen-plaintext attack]]s as well as [[chosen-ciphertext attack]]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.
==The Future of Ciphers==
Since the use of classical ciphers, encipherment and encoding has come a long way. One innovate new method of encipherment is [[public key cryptography]], which does not require an exchange of the key used to encode the message. It uses an asymmetric cipher, where the key for encoding the message is different than the key needed to decode the message. One such example of this is [[RSA]], which uses a formula to calculate the key. Symmetric ciphers are still in use today; they just involve different methods that in the past. One such example is the block cipher, which involves bits, which are binary digits, and a mathematical formula to encode the text. Encryption today has become more complicated and mathematical, which, as a result, makes messages harder to decipher. Now, instead of being done by hand, most ciphers are computerized, which makes them more efficient and easier to create, but harder to crack. Ciphers have come far since Caeser shifts and Vigenere squares. As times evolve, so do ciphers.


Some techniques from classical ciphers can be used to strengthen modern ciphers. For example, the [[Rijndael MixColumns|MixColumns]] step in [[Advanced Encryption Standard|AES]] is a [[Hill cipher]].<ref>{{cite web |url=https://www.angelfire.com/biz7/atleast/mix_columns.pdf |title=Understanding AES Mix-Columns Transformation Calculation |last=Xintong |first=Kit Choy |access-date=2016-10-26 }}</ref>


==See also==
==See also==
Line 110: Line 121:


==References==
==References==
{{Reflist}}
* [http://users.telenet.be/d.rijmenants/en/handciphers.htm Hand Ciphers] Pencil-and-paper ciphers on Ciphermachines & Cryptology
* [https://www.ciphermachinesandcryptology.com/en/handciphers.htm Hand Ciphers] Pencil-and-paper ciphers on Ciphermachines & Cryptology
* [http://starbase.trincoll.edu/~crypto/ Trinity College Department of Computer Science: Historical Cryptography] Information about many different types of encryption algorithms including substitution and transposition ciphers
* [http://www.cs.trincoll.edu/~crypto/historical/ Trinity College Department of Computer Science: Historical Cryptography] Information 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.
*[[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.
*D'Agapeyeff, Alexander. Codes and Ciphers. Oxford UP, 1939.
*[[William Friedman]]. [https://www.nsa.gov/Portals/75/documents/news-features/declassified-documents/friedman-documents/publications/FOLDER_267/41784809082383.pdf 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.
*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.
*Wrixon, Fred B. Codes, Ciphers, and Secret Languages. New York: Bonanza Books, 1989.


{{Crypto navbox | classical}}
{{Cryptography navbox | classical}}


{{DEFAULTSORT:Classical Cipher}}
[[Category:Classical ciphers| ]]
[[Category:Classical ciphers| ]]

{{crypto-stub}}

[[da:Kryptografisk algoritme]]
[[fr:Chiffre (cryptologie)]]
[[ko:고전 암호]]
[[nl:Handcijfer]]
[[pt:Cifra]]
[[vi:Mật mã học cổ điển]]

Latest revision as of 18:09, 11 December 2024

In cryptography, a classical cipher is a type of cipher 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 relies on new algorithms and computers developed since the 1970s.

Types of classical ciphers

[edit]

Classical ciphers are often divided into transposition ciphers and substitution ciphers, but there are also concealment ciphers.

Substitution ciphers

[edit]

In a substitution cipher, letters, or groups of letters, are systematically replaced throughout the message for other letters, groups of letters, or symbols.

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:

normal alphabet 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
cipher alphabet c i p h e r a b d f g j k l m n o q s t u v w x y z

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 LEMON 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 LEMON and the message to encode is ATTACKATDAWN, then the encoding is:

Plaintext ATTACKATDAWN
Key LEMONLEMONLE
Ciphertext LXFOPVEFRNHR

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[which?] 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 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, 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

[edit]

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 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. 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 algorithms can be formed by mixing substitution and transposition in a product cipher; modern block ciphers such as DES iterate through several stages of substitution and transposition.

Concealment ciphers

[edit]

Put simply, a concealment, or null, cipher is any cipher which involves a number of nulls, or decoy letters. A null cipher could be plaintext words with nulls placed in designated areas or even a plaintext message broken up in different positions with a null at the end of each word.[1][2] However, a message with only a couple nulls (for example, one at the beginning and one at the end) is not a null cipher.

For example, during England's Civil War Royalist Sir John Trevanian was aided in his escape from a Puritan castle in Colchester by this message:[3]

WORTHIE SIR JOHN, HOPE, THAT IS YE BESTE COMFORT OF YE AFFLICTED, CANNOT MUCH, I FEAR ME, HELP YOU NOW. THAT I WOULD SAY TO YOU, IS THIS ONLY: IF EVER I MAY BE ABLE TO REQUITE THAT I DO OWE YOU, STAND NOT UPON ASKING ME. TIS NOT MUCH THAT I CAN DO; BUT WHAT I CAN DO, BEE YE VERY SURE I WILL. I KNOW THAT, IF DETHE COMES, IF ORDINARY MEN FEAR IT, IT FRIGHTS NOT YOU, ACCOUNTING IT FOR A HIGH HONOUR, TO HAVE SUCH A REWARDE OF YOUR LOYALTY. PRAY YET YOU MAY BE SPARED THIS SOE BITTER, CUP. I FEAR NOT THAT YOU WILL GRUDGE ANY SUFFERINGS; ONLY IF BIE SUBMISSIONS YOU CAN TURN THEM AWAY, TIS THE PART OF A WISE MAN. TELL ME, AN IF YOU CAN, TO DO FOR YOU ANYTHINGE THAT YOU WOLDE HAVE DONE. THE GENERAL GOES BACK ON WEDNESDAY. RESTINGE YOUR SERVANT TO COMMAND.

The third letter after each punctuation reveals "Panel at East end of Chapel slides".

A dot or pinprick null cipher is a common classical encryption method in which dot or pinprick is placed above or below certain letters in a piece of writing.[4] An early reference to this was when Aeneas Tacticus wrote about it in his book On the Defense of Fortifications.[5]

Cryptanalysis of classical ciphers

[edit]

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, that is by simply trying out all keys. Substitution ciphers can have a large key space, but are often susceptible to a frequency analysis, because for example frequent letters in the plaintext language correspond to frequent letters in the ciphertexts. Polyalphabetic ciphers such as the Vigenère cipher 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 attacks and chosen-plaintext attacks as well as chosen-ciphertext attacks. 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 is a Hill cipher.[6]

See also

[edit]

References

[edit]
  1. ^ Travis, Falcon; Hindley, Judy; Thomson, Ruth; Amery, Heather; Rawson, Christopher; Harper, Anita (1978). The Spy's Guidebook. Usborne Pocketbooks.
  2. ^ Moore, Gareth (2019). Explorer Academy Codebreaking Activity Adventure. National Geographic Books. ISBN 9781426333071.
  3. ^ Janeczko, Paul B. (2004). Top Secret: a Handbook of Codes, Ciphers, and Secret Writing. Candlewick Press. ISBN 9780763629724.
  4. ^ Janeczko, Paul B. (2004). Top Secret: a Handbook of Codes, Ciphers, and Secret Writing. Candlewick Press. ISBN 9780763629724.
  5. ^ "Aeneas Tacticus • Siege Defense, XXI‑XXXI". penelope.uchicago.edu. Retrieved 2022-05-28.
  6. ^ Xintong, Kit Choy. "Understanding AES Mix-Columns Transformation Calculation" (PDF). Retrieved 2016-10-26.