What Is a Cipher?

Passwords are a technique used for obfuscation. Users want to transform normal (identifiable) information into unrecognizable information. But this unrecognizable part of the information can be reprocessed, recovered and cracked. Password is the general name of "password" in Chinese. [1]

Specially prepared
Ancient Greece, 405 BC
Passwords are coded according to specific rules
Mystery in the skirt
During World War II,

RSA Cryptographic RSA algorithm

The RSA algorithm is the first algorithm that can be used for both encryption and digital signatures, and is easy to understand and operate. The RSA algorithm is an asymmetric cryptographic algorithm. The so-called asymmetric means that the algorithm requires a pair of keys. If you use one of them to encrypt, you need to use the other to decrypt. [4]
RSA's algorithm involves three parameters: n, e1, e2.
Among them, n is the product of two large prime numbers p and q, and the number of bits occupied by the binary representation of n is the so-called key length.
e1 and e2 are a pair of related values. e1 can be arbitrarily chosen, but e1 and (p-1) * (q-1) are required to be coprime (coprime: when two positive integers have only the common divisor 1, their relationship is called Coprime); then select e2 and require (e2 * e1) mod ((p-1) * (q-1)) = 1.
(n, e1), (n, e2) are key pairs.
The algorithm for RSA encryption and decryption is exactly the same. Let A be plaintext and B be ciphertext, then: A = B ^ e1 mod n; B = A ^ e2 mod n
e1 and e2 can be used interchangeably, that is: A = B ^ e2 mod n; B = A ^ e1 mod n

ECC Password ECC encryption method

The ECC algorithm is also an algorithm that can be used for both encryption and digital signatures, and is easy to understand and operate. It is the same as the RSA algorithm. Asymmetric cryptography uses one to encrypt and the other to decrypt. [1]
Public key algorithms are always based on a mathematical problem. For example, RSA is based on: Given two prime numbers p and q, it is easy to multiply to get n, but factoring n is relatively difficult. So what's the problem with elliptic curves?
Consider the following equation:
K = kG [where K, G are points on Ep (a, b) and k is an integer less than n (n is the order of point G)]
It is not difficult to find that given k and G, it is easy to calculate K according to the multiplication rule; but given K and G, it is relatively difficult to find k.
This is the difficult problem for the elliptic curve encryption algorithm. We refer to point G as the base point, k (k <n, n is the order of the base point G) as the private key, and K as the public key.
For example, we describe a process of encrypted communication using elliptic curves:
1. User A selects an elliptic curve Ep (a, b) and takes a point on the elliptic curve as the base point G.
2. User A selects a private key k and generates a public key K = kG.
3. User A passes Ep (a, b) and points K, G to user B.
4. After receiving the information, user B encodes the plain text to be transmitted to a point M on Ep (a, b) (the encoding methods are many and will not be discussed here) and generates a random integer r (r <n).
5. User B calculates points C1 = M + rK, C2 = rG.
6. User B passes C1 and C2 to user A.
7. After receiving the information, user A calculates C1-kC2, and the result is point M. because
C1-kC2 = M + rK-k (rG) = M + rK-r (kG) = M
Then decode the point M to get the plaintext.
ECC is more powerful than RSA. What is interesting is the point and point process, which is also the source of its function.

Password two-party password

Two-way ciphers (en: Two-square_cipher) use fewer matrices than four-way ciphers. [4]
The method of obtaining the encryption matrix is the same as the four-way password.
For example, use "example" and "keyword" as keys to encrypt lp. First find the position of the first letter (L) in the upper matrix, and then find the position of the second letter (P) in the lower matrix:
EXAMP
LBCDF
GHIJK
NORST
UVWYZ
KEYWO
RDABC
FGHIJ
LMNPS
TUVXZ
In the upper matrix, find the first letter in the same row and the second letter in the same column; in the lower matrix, find the first letter in the same row and the second letter in the same row. The two letters are the encrypted result:
EXAMP
LBCDF
GHIJK
NORST
UVWYZ
KEYWO
RDABC
FGHIJ
LMNPS
TUVXZ
Help me's encrypted result:
he lp me
HE DL XW
The weakness of this encryption method is that if two words are in the same column, the original letter is used, for example, he is encrypted for HE. About 20% of the content was exposed as a result.

Password Quartet Password

