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 In Virginia's password, the sender and the receiver must use the same keyword or the same text chapter, that is, the key. The letters in this keyword or text chapter tell them how to change the position of the letters back and forth to get the correct corresponding position of each letter in this message. For example, if the keyword "BIG" is used, the sender will arrange the information in three-letter order. The first letter of the first three-letter word needs to be moved forward one place (because B is the letter after A), the second letter needs to be moved forward eight places (I is the eighth letter after A) and the third letter needs to be moved forward six places (G is the sixth letter after A). You can then encrypt the text in the following order:
Butchers, bakers and candy makers. Butchers, bakers and candle makers.
key key:big bigbigbigbigbigbigbigbigbigbigbigbigbigbigb。
Encrypted text: UPK cczdpks BNF jglmx bvj UPK ditetkttbods SBS KS
secret key
If you know that "big" is the key, the recipient can easily change the letter position through the corresponding position, thus translating the encrypted text.
Cryptanalysis
For many years, Virginia's password was considered unbreakable, but Charles Babbage, a British independent rich man, proved it to people in the 1950s. By the way, this man is also known to the world for his pioneering work in the field of computer science. Babbage cracked the cryptosystem by looking for repeated letter fragments. Of course, the advantage of Virginia password is to assume that it encrypts letters in different locations differently. For example, THE word "the" in the same paragraph may be denoted as "UPK" in front but "BNF" in the back. Similarly, letters like "AKER" can be encrypted in different ways. However, THE first and third "the" will be coded as "UPK". THE "t" in THE first "the" will be coded with "b", and the "t" in the third "the" will also be coded with "b". This happens because THE third "THE" is the 2 1 letter after the first "the". After 7 repetitions, the 3-character key BIG will return to the beginning. In any encrypted information much longer than the key, repetition like this is bound to appear. How can the decryptor reveal the true face of the encrypted file? For example, if the encrypted word "UPK" appears twice, and the number from the first U to the next U is 2 1 letters, then he can infer that the length of the key is an integer of 2 1. Or in other words, he can infer that 2 1 is a multiple of the key. A divisor is a number that has no remainder after division. For example, the divisor of 2 1 is 1, 3,7,21. If enough similar clues are obtained, the decryptor can know the exact length of the key. Once he knows the length of the key, he can make daily frequency analysis of the encrypted information. Please note that in decryption, mathematics always comes first: the decryptor will calculate the length of the key first, even before he considers the specific content of the key.
Babbage's creative skills opened up a new field of cryptography and introduced mathematical tools into the field that was previously considered to belong to philology. Even if a cryptographic system does not explicitly use mathematics, the hidden format usually needs to be sorted out by mathematical methods.
Since the emergence of frequency analysis, the single-letter substitution password has completely lost its usefulness. Therefore, cryptographers try their best to make stronger passwords. Some coders have made some changes to the single-letter replacement password, such as adding some special characters in the coding process, or making some letters represent a program instead of another letter, such as spaces, deleting the previous letters and breaking lines. But all this has little effect, and clever decoders can still find many clues to decipher the code. Until one day, batiste Alberti of Lyon, Florence proposed a multi-letter replacement password, that is, alternately using two or more cipher tables for encryption, such as:
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 table1qwerty yuiopa s d f g h k j l z x c v b n m
Password table 2 E K P R J B D N C V O U H T Y W Z X M L A S F I G Q
The first cipher table encrypts the first letter, the second cipher table encrypts the second letter, the first cipher table encrypts the third letter, and so on ... so:
Clear text for recovery
ciphertext
Encrypted phalanx
In this way, it is useless to analyze the frequency with the original method. This only happens when there are two cipher tables. If three, four or more cipher tables are used, it will be very, very difficult to decipher. Nevertheless, Alberti failed to develop his ideas into a complete system. Of course, this task was completed by future generations. After several people's efforts, Virginia finally perfected it. He compiled a systematic and effective password. That's the Virginia code, and its main component is the Virginia phalanx:
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
1 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
2 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
3 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
4 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
5 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
6 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
7 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
8 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
9 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
10K 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
1 1 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
12M 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
13N 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
14 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
15 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
16 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
17 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
18S 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
19T 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
20 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
2 1V 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
22 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
23 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
24 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
25 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
26 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
There are 26 cipher tables behind its plain code table, and each table is a shift of the previous table. If only one of them is used for encryption, it is just a simple Caesar shift password. But encrypting different letters with different lines in a square matrix is a powerful password. The encryptor can encrypt the first letter with line 7, the second letter with line 25, the third letter with line 8, and so on.
Now let's try it, just use the keyword forest encryption to do it better than saying it well.
Keywords fire fighting; Fire fighting; Fire fighting; Fire fighting; fire fighting
Wenming b e t t e r t o d o w e l l t h a n t o s a y w e l
Miwen
(Look at line 5, at the beginning of F, the plain text is B, and it should be encrypted with G; Line 14, beginning with O, plain text is E, it should be encrypted with S, and so on ...)
D-Genard cipher not only overcomes frequency analysis, but also has a large number of keys. The sender and the receiver can use any word in the dictionary, or a combination of words, or fictional words as keywords. It provides good security, but its complexity makes it popular until19th century. However, it was also in the19th century that Charles babic, an eccentric genius, cracked it. Let's look at the decryption process:
Square matrix decoding
First of all, the first step in deciphering is to find the letters that appear more than once in the secret text. There are two situations that may lead to this repetition. It is most likely that the same letter sequence in plaintext is encrypted with the same letter in the key; In addition, it is very unlikely that two different letter sequences in plaintext are encrypted by different parts of the key, which are exactly the same sequences in ciphertext. If we are limited to a long sequence, the second possibility can be basically ruled out. In this case, we mainly consider repeating sequences of four letters or more.
The second step of decryption is to determine the length of the key. Read this paragraph first:
Keywords fire fighting; Fire fighting; Fire fighting; Fire fighting; fire fighting
Wenming b e t t e r t o d o w e l l t h a n t o s a y w e l
Miwen
From the appearance of the first YC to the end of the second YC, there are 12 letters (U S O X Q Z K L S G Y C).
Then the length of the key should be a divisor of 12-one of 1, 2, 3, 4, 6, 12 (except1).
For example, the following ciphertext:
I S W Z P N Q C K M Y Y Y Y J K A Y Y E Z F S W E E S S P G Z X Q A H F
O A…… ... China English Learning Network
Q S W M C V U D S I J G G D E U W A Z R S F X W I L K U E J Q L D A C B
g D L Y J X M Y L M D Q K Z M P L D I L Q E M W F S W D P A Z E Z Q N W
D Y W D Z X F S A E E A Z J D U E L V P T M C E K W S E E E F U R Z F S W
A F K M X W A W V E Z F S D B G D L A Y U Q X G D P E K W S
E E F U R Z F S W D P O U E Z K Z M Y L Q N P Q Q D E M J T Q Y G U V A
A F J Q J G C O M J Z A H Q A F K T J D K A D
M N W P J G G C W K P K A Y E Q Z Z P T V K Z M Q G W D V F A H L T L L L
American oil company
A F A F
A F J Q Y W H P P Z O Z D Z M W D U M W F S W A Y W R Z J
K M M M M F D M D P A R Q J A H F
This is a good example.
Y P J
The repeated sequences in it are I S W Z P N Q C K M, B G D L, S E F R Z F S W D P,
A F, etc.
If each repetition interval is divisible by 3, then the keyword should have three letters.
The next step is still frequency analysis. However, because keywords have three letters, we have to divide them into three groups. The letters 1, 4, 7, 10, 13 ... are grouped into a group called L 1, and the letters 2, 5, 8, 1 1.
Now make a standard frequency distribution table:
Multiply the standard percentage of each letter by 169, such as the letter a, 169*8.2%= 14.
Then according to the standard frequency:
A: 8.2 Newton: 6.7 Newton.
B: 1.5 O:7.5
C:2.8 P: 1.9
D:4.3 Q:0. 1
East: 12.7 west: 6.0
Female: 2.2 Male: 6.3
G:2.0 T:9. 1
H:6. 1 U:2.8
I:7.0 V: 1.0
J:0.2 W:2.4
K:0.8 X:0.2
L:4.0 Y:2.0
Male: 2.4 female: 0. 1
Get standard number:
A: 14 N: 1 1
B:3 O: 13
C: 5 pm: 3 pm
D:7 q: 0
E:2 1 R: 10
Female: 4 S: 1 1
G:3 T: 15
H: 10 U:5
I: 12 V:2
J:0 W:4
K: 1 X:0
L:7 Y:3
Male: 4 Z:0
Then, count the times of 169 letters of L 1, including:
A: 22 N: 1
B: 1 O: 1
C:0 P:5
D: 10 Q: 16
Electronic version: 10 R:5
Female 9 years old and male 2 years old.
G:7 T:7
H:2 U: 14
Me: 9 V: 1
J:0 W: 1
K: 1 1 X:2
L:0 Y:5
Male: 14 female: 14
The chart of L 1 is made and compared with the standard chart. Both the standard frequency and the frequency of L 1 have peaks, stationary periods and valleys. The difference between them is that they are staggered in some positions, and the most remarkable features should be found through comparison. For example, if you look at section A-F in the chart of L 1, the peak of A is followed by a trough, especially when C does not appear, and then a stationary period, similar to section O-T in the standard frequency; In the standard frequency, the I-N segment before O is also roughly consistent with the U-Z segment in L 1. Look again, in L 1, the deletion of J and L should be the deletion of X and Z in the standard frequency, and the M-Q segment should be the A-E segment in the standard frequency. This means that the cipher table of L 1 starts with m, n, o, p ... and moves the graph of L 1 2 units to the left, which is almost the same as the standard frequency. Therefore, the first letter of the keyword is m (note that some mistakes are inevitable. For example, if K is used instead of Y, it seems that the two charts are not very consistent in comparison, but they are almost the same in general, so we can ignore the past. )
Continuing, counting the times of L2 169 letters, we can determine that the second letter of the keyword is L.
Finally, in the same way, it can be determined that the third letter of the keyword is S.
At this point, the whole keyword is MLS.
Then translate the ciphertext with Genard square to get plaintext:
Whenever I sing my song
Standing alone on the stage
Every time I say my words
I hope they can be heard.
I see you smiling at me.
Is this true or is it my fantasy?
You'll always be in the corner
The owner of this small bar
I'm sorry for your last night here
Do the same old song again.
The last night I was here with you
Maybe, maybe not.
I kind of like your way.
How you looked at me shyly.
Oh, you know what?
I have faith in you.
Honey, there you are.
The expression on your face.
As if you've never been hurt.
As if you've never been depressed.
Am I the only one for you?
Who is holding you gently and surely?
If you frown, then
I will know that you are not a dreamer.
skill
1 A-E segment, U-Z segment and O-T segment are obvious, so we can start from these aspects first.
2. If some strings appear frequently, you may want to guess, paying special attention to the appearance of -ING, etc.
3. Pay attention to those letters that don't appear in the chart, which will often be the breakthrough point, such as the vacancy of X and Z;
It is better to make a chart, after all, it is more intuitive and beautiful.