Have you ever thought about a question:
What are the factors that determine whether a password can be cracked?
Compare classical passwords with modern passwords, and you will find the answer.
In the process of encryption and decryption in classical cryptography, the smallest arithmetic unit is a single character or symbol, so the core of classical cryptography is shift method and replacement method.
In modern cryptography, the research object is described by numbers, and then the numbers are operated on. It not only breaks through the limitation of letters as the smallest unit of change, but also can be operated with higher mathematical tools, so it is more and more difficult to decipher.
Therefore, the mathematical tools used in encryption determine whether the password can be cracked.
The second generation displacement method and replacement method are very safe and easy to use, but in the16th century, the situation was reversed. Because of the appearance of probability theory, both encryption methods can be cracked.
Since then, in the anti-Japanese war between encryption and decryption, because of the application of mathematics, the decryption side has temporarily occupied the advantage.
Two classic cases of cracking the second generation encryption method.
One happened to Mary I, Queen of Scots in16th century, and the other happened to Louis XIV, King of France from the middle and late17th century to the early18th century.
Queen Mary I, she is the strongest woman I have ever heard of. In the module of Cryptography Biography, I will tell her story in detail. In this lesson, we will still focus on passwords.
At the age of 27, Mary I was imprisoned by her aunt, Queen Elizabeth I 18 years. At the age of 44, she conspired with the rebels to kill her aunt in prison, and once the murder was successful, she could sit on the throne herself. At that time, letters were sent to prison through special channels, and finally the maid hid them in the cork when delivering red wine.
Mary I is very clever. This letter containing the assassination plan is not ordinary, but encrypted. Even if it falls into the hands of Elizabeth I, no one can understand it.
The encryption method used is substitution method. All English letters have been changed into runes and some common words have been changed into symbols. Please refer to the following figure for the specific corresponding mode.
Later, Mary communicated with the rebels through this special channel. After a few months, she mastered it and wrote letters directly in ciphertext, without looking up the cross-reference table one by one.
Unfortunately, there was a double agent in this special news channel, and he reported the situation to Elizabeth. The incumbent queen is worried that she can't catch the handle, and now she finally has a chance to execute Mary in a justified way.
But it is urgent now, and it is necessary to catch enough conclusive evidence. It is best to get rid of all the participants behind the whole conspiracy, so Elizabeth did not startle.
From then on, every letter between Mary and the outside world was sent to the password school by a double agent, and it took 1 hour to copy it, and then it was sealed and sent out of the palace as if it had never been intercepted. The cipher school cracked the idea with the copied ciphertext, and finally they succeeded.
The cracking method is called "frequency analysis". This method actually appeared in Arabia in the 9th century and was not noticed by European mathematicians until16th century.
Let me talk about its principle first. Quite simply, the frequency of letters in English is different. For example, the letter E has the highest frequency, accounting for12.7%; Followed by t, 9.1%; Then a, o, I, n and so on. , and the least is Z, accounting for only 0. 1%.
Statistics of letter frequency in English
Besides English, other languages also have detailed statistics.
Mary exchanged a lot of ciphertext with the outside world, and the total number of characters was enough. All collected together, which symbol has the highest proportion, that character is probably the letter E.
Of course, the frequency of some letters is very close, such as H, R and S, which are 6.09%, 5.98% and 6.32% respectively. But as long as you pay a little attention to the relationship between the letters before and after, you can tell them apart. For example, it is almost impossible for T to appear next to the letters B, D, G, J, K, M and Q, and H and E are often linked together, and the frequency of ee appearing together is much higher than aa.
The essence of frequency analysis is to greatly reduce the possibility of letter arrangement and combination.
In the past, we assumed that each rune can be any one of 26 letters, and there are as many alternative symbols as there are. However, the frequency analysis method greatly reduces the possibility of many symbols, some to only 1 possibility, and some to only 2-3 possibilities.
In this way, even if the frequency of various symbols is not completely determined in the first step, the real letters corresponding to the substitute symbols will be determined as long as they are filtered according to the spelling rules.
During the trial, although Mary never admitted the rebellion, witnesses and cryptographers showed the ciphertext and the original text to the public and explained the decryption rules. Finally, Mary I was beheaded.
This is the most famous encryption and decryption application in the battle for imperial power, and the decryption method has won a great victory.
After the decryption method is published, the replacement method is no longer effective. At least for the European royal family, it can be broken if it is determined to crack it.
The encryptor certainly doesn't want to lose. What should we do?
Soon another method called "homophone substitution" appeared.
For example, the letter A can be replaced by three numbers: 1 1, 23,41,all of which are translated into A. The more commonly used letters, such as E, the more symbols are used to replace them. The ultimate goal of this idea is to make each number appear at roughly the same frequency. Without frequency characteristics, passwords are not easy to crack.
Homophonic substitution method
As can be seen from the table of homophone substitution methods above, the most commonly used e replaces the most characters.
However, the decryption method of this method also appeared immediately, that is, guessing by alphabetical order.
The most typical example is that the most likely thing to appear after Q is U, and Q is an unusual letter, so there is a great possibility of guessing. Other letters are harder to guess, but if you take the time, you can always crack them.
The most famous homophone substitution cipher in history is the "big cipher" of French King Louis XIII and XIV. After more than 40 years of use, with the fall of Napoleon, it was suddenly lost. It was not completely cracked until 1890, and the cracking method started with the spelling rules of words.
This encryption method uses 587 numbers to represent different pronunciations. There are many traps, such as some numbers only represent letters, not pronunciation; Many numbers are noise characters and have no meaning; There are also some numbers that are neither pronounced nor characters, but represent the deletion of the previous character.
After The Big Code was cracked, many secrets of Louis XIV's court 200 years ago came to light.
One of them is the new discovery of the legendary "Iron Mask Man" in French court. The story of the iron mask man is in Europe, just as we care about how Kangxi ascended the throne in his later years. Numerous novels are based on this, and Dumas and Voltaire have written them.
The story is about a prisoner who has been detained since 1669. Moreover, the warden in charge of holding him, no matter how to transfer his job, always takes the prisoner with him, and one pass is 34 years. Supposedly, such a heavy crime, let him sit in prison. No, he was given delicious food, dressed in exquisite clothes, played the piano, had regular visits from doctors, and even was escorted by a high-class carriage when he was transferred to prison. Everything, but no freedom.
A jailer has seen this man walk away from other prisoners, wearing an iron mask all the time, and no one knows what he looks like.
Who is the iron mask man? There are n kinds of speculations. Before the big code was unlocked, some people speculated that it belonged to Louis XIV's half-brother, some people speculated that it belonged to Louis XIV's biological father, and some people speculated that it belonged to the illegitimate son of the British king, the French finance minister and the Italian diplomat. It is controversial because there are loopholes in every sentence.
After the big password was cracked, there was another explanation, that is, General Bloom under Louis XIV at that time. After the declassification, the Minister of War wrote a letter to Louis XIV, mentioning that General de Blom should be arrested immediately, put in prison at night, and allowed to wear masks on battlements during the day.
Although this statement was later found to be flawed, the documents and letters published because of the cracking of the big password made the history of the French court more well documented.
Have you ever wondered why the substitution method was cracked? Is it the court genius who is good at guessing games, or the courage and wit of a double agent?
Of course, there are all these factors. But the most important observation angle is that the mathematics of that era advanced by leaps and bounds, and finally the new concept of "probability" was born.
People today certainly don't find it difficult to understand the expression "the probability of a certain letter appearing in an article". However, people more than 400 years ago also knew that the probability of the queen's head facing up when throwing coins is half, which is a superficial probability knowledge. But most of them will not use this perspective to measure the objects of interest.
In fact, until now, most people rarely have the opportunity to think from this angle. The only thing that concerns their immediate interests is to buy lottery tickets.
The birth of probability theory in those years was because cardano, the mathematician who first studied probability theory, was a gambler, the discoverer of the general solution of cubic equation and the first person to use the concept of complex number. He wrote the world's first book about probability and gamblers' games. Five years after this book was written, Queen Mary was imprisoned by her aunt.
There are two peaks in the development of mathematics. The first time was from 500 BC to 300 BC, and it has been going downhill since then, and it fell to the bottom around 500 AD. The other peak was after 1000 years, which was about the time of Queen Mary, and exceeded the peak level of ancient Greece. This peak has not yet reached the highest value.
With the improvement of mathematics, not only cryptography, but also all applied disciplines that use mathematics will change. Before 1500, many things that had just been sidelined gradually became independent industries or separate branches of disciplines.
Chuangwen link:
? Take a sword and break the walls of A Ring of Endless Light.
? Why do passwords start with slang encryption?