The four-way password is encrypted with four 5 × 5 matrices. Each matrix has 25 letters (usually cancel Q or treat I and J as the same, or improve it to a 6 × 6 matrix and add 10 numbers). [1]
First select two English words as the key, such as example and keyword. For each key, the repeated letters are removed, that is, the example is converted to exampl, then each letter is placed in the matrix in order, and the remaining letters are placed in the matrix to obtain the encryption matrix.
Place these two encryption matrices in the upper-right and lower-left corners, and place the a-to-z matrix in the remaining two corners:
abcde EXAMP
fghij LBCDF
klmno GHIJK
prstu NORST
vwxyz UVWYZ
KEY WO abcde
RDA BC fghij
FGHIJ klmno
LMNPS prstu
TUVXZ vwxyz
Encryption steps:
Separate messages in two letters: (eg hello world becomes he ll ow or ld)
Find the position of the first letter in the upper left matrix
abcde EXAMP
fghij LBCDF
klmno GHIJK
prstu NORST
vwxyz UVWYZ
KEYWO abcde
RDABC fghij
FGHIJ klmno
LMNPS prstu
TUVXZ vwxyz
For the same reason, find the position of the second letter in the lower right corner of the matrix:
abcde EXAMP
fghij LBCDF
klmno GHIJK
prstu NORST
vwxyz UVWYZ
KEYWO abcde
RDABC fghij
FGHIJ klmno
LMNPS prstu
TUVXZ vwxyz
Find the letters in the upper right corner matrix that go with the first letter and the second letter in the same column:
abcde EXAMP
fghij LBCDF
klmno GHIJK
prstu NO RST
vwxyz UVWYZ
KEYWO abcde
RDABC fghij
FGHIJ klmno
LMNPS prstu
TUVXZ vwxyz
Find the letters in the lower left corner of the matrix that are in the same column as the first letter and the second letter:
abcde EXAMP
fghij LBCDF
klmno GHIJK
prstu NORST
vwxyz UVWYZ
KEYWO abcde
RDABC fghij
FGHIJ klmno
LMNPS prstu
TUVXZ vwxyz
These two letters are the encrypted message.
he lp me ob iw an ke no bi encryption result:
FY GM KY HO BX MF KK KI MD

Password three-point password

First, make a 3x3 Polybius grid to replace the password, including 26 English letters and a symbol. Then write the three-dimensional coordinates of the message to be encrypted. Messages and coordinates are lined up in four columns, and then the horizontal numbers are sequentially taken, separated by three groups. The three numbers are used as coordinates, and the corresponding letters are found to obtain the ciphertext. [1]

Password affine password

An affine password is a replacement password. It is letter by letter. [4]
Its encryption function is e (x) = ax + b (mod m), where a and m are prime.
m is the number of letters.
The decoding function is d (x) = a ^ (xb) (mod m), where a ^ is the multiplicative inverse of a in M group.

Password borefe password

1. Select an English word as the key. Remove duplicate letters. Add the letters of the key one by one into the 5 × 5 matrix, and the remaining space will add the unadded English letters in the order of az. (Remove Q, or treat I and J as the same word.) [4]
2. Divide the message to be encrypted into two groups. If the letters in the group are the same, add X (or Q) to the first letter in the group and regroup. If there is a word left, add the word X.
3 In each group, find out where the two letters are in the matrix.
If the two letters are different in different rows and columns, find the other two letters in the matrix so that the four letters become the four corners of a rectangle.
If two letters go together, take the letter to the right of the two letters (if the letter is at the far right, take the leftmost letter).
If two letters are in the same column, take the letter below the two letters (if the letter is at the bottom, take the top letter).
The newly found two letters are the result of the original two-letter encryption.

RC5 Password RC5

