Current location - Music Encyclopedia - Chinese History - What codes are there in history?
What codes are there in history?
Every country has its own special password, ranging from one set to several sets of (military) passwords. During World War II, the secret code of the Japanese army was different due to different systems, among which the secret code of the army was the most difficult to decipher. During the whole period of War of Resistance against Japanese Aggression, the passwords of the Japanese army and navy were never cracked. The air force code is relatively simple and easy to decipher. There are English letters, numbers and Japanese, of which English is the most. But no matter which form, there is a common feature, that is, there is no gap between words, and they are closely connected, unlike English telegrams, which are a group of every word, and Chinese telegrams are a group of every four numbers.

In addition, various industries also have common international codes. (navigation, aviation, rescue) and so on.

Morse code

Morse code was invented by American Morse in 1844.

History of Morse Code

The earliest Morse code was dots and dashes representing numbers. Numbers correspond to words. You need to look up a code table to know the numbers corresponding to each word. You can click, stroke and pause with the electric keys.

Although Morse invented the telegraph, he lacked relevant professional knowledge. He signed an agreement with Alfred Weil to help him make more practical equipment. Weil conceived a scheme in which each character and punctuation can be sent independently of each other through dots, dashes and pauses in the middle. They agreed to include this scheme of marking different symbols in Morse's patent. This is now known as American Morse code, which was used to transmit the world's first telegram.

This code can be transmitted by a smooth-pitched, intermittent radio signal, usually called continuous wave, abbreviated as CW. It can be an electronic pulse in a telegraph line or a mechanical or visual signal (such as a flash).

Generally speaking, any coding method that can express written words with variable-length signals can be called Morse code. But now this term is only used to refer to two kinds of Morse code representing English letters and symbols: American Morse code is used in cable telegraph communication system; The international Morse code still in use today only uses dots and dashes (no pause).

