Cryptography can be roughly divided into two types, namely translocation and substitution, but there are more complicated ways to combine them. When translocated, the letters remain unchanged and their positions change; In substitution, the letters change and the position remains the same. The first document to use the replacement password for military purposes was Caesar's Gaul. Caesar described how he sent the secret news to Cicero, who was on the verge of surrender. Among them, the Roman alphabet was replaced by the Greek alphabet, which made the enemy unable to understand the information at all.
In the Biography of Caesar written in the 2nd century A.D., Sautonie described in detail an alternative password used by Caesar. Caesar just replaced each letter in the message with the third letter after the letter in the alphabet. This password replacement is often called Caesar shift password, or simply Caesar password.
Although Sotonius only mentioned the Caesar shift of three positions, it is obvious that we can use the shift of 1 to 25 positions. So in order to make the password more secure, a single letter replacement password appeared.
For example:
Clear the table 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
Password table qWERTY Y UIOP A S D F G H J K L Z X C V B N M
Clear text for recovery
ciphertext
As long as the order of the 26 letters of the cipher table is rearranged and the cipher table is allowed to be arbitrarily rearranged, the number of keys will increase to more than 400 billion, so we have more than 4× 1027 cipher tables. It becomes difficult to crack.
How to crack the one-letter replacement password including Caesar's password? Methods: Word frequency analysis.
Although we don't know who discovered that we can use the difference of letter frequency to crack the password. However, Al Kindy, a scientist in the 9th century, first described this technology in Manuscripts for Decrypting Encrypted Information. "If we know the language used in an encrypted message, the way to decipher this encrypted message is to find another article written in the same language, about one page long, and then we calculate the frequency of each letter. We mark the letters with the highest frequency as 1, the letters with the second frequency as 2, the letters with the third frequency as 3, and so on until all the letters in the sample articles are counted. Then we observe the ciphertext that needs to be deciphered, classify all the letters, find out the letters with the highest frequency, and replace them with the letters with the ones with the highest frequency in the sample articles. The second high-frequency letter is replaced by No.2 in the sample, and the third letter is replaced by No.3 until all the letters in the cipher text are replaced by letters in the sample. "
Take English as an example. First, we use one or several common articles with a certain length to establish a frequency table of each letter in the alphabet.
By analyzing the letter frequency in the secret text, the comparison can be cracked. Although cryptographers later made some improvements to the previous encryption method for frequency analysis technology, such as introducing empty symbols to break the normal frequency of letters. However, a small improvement can no longer cover up the huge defects of the single-letter substitution method. By the16th century, the best cryptographers had been able to decipher most of the encrypted information at that time.
Limitations: Short articles may seriously deviate from the standard frequency, and articles with less than 100 letters will be difficult to decrypt. Moreover, not all articles apply the standard frequency: 1969, the French writer Georges Perek wrote a 200-page novel Escape, which didn't contain a word with the letter E. What's more amazing is that the English novelist and caster Gilbert Adail successfully translated Escape into English without the letter E. Adail named this translation vacuum. If this book is encrypted with a single cipher table, it will be very difficult to crack it with frequency analysis.
Blaise de Genard established a new cryptosystem at the end of 16. Its password is no longer encrypted with one password table, but with 26 different password tables. The biggest advantage of this cipher table is that it can suppress frequency analysis, thus providing better security.