1. Create a key group. The RC5 algorithm uses 2r + 2 key-related 32-bit words for encryption, where r represents the number of rounds of encryption. The process of creating this key group is very complicated but also straightforward. First, copy the key bytes into the 32-bit word array L (at this time, pay attention to whether the processor is little-endian or big-endian) If necessary, the last word can be filled with zeros. Then use the linear congruence generator modulo 2 to initialize the array S:
For i = 1 to 2 (r + 1) -1 (w = 32 in this article)
Where for RC5 of 16-bit word 32-bit packet, P = 0xb7e1 Q = 0x9e37
For RC5 with 32-bit words and 64-bit packets, P = 0xb7e15163 Q = 0x9e3779b9
For 64-bit words and 128-bit packets P = 0xb7151628aed2a6b Q = 0x9e3779b97f4a7c15
Finally, L and S are mixed. The mixing process is as follows:
i = j = 0
A = B = 0
Process 3n times (where n is the maximum of 2 (r + 1) and c, where c is the number of key words entered)
2. Encryption processing. After the key group is created, the plaintext encryption is started. When encrypting, the plaintext packet is first divided into two 32-bit words: A and B (assuming that the processor byte order is little-endian, When w = 32, the first plaintext byte enters the lowest byte of A, the fourth plaintext byte enters the highest byte of A, the fifth plaintext byte enters the lowest byte of B, and so on) , Where the operator <<< means cyclic left shift, the addition operation is modulo (this should be modulo, let w = 32 in this article).
The output ciphertext is what is in registers A and B
3. Decryption processing, decryption is also very easy. Divide the ciphertext grouping into two words: A and B (the storage method is the same as the encryption). Here it is consistent with >>>. , In this article let w = 32). [1]

ADFGVX ADFGVX password

Suppose we need to send a plain text message "Attack at once", filling the Polybius box with a secretly mixed alphabet, like this: [1]
ADFGX
A btalp
D dhozk
F qfvsn
G gjcux
X mrewy
i and j are treated as the same word, so that the number of letters conforms to 5 × 5 divisions. These five letters were chosen because they are not easily confused when translated into Morse code, which can reduce the probability of transmission errors. Use this box to find the position of the plaintext letter in this box, and replace the letter with the column name and column name where the letter is located. This message can be converted into a processed decomposition.
ATTACKATONCE
AF AD AD AF GF DX AF AD DF FX GF XF
Next, encrypt with a shift key. Assuming the key word is "CARGO", write it in the first column of the new grid. Write the ciphertext of the previous stage into the new square one by one.
CARGO
_________
AFADA
DAFGF
DXAFA
DDFFX
GFXFX
Finally, according to the alphabetical order of the key word "ACGOR", the entire line of messages under the word is copied in order to form a new ciphertext. as follows:
FAXDF ADDDG DGFFF AFAXX AFAFX
In practical applications, the shift key word is usually as long as two dozen characters, and the disassembly key and shift key are changed every day.
ADFGVX
In June 1918, a word V was added. It is encrypted with a total of 36 characters in a 6 × 6 grid. This allows all English letters (I and J are no longer considered the same word) and the numbers 0 to 9 can be mixed. This change is due to the problem of sending short messages with large numbers in the original encryption method.

Password hill password

Encryption [4]
Example: key matrix
1 3
0 2
Plain text: HI THERE
Remove the space, set of 2 letters, and change the matrix value according to the alphabetical order as follows.
HI TH ER EE
8 20 5 5
9 8 18 5
HI is converted into IS through matrix operation. For the specific algorithm, refer to the following description:
| 1 3 | 8 e1 * 8 + 3 * 9 = 35 MOD26 = 9 = I
| 0 2 | 9 e0 * 8 + 2 * 9 = 18 MOD26 = 18 = S
Use the same method to convert "HI THERE" to the ciphertext "IS RPGJTJ". Note that the two Es in the plaintext become G and T in the ciphertext, respectively.
Decrypt
When decrypting, you must first calculate the inverse matrix of the key, and then do the inverse operation according to the encryption process.
Inverse matrix algorithm formula:
| AB | = 1 / (AD-BC) * | D -B |
| CD | | -CA |
E.g. key matrix =
| 1 7 |
| 0 3 |
AD-BC = 1 * 3-0 * 7 = 3 3 * X = 1 mod26 so X = 9
therefore
The inverse matrix of | 1 7 | is: 9 * | 3 -7 |
| 0 3 | | 0 1 |
Assuming the ciphertext is "FOAOESWO"
FO AO ES WO
6 1 5 23
15 15 19 15
9 * | 3 -7 | | 6 | = 9 * (3 * 6-7 * 15) =-783 mod26 = 23 = W
| 0 1 | | 15 | = 9 * (0 * 6 + 1 * 15) = 135 mod26 = 5 = E
So the plaintext of the cipher text "FOAOESWO" is "WEREDONE"

Cryptographic Wigenal