The telegraph company charges according to the length of the letter to be sent. The commercial code carefully designed a set of five characters to send as a word. For example: byoxo ("Do you want to climb out?" ; LIOUY ("Why don't you answer my question?" ,; AYYLU ("There is no clear code, repeat it more clearly." . These five-character abbreviations can be sent separately in Morse code. On the network side, we will also talk about some of the most commonly used Morse business codes. Q- abbreviations and Z- abbreviations are still used in amateur radios: they were originally used to exchange information between operators, such as communication quality, frequency changes and telegraph numbers.

1838 65438+1On October 8th, Alfred Weil showed a telegraph code using dots and dashes, which is the predecessor of Morse code.

Morse code, as an information coding standard, has a very long lifetime that other coding schemes can't surpass. Before 1999, Morse code has been used as an international standard for maritime communication. 1997, when the French navy stopped using Morse code, the last message was: "Attention, everyone, this is the last cry before we are silent forever"!

Morse code consists of dots (. ) and dash (-) symbols are in accordance with the following principles:

1, a point is a basic signal unit, and the time length of each stroke is equivalent to the time length of three points.

2. In a letter or number, the interval between points and strokes should be the length of two points.

The interval between letters (numbers) and letters (numbers) is 7 o'clock.

Answer. -

B - ...

c。 -.

D - ..

e。

F..-.

G - ..

H ....

I ..

j。 -

Kay. -

Me. - ..

meta-position

No.

Oh-

p。 - .

Ask. -

r。 -.

S ...

T -

U..-

V...-

w。 -

X -..-

You -

Z - ..

1 .-

2..-

3...-

Four ...

five .....

6 - ....

7 - ...

8 - ..

9 - .

0 -

..- ..

/ -..-.

() -.- .-

- -....-

. . -.-.-

Since the advent of radio and Morse code, military communication has entered a brand-new era. However, radio communication is a completely open system. While receiving the message, the other party can also "see at a glance". As a result, the code that accompanied the war for a long time in human history was immediately combined with the radio, and the radio code came into being. Until the end of World War I, all radio codes were coded by hand. There is no doubt that manual coding is very inefficient. At the same time, due to the limitation of manual encoding and decoding efficiency, many complex encryption methods with strong confidentiality cannot be applied in practice, while simple encryption methods are easy to be deciphered. Therefore, a safe, reliable, simple and effective method is urgently needed in the field of military communication.

19 18 German inventors Arthur Shelbius and Richard Ritter founded a new technology application company. Shelbius has studied electrical applications. He wants to replace manual coding and encryption methods with modern electrical technology and invent a machine that can automatically code.

Shelbius named the electronic coding machine he invented "Ingmar" (meaning charade). At first glance, it is a box, which contains complex and exquisite parts, a bit like a typewriter. It can be simply divided into three parts: keyboard, rotor and display.

There are 26 keys in the keyboard, and the keyboard arrangement is basically the same as that of the computer keyboard widely used now, just to make the communication as short as possible and not easy to decipher. All spaces, numbers and punctuation marks are cancelled, and only alphabetic keys are used. Above the keyboard is the display screen, not the screen display in the present sense, just 26 small light bulbs with the same letters. When a key on the keyboard is pressed, the small light bulb corresponding to the encrypted secret letter of this letter lights up, which is such an almost primitive "display". Above the display are three rotors with a diameter of 6 cm, the main components of which are hidden under the panel. The rotors are the core and key components of the Enigma cipher machine. If the function of the rotor is only to change one letter into another, it is called "simple password replacement" in cryptography. In the 9th century, Arabic cryptographers were able to skillfully use the method of counting letter frequency to decode simple replacement passwords. Conan Doyle described the process of Sherlock Holmes using frequency statistics to decode the dancing humanoid password (that is, simple replacement password) in his famous Sherlock Holmes story Dancing Little Man. -Because it can rotate, it is called "rotor"! This is the key! When a letter key on the keyboard is pressed, the corresponding encrypted letter is displayed on the display screen through the flashing light bulb, and the rotor automatically rotates the position of one letter. For example, when you type A for the first time, the light bulb B lights up, and the rotor turns one grid, and the password corresponding to each letter changes. Enter a for the second time, and its corresponding letter may become c; Similarly, when you knock A for the third time, the light bulb D may be on again. -this is the key point of the mystery that is difficult to decipher. This is not a simple replacement password. The same letter can be replaced by different letters in different positions in plaintext, and the same letter in different positions in ciphertext can represent different letters in plaintext, so the letter frequency analysis method here is useless. This encryption method is called "double substitution cipher" in cryptography.

However, if 26 letters are input continuously, the rotor will make a full turn and return to the original direction, and the coding will be repeated. In the process of encryption, repetition is the biggest defect, because it can let the person who deciphers the password find the law from it. So Enigma adds another rotor. When the first rotor makes a full turn, the gear on it drives the second rotor to rotate its direction by one letter. Suppose that the first rotor turns a whole circle, press the A key, and the D light bulb on the display screen will light up; When the A key is released, the gear on the first rotor also drives the second rotor to rotate by one grid, so when typing A for the second time, the encrypted letter may be E; When you release the A key again, only the first rotor rotates, so when you type A for the third time, the corresponding letter may be F.

Therefore, the original encoding will be repeated only after 26x26=676 letters. In fact, "Enigma" has three rotors ("Enigma" used by the German navy in the late World War II even has four rotors! ), then the probability of repetition will reach 26x26x26 = 17576 letters. On this basis, Shelbius skillfully added a reflector at one end of the three rotors, and connected the same letters in the keyboard with wires and displayed them. A reflector is like a rotor, connecting one letter to another, but it doesn't rotate. At first glance, such a fixed reflector seems useless. It doesn't increase the number of codes that can be used, but if you associate it with decoding, you will see the originality of this design. When a key is pressed, the signal is not directly transmitted from the keyboard to the display, but first passes through a line connected by three rotors, then returns to the three rotors through a reflector, and then reaches the display through another line. For example, if you press the A key in the above picture, the D light bulb will light up. If you press the D key instead of the A key at this time, then when you press the A key above, the signal just passes in the opposite direction and finally reaches the A light bulb. In other words, under this design, although the reflector does not increase the non-repetitive direction like the rotor, it can make the decoding process completely reproduce the encoding process.

When using "Enigma" communication, the sender should first adjust the directions of the three rotors (and the initial direction of this rotor is the key, which must be agreed by the sender and the receiver in advance), then input plaintext in turn, write down the flashing letters of the light bulb in turn on the display, and finally send the recorded flashing letters in turn by ordinary telegram. After receiving the message, as long as the receiver also uses an Enigma, according to the original agreement, adjust the direction of the rotor to the same initial direction as the sender, and then type in the received ciphertext in turn, the letters that automatically flash on the display screen will be plaintext. The process of encryption and decryption is exactly the same, which is the function of reflector. At the same time, a side effect of the reflector is that a letter is never encrypted to itself, because a letter in the reflector is always connected to another different letter.

The key of Enigma encryption lies in the initial direction of the rotor. Of course, if the enemy receives the complete ciphertext, he can still find the key by constantly trying to turn the rotor direction, especially if the decoder uses many machines to do this work at the same time, then the time required will be greatly shortened. To deal with this "brute force decoding method" (that is, trying all the possibilities one by one), we can deal with it by increasing the number of rotors, because the number of experiments can be multiplied by 26 times as long as one rotor is added! However, adding rotors will increase the volume and cost of the machine, and the cipher machine needs to be portable, not a behemoth with dozens or even hundreds of rotors. Then the method is also very simple. The three rotors of the Enigma cipher machine can be disassembled and interchanged, which increases the possibility of initial direction by six times. Assuming that the three rotors are numbered 1, 2, 3 respectively, they can be placed in six different positions:123-132-213-231-312-32. Now, of course, ciphertext is sent and received.

In addition to the rotor direction and arrangement position, Enigma also has a security checkpoint, and there is a connecting plate between the keyboard and the first rotor. Through this connecting plate, one letter can be connected with another letter by connecting wires, so that the signal of this letter will be converted into the signal of another letter before entering the rotor. There can be at most six such connections (even ten in the later riddle), so that the signals of six pairs of letters can be exchanged in pairs, while the other unconnected letters remain unchanged. -Of course, the connection status on the connection board is also pre-agreed by the sender and the receiver.

In this way, the initial direction of the rotors, the mutual position between the rotors and the connection state of the connecting plate constitute three unbreakable security lines of the mystery, in which the connecting plate is a simple replacement cipher system, and the rotating rotors are the crowning touch. Although the number is small, the whole system becomes a multiple replacement system. Although the connecting plate is simply replaced, under the composite action of the rotor, the number of possibilities can be greatly increased and the confidentiality can be further strengthened. Let's figure out how many possibilities we need to try to recover plaintext through "brute force decoding" after such processing:

The different directions of the three rotors make up 26 x 26 x 26 = 17576 possibilities;

There are six possibilities for different relative positions between the three rotors;

The possibility of 6 pairs of letters exchanged in pairs on the connecting board is extremely great, with100391791500 kinds;

So there is17576x100391791500, and the result is probably100000000000! That's 100 million possibilities! Such a huge possibility, in other words, even if a lot of manpower and material resources can be mobilized, it is almost impossible to test the possibilities one by one by means of "violent decoding". As long as the agreed rotor direction, position and connection state of the connecting plate are followed, the transmitter and receiver can communicate very easily. This is the secret principle of Enigma cipher machine.

19 18, Shelbius applied for the patent of Enigma cipher machine. 1920, he developed the commercial basic model and the luxury model with printer, but the high price (equivalent to about $30,000 today) made Enigma cipher machine less popular. Just as Shelbius developed the Enigma cipher machine, three other people also made similar inventions. In 19 19, Alexander Koch, a Dutchman, also registered a similar invention patent "steganography machine", but because it could not be commercialized, the patent was finally transferred in 1927 (so some people say that Shelbius developed the "Ingmar" cipher machine according to Koch's patent). Arvid Damm, a Swede, also obtained a patent for the same principle, but it remained on paper until his death in 1927. The third person is American Edward hepburn, whose experience is the most tragic. He invented the Sphinx cipher machine and raised $380,000 to start a factory for production and sales. As a result, only a dozen sets were sold and the income was less than $2,000. 1926 was sued by shareholders and was convicted and imprisoned.

At the 1923 international postal association conference, the "Enigma" cipher machine that was publicly unveiled was still a few buyers. Seeing that the "mystery" was coming to an end, suddenly the truth came out-1923, the British government published the official report of World War I, which talked about the decisive advantage that Britain gained by deciphering German radio codes during World War I, which attracted great attention from Germany. Immediately, Germany began to strengthen the security of radio communication, and conducted strict safety and reliability tests on Enigma cipher machine. It is believed that the German army must be equipped with this cipher machine to ensure communication security. After receiving orders from the German government and army, the factory in Shelbius was able to mass-produce Enigma from 1925, and the German navy officially equipped it from 1926. Two years later, the German army. Of course, these military models "Ingmar" are different from a few commercial models sold before in the core rotor structure, so even if there are commercial models, it is impossible to know the specific situation of military models. After the Nazi Party took control of the German regime, it also evaluated the use of the "Ingmar" cipher machine, believing that the cipher machine is easy to carry and use, and more importantly, it is extremely safe. For the enemy, even if there is a cipher machine, if you can't master the key composed of three lines of defense at the same time, you can't decipher it. Colonel erich Foer Gibel, chief communication officer of the German High Command, believes that Enigma will be the most perfect communication equipment for the German Defence Force Blitzkrieg. Therefore, "Enigma" is widely used as a standard cipher machine from the German high command to the armed forces. -Germans have every reason to believe that they have mastered the most advanced and safest communication encryption system in the world at that time, which is an unbreakable password system. However, trusting the machine so foolishly will only bring you bitter results in the end.

However, Shelbius, the father of Enigma, failed to see the wide application of Enigma and its great influence on World War II. 1May, 929, died of accidental injury while riding a horse.

Quantum cryptography

Encryption is one of the important means to ensure information security. At present, the most commonly used encryption technology is to change the original information with complex mathematical algorithms. Although this method is very safe, it may be deciphered and it is not absolutely reliable. Quantum cryptography is a completely different encryption method, which mainly uses quantum state as a key to encrypt and decrypt information. Anyone who wants to measure and decipher the key will get meaningless information by changing the quantum state, and the legal receiver of the information can also know that the key has been intercepted from the change of the quantum state. Theoretically, the communication encrypted by quantum cryptography cannot be eavesdropped, and the security is extremely high. The first quantum cryptography communication network in the world was officially put into operation in Cambridge, Massachusetts, USA on June 3, 2004.

Virginia password

On the basis of a single Caesar password, people expanded the multi-table password and called it "Virginia" password. It was invented by Blaise Virginia of the French Henry III dynasty in the16th century, and its characteristic is to combine 26 pieces of Caesar's secret watches, as shown in the following 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

A 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 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 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 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

English composition network collection and arrangement English composition network collection and arrangement

F 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

This is a good example.

H 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 know what you are talking about.

Hello! Hello! Hello! Hello! Hello!

K 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

I don't know what you're talking about.

M 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 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 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 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 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

This is a good example.

S 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

I also know the area.

U 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 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 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 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 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 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

Virginia cipher introduces the concept of "key", that is, according to the key, it decides which line of secret table to replace, so as to counter the word frequency statistics. If the first line above represents plaintext letters and the first column on the left represents key letters, the following plaintext is encrypted:

To be or not to be, that is a question.

When RELATIONS is selected as the key, the encryption process is as follows: if a letter in plaintext is T and the first key letter is R, you can find that K replaces T in R line, and so on, and the corresponding relationship is as follows:

Keywords: RELAT IONSR ELATI ONSRE LATIO NSREL

Clear text: tobeo rnott oberthatist hequestio

Ciphertext: KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY

Many encryption methods in history have evolved from the Virginia cipher table, and their basic elements are nothing more than cipher table and key, which have been used in primary electronic cipher machines after World War II.

Fence password

The so-called fence password is to divide the plaintext to be encrypted into n groups, and then connect the ith word of each group to form an irregular channel.

Generally, the password of column 2 is more common.

For example, there is a plaintext password.

After removing the spaces, it becomes: Decryption password.

In pairs, we get: the El Isa code.

First take out the first letter: TEESCPE.

Then take out the second letter: HRIAIHR

Together, it is: TEESCPEHRIAIHR

So we can get the password we need!

When decrypting, we first separate the ciphertext from the middle and change it into two lines:

T E E S C P E

H R I A I H R

Then combine them in up and down order:

Decryption password

Separate spaces, you can get the original:

There is a password.

But some people don't divide passwords into two columns, such as:

Clear text: There is a password.

Group of seven: There is a guide.

Excerpt letter: TA HC EI RP EH IE SR

Combine to get the password: TAHCEIRPEHIESR

Then at this time, you can't follow the method in the second column. ...

But there is a hidden rule in the shed bar password itself, that is, there are generally not too many letters that make up the shed bar. (generally not more than 30, that is, one or two sentences)

In this way, we can solve the password by analyzing the letters in the password. ...

For example: TAHCEIRPEHIESR

There are 14 letters, which may be 2 or 7 columns. ...

Try column 2 ... unsuccessful.

Try column 7 ... Success.

However, when the shed bar was combined with pinyin, a hateful new idea was born. ...

For example, in the opening flash of the online version of Zhengdao College, there is such a shed bar:

QGBKSYSHJIEUEIIIIAN

A total of 19 letters ~ it seems that it does not conform to the rules of giving up ... in fact, it is because there is a winter, and winter is called binding:

Q G B K S Y SH J

Yiyi yiyi

Did you get a look at him? The initials are above and the finals are below. ...

The author uses sh in the initial letter and ian in the vowel as one character. ...