Cryptography overview (2)

zhaozj2021-02-17  51

Cryptography overview (2)

/ ** Good things everyone share ** /

As we have roughly understand the algorithm of the public key system, how is the specific encryption implementation? Let's take a look at how to achieve encryption first, then pass an instance to make a detailed description. We know that there is a pair of passwords in the public key system, which is called the public key for others, and it is called private key to use it. These two can be encrypted with each other and only addressed the other party. The following stuff is only a private key solution. Even it doesn't have a way to solve it. Similarly, the Dongdong encrypted with private key is only public key energy. As shown below:

Let's take an example: First we arrange the RSA algorithm of the previous section to step: 1 Select two large number of users and P and q, each is greater than 10100; 2 calculate n = p * q and z = (P 1) * (Q 1); 3 Select a prime number related to Z, which make it d; 4 find an E to satisfy E * D = 1 (model Z). D confidential. Calculate these parameters in advance, we can prepare to encrypt. It is divided into blocks (when the action strings will be viewed), so that each of the coded packets P falls between 0

Reference letters plaintext ciphertext decryption P3 P3 (MOD 33) C7 C7 (MOD 33) letters SUZANNE 19212601141405 6859926117576127442744125 28212015526 134929285121801088541128000000178125781258031810176 192126114145 SUZANNE

OK, now everyone should have a clear process of encryption and decryption? Now let's see the next algorithm! Message Summary Algorithm (HASH Algorithm): When processing encrypted transmission issues, inevitably want to touch "message summary". The message summary refers to a part of a message in the PGP in the PGP in a single-directional hash algorithm. The so-called unidirectional hash algorithm is that you cannot calculate its input from the output of the algorithm. In the message summary algorithm, the file data acts as an input of the one-way hasonial, which generates a hash value via the Hash function. If someone changed the file, the hash value changes accordingly, and the recipient can detect such a changed trace. In theory, an attacker cannot make an alternative message to generate a fully identical message summary. More deep step, the key can encrypt the message summary to form a digital signature. Message Abstract Use several algorithms with some differences. Two of them are most common, the most popular message summary method is: RSA MD2 and RSA MD5. A message summary is an encrypted check, unlike a CRC is an arithmetic checksum. Let's take a look at the MD5 algorithm principle: The MD5 algorithm is processed by the HD 512 bits, first of all, fill the mixed information, so that the length of the information is equal to 512 multiples. The filling method is first filled with the information length of the byte length after the compression information, and then fill the filling information of the first bit of 1, and the filled information is 512 after the filled information is 512, and then the information is sequentially Treatment 512 bits, 4 rounds each time, 64 steps per round, 64 steps, each output is 128 bits, then the previous output as the next information transformation input initial value (first time The initial value algorithm has been fixed) so that the result of the last 128B bit is output. At present, MD5 is considered to be one of the most secure split algorithms, and it has been used as a standard use in many applications. Ok, I have seen it here today, I don't want you to say that this is still sleeping, so I am sleeping, so I will go home to sleep.

转载请注明原文地址:https://www.9cbs.com/read-28705.html

New Post(0)