ABCDEFGHIJKLMNOPQRSTU VWXYZ
BCDEFGHIJKLMNOPQRSTUV WXYZA
CDEFGHIJKLMNOPQRSTUVW XYZAB
DEFGHIJKLMNOPQRSTUVWX YZABC
EFGHIJKLMNOPQRSTUVWXY ZABCD
FGHIJKLMNOPQRSTUVWXYZ ABCDE
GHIJKLMNOPQRSTUVWXYZA BCDEF
HIJKLMNOPQRSTUVWXYZAB CDEFG
IJKLMNOPQRSTUVWXYZABC DEFGH
JKLMNOPQRSTUVWXYZABCD EFGHI
KLMNOPQRSTUVWXYZABCDE FGHIJ
LMNOPQRSTUVWXYZABCDEF GHIJK
MNOPQRSTUVWXYZABCDEFG HIJKL
NOPQRSTUVWXYZABCDEFGH IJKLM
OPQRSTUVWXYZABCDEFGHI JKLMN
PQRSTUVWXYZABCDEFGHIJ KLMNO
QRSTUVWXYZABCDEFGHIJK LMNOP
RSTUVWXYZABCDEFGHIJKL MNOPQ
STUVWXYZABCDEFGHIJKLM NOPQR
TUVWXYZABCDEFGHIJKLMN OPQRS
UVWXYZABCDEFGHIJKLMNO PQRST
VWXYZABCDEFGHIJKLMNOP QRSTU
WXYZABCDEFGHIJKLMNOPQ RSTUV
XYZABCDEFGHIJKLMNOPQR STUVW
YZABCDEFGHIJKLMNOPQRS TUVWX
ZABCDEFGHIJKLMNOPQRST UVWXY
The famous Vergenal square was compiled by the cryptographer Vergenal, and is roughly similar to Caesar's encryption. That the two meet each other for a key (word
), And then give the encrypted content to the other party, and then the other party can translate the plain text according to the password table. [4]
The key is usually a word. When encrypting, the lighting code line is encrypted according to each letter of the key in turn.
For example: my key is who, and the content to be encrypted is I love you, then the encrypted is E SCRL MKB. That is, to encrypt I, I will find the corresponding I in the code line from the line beginning with the first letter of the key The letter E. To encrypt l, find the letter S corresponding to the clear code l from the line h starting with the second letter of the key. Encrypt o, and find the letter C corresponding to o in the clear line from the line beginning with the third letter O of the key. Encrypt v, and then find the letter R corresponding to v in the clear line from the line beginning with the first letter w of the key. So on and so forth.
Therefore, the password encrypted by the Véjénard square matrix has brought a lot of difficulty in deciphering without a key.
The Vergenal matrix perfectly avoided the probability algorithm (calculated based on the probability of each letter in each language. For example, the English language most often is e), so that the cryptographer at the time must find a new method to decipher.

Password Etbash Code

Etbash is a system: the last letter represents the first letter, and the penultimate letter represents the second letter.
In the Roman alphabet, it appears like this: [1]
Regular text: abcdefghijklmnopqrstu vwxyz
Ciphertext: ZYXWVUTSRQPONMLKJIHGF EDCBA
This code was discovered by Dr. Schumpeter. Dr. Schumfert was one of the original investigators of Qumran's Dead Sea Scrolls. His most famous work on the study of the Bible's history is the Passover Conspiracy. He uses this code to study those verses that others cannot crack using other methods. This code was used in the 1st century AD Essene / Sadogi / Nazarene scriptures to hide names. In fact, as early as 500 BC, it was used by scribes to write the book of Jeremiah. Jeremiah was a Jewish prophet who lived between 627 and 586 BC. There are many references to him in the Old Testament Record. Before his death, Jewish territory was occupied by the Babylonians. It is also one of several cryptosystems used in Hebrew.
Platinum, Rey, and Lincoln wrote in The Messiah's Legacy that Dr. Schumfert described in his book "The Odyssey of the Isaiahs" how he was obsessed with the Templars worship of Bophmer, How to analyze the word with Etbash code. To his surprise, the deciphered word "Sophia" was "wisdom" in Greek.
In Hebrew, the word "Baphomet" is spelled as follows-remember that Hebrew sentences must be read from right to left:
Taf mem vav pe bet
Using the Etbash code for the above letters, Dr. Schumfert obtained the following results:
Alef yud pe vav shin
The Greek word "Sophia" written from right to left in Hebrew.
Sophia's meaning is not limited to "wisdom." It's also the name of a goddessthe goddess said she should be the bride of God. Many believe that the Templars worship the goddess. The author quotes the myth of the Gnostic school: the "incomprehensible" Supreme God, "sourced" the earliest sub-gods, and the last one is Sophia-"wisdom". She desperately wanted to get "true knowledge" of God's "god"-the source of the second meaning of her name, and this unsacred desire "born" the evil god, another "God" who created the universe. The Gnostics equated him with God in the Old Testament to explain the fall of Adam and Eve to the Dust and the Flood.
The fact that the Templars knew the Etbash code strongly indicated that some people from a Nazarene sect were among the Templars.
Dan Brown's notion that English is the "purest" language may be fantastic, but it is not a new theory. There is a village called Rainer Springs near Fort Rainer, where the priest, Henry Bude, wrote a book called "The Real Celtic" and also claims that English is a sacred language, perhaps in "Babylon Tower" rescued human Noah with an ark, and a descendant settled in Babylonia. They built tall towers on the Snar Plains in an attempt to climb heaven. The angry God has divided the language that was used before, and the chaos and disputes caused by the impossibility of communication have made people lose all their achievements. Used before the fall. It is said that this book is literally incomprehensible, it is written in a password and conveys a different message. We should also keep in mind that, like some other European languages, many words in English originate from Latin. As Tracy Twyman pointed out in Dagebert's Revenge, English has 26 letters and can be used perfectly in Etbash. Letters used in other European languages are not even. In addition, she always believed that Laoshan hermit would prefer English

