Caesar's encryption

Source: Internet
Author: User

Caesar's encryption

| Tags Tag: encryption, published on


I sent an opening Poem: I used Acacia as a jade Cup, and the true feelings were accompanied by wine. when love was drunk, you flew like a butterfly dream.

You can send this poem to your girlfriend. If she is smart, she will surely see that it is a Tibetan poem, so that she can understand your mind. In fact, Tibetan poetry is an encryption technique that hides the secret by means of coordinate transformation. Although this example is very simple, it reflects the essence of encryption-the transformation coordinate system.

Encryption was first used in the ancient war. At that time, it was carried by soldiers to transmit information, but it was always inevitable that the information would be captured by the enemy, this is a matter of life and death for combat troops. Legend has it that Caesar had a way to encrypt the emperor at that time, so he made a corresponding table before writing the command, with the clear code: a B c d e f .... W x y z, password: d e f g h I .... Z a B C. If he wants to write a baby, it is represented by edeb.

When the General received the edeb password, he pushed three letters forward and obtained the plaintext. The shift Number of the corresponding table is 3. Of course, other data can also be used. before the battle, Caesar sets the shift number and notifies the generals that the confidential communication can be performed during the war. In fact, this encryption method is to shift the coordinate system three cells horizontally. However, this simple encryption method can also be easily guessed by the enemy. The enemy pushed 25 times from 1 to 25 to get 25 new codes. There must be a real information content encoding, it is very easy to distinguish this group of codes, because the other 24 groups are meaningless combinations of letters. Only these groups are meaningful sentences. You can find a literate person.

Since this encryption method is not secure, what should Caesar do? A wise man gave him an idea that the corresponding table was not written in alphabetical order, and he made a mess. For example, if A is paired with Q and B is paired with F, you only need to ensure that there are no duplicates for each of the 26 clear passwords. Before each expedition, Caesar would create a very messy explicit password table and send it to the general. This is a good trick. Even if the enemy intercepts the ciphertext, it is difficult to understand the table that corresponds to the unknown password. This is actually a transformation of the coordinate system, this method is called a single table system ".

This sort of out-of-order encryption is much safer than sequential encryption, but it still has a major vulnerability. Take English as an example. In a document, each letter appears differently. For example, e appears the most frequently, and you can even create a frequency table, if R appears the most frequently in a ciphertext, will this R be e? This conjecture is reasonable. Even if it does not represent e, it represents letters that appear frequently in plain text. Try it with this idea. The password is unlocked when the cake is sold.

Now it's another turn for the encryption party to tangle. They thought that the cracking party is making a fuss about the frequency of letters in the text. If we can eliminate the difference in frequency, will they not be able to help? Although the truth is good, how can we eliminate the difference in frequency? After all, the frequency of letters in the text is different, which cannot be changed.

However, one day the encryptor finally finds the key to solving the problem. The key is "multiple tables". Each plaintext corresponds to multiple ciphertext. In this example, a corresponds to XGV, the selection of the three ciphertext depends on the location of the plaintext. A selects X for the first, G for the second, and V for the third. You can group the entire section according to three segments and then encrypt it. This example is three-dimensional and has more dimensions, which is more difficult to crack. This multi-table system is very effective, but there are still statistical rules to follow, but the ciphertext is not enough to find the rule.

This kind of multi-Table System with relatively fixed matching rules still brings a breakthrough to the cracking. With the development of technology, people began to try to improve the multi-Table System Using machinery, and increased the difficulty of cracking by introducing more changes. During the Second World War, the German army had an encrypted conversion to a turbine. The four wheels were responsible for scrambling the input plaintext into a password. The corresponding law was dynamic, which greatly increased the difficulty of deciphering. There was Hans, a German officer responsible for managing the encrypted turbine. schmidt, for money to hook up with allied intelligence personnel, provided the technical information of the machine and received a reward equivalent to 10 million francs now. Later, he was afraid to quit, but no longer, he has been connected with the allied intelligence staff for 34 times. With the help of these top Polish math family, James and Others finally completely cracked the engine.

Let's go back to Caesar. Of course, he knows that his encryption is not very safe. The soldiers who send Intelligence will not be able to submit the confidential information after being arrested, what if the attacker is prevented from disclosing intelligence after being captured? Another trick was made for him: shave the hair of a group of soldiers, and use a soldering iron to pad different marks on the top of his mind, and record the scars on which soldier, the burned soldiers were confused and did not understand why. Before the war, Caesar called the generals and asked them to keep in mind a set of mappings. plum blossom scar represented "immediately sending assistance to me", and triangle scar represented "sticking to the position.

In the battle, Caesar was besieged, and the situation was very difficult. He brought a record book and ordered several people who were branded with plum blossom scars to report to the generals along different routes, "Don't we need to send a message or provide intelligence?" These people are puzzled. "No, you have submitted a report to the General Office, even if the task has been completed," Caesar said. When these people set off, some people successfully found the general report, the general did not say anything, and immediately shave his hair to check his scar. Some people are also captured and unable to ask for intelligence even when they are tortured, because they do not know the intelligence. It has been a long time before shaving and burning scars. The new hair of the soldiers has covered the scars, and the enemy can easily detect this flaw.

 

Even if the encrypted ciphertext is placed in front of the enemy, they do not know the actual content, but they will be cracked if they know that this is the ciphertext that hides important intelligence, this is always not a good thing. If the ciphertext is in front of them, they are unaware of it. Of course it is better. This is implicit writing. Caesar branded a scar on the head of the passer's head as the originator of implicit writing. These scenarios are often introduced in espionage novels. The lurks use starch water to write intelligence, dry it, and then write a letter on it as a cover. The recipient does not pay attention to the content of the letter, instead, the starch water information will be displayed in blue with a layer of iodine on the letter. Such a letter, even if the special authority is asked to open the review, as long as you do not know the portal, then nothing can be found.

Many encryption techniques seem clever, but with the birth of computers, all these methods called classical cryptography are ineffective because they cannot resist the poor analysis of computers. The idea of modern cryptography is very different from that of classical cryptography. It first finds a mathematical problem and then sums up the encryption method to this difficulty, if he cannot solve this mathematical problem, he cannot crack his password. Implicit writing is also gradually separated from physical and chemical reactions. Instead, it is combined with encryption to hide secrets in data. Modern cryptography is more fascinating and will come soon.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.