Password Fence Encryption

Fence encryption is a relatively simple and fast encryption method. The fence encryption method is to write the file to be encrypted according to the one-on-one writing method, and then arrange the second line of text behind the first line.
Correspondingly, the deciphering method is to separate the text from the middle, divide it into 2 lines, and insert it.
Fence encryption generally works in conjunction with other methods. [1]
example:
Encryption information
Branch
ifrain
nomto
merge
ifrainnomto
carry out.

Password pinhole encryption

This encryption method was born in modern times. Since postage was expensive at the time, it cost little to send a newspaper. So people puncture a hole in the newspaper with the needle underneath the required word, and when it arrives in the recipient's hand, the recipient then arranges the punctured words in order to form an article.
People have rarely used this kind of encryption.

Crypto pigpen encryption

Its English name is pigpen cipher. [1]
In the 18th century, Freemasons invented so that other people could not understand what he wrote. The pigpen password is a replacement password stream, but instead of replacing one letter with another, it replaced one letter with a symbol. Write the 26 letters into the next four tables, and then use the part of the table next to this letter when encrypting.
Symmetric encryption algorithm
DES (Data Encryption Standard): A data encryption standard, which is fast and suitable for the occasion of encrypting a large amount of data (block encryption method);
3DES (Triple DES): Based on DES, a block of data is encrypted three times with three different keys, with higher strength (block encryption method);
RC2 and RC4: Encrypt a large amount of data with a variable-length key, which is faster than DES (stream encryption method);
IDEA (International Data Encryption Algorithm) international data encryption algorithm, using 128-bit keys to provide very strong security (block encryption method);
AES (Advanced Encryption Standard): The advanced encryption standard is a next-generation encryption algorithm standard with high speed and high security level. One implementation of the AES standard is the Rijndael algorithm (block encryption method);
BLOWFISH, which uses a variable-length key with a length of up to 448 bits, runs fast, and is improved to be TWOFISH, one of the candidates for AES (block encryption method).

Crypto asymmetric encryption

RSA: Invented by RSA, it is a public key algorithm that supports variable-length keys. The length of the file blocks that need to be encrypted is also variable (public key encryption). DSA (Digital Signature Algorithm): Digital signature algorithm. A standard DSS (Digital Signature Standard).

Cryptographic message digest algorithm

MD5, SHA1

Password other encryption methods

Replace Encryption : An encryption method that replaces one character with another. [1]
Transposition encryption : An encryption method that rearranges the positions of letters in plain text.
Rotary wheel encryption method : A multi-code encryption method, which uses multiple rotary wheels, each of which implements a single code encryption. These swivel wheels can be combined to produce a new replacement pattern after each letter is encrypted.
Multi-code encryption method : An encryption method whose replacement form is: one letter in plain text can be replaced with multiple letters.
Entrainment : A method of hiding messages by hiding their existence.
Other algorithms, such as XOR, CA (stream encryption method), MD5, SHA1, (stream encryption method) ElGamal, Diffie-Hellman, new elliptic curve algorithm ECC (digital signature, public key encryption method), etc.
Passwords can be used for file protection in your computer to prevent leakage of personal information.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?