Password Knowledge Tutorial One _ Security related

Source: Internet
Author: User
Tags bitwise
Talking about the cipher algorithm, some people will feel strange, but a mention of PGP, most of the online friends are very familiar with, it is a tool software, registered to the certification center can be used to encrypt the file or digital signature, PGP is the RSA algorithm, we will discuss it later. The purpose of the cryptographic algorithm is to protect the confidentiality, integrity and security of the information, simply to say that the anti-counterfeiting and theft of information, which is particularly meaningful in the online payment system. The originator of cryptography can be said to be the founder of the information theory Shannon, he proposed some concepts and basic theories, demonstrating that only one cipher algorithm is theoretically solvable, that is, one time Padding, this algorithm requires a random binary sequence as a key, and the binary sequence to be encrypted bitwise XOR, The length of the key is not less than the length of the binary sequence to be encrypted, and a key can only be used once. The other algorithms are theoretically solvable. such as the DES algorithm, the actual length of the key is 56 bits, for 2^56 times, you can definitely find the encryption using the key. Therefore, the use of the cryptographic algorithm to do in fact can not be solved, when a cryptographic algorithm known to solve the time complexity of the algorithm is a number of levels, said the algorithm is in fact not solvable. Incidentally, it is reported that someone abroad has only 7.5 hours to successfully break the DES algorithm. Cryptography is evolving, as human computing power develops as rapidly as Moore's law mentions. As the first part, we first discuss the concept of cryptographic algorithm.
The cipher algorithm can be regarded as a complex function transformation, c = F M, key, C represents cipher, that is, the character sequence obtained after encryption, M represents the plaintext is to be encrypted character sequence, key represents the key, is a secret selected character sequence. One of the principles of cryptography is that "all secrets reside in the key", and the algorithm can be made public. When the encryption is completed, the ciphertext can be sent to the recipient through the unsecured channel, only the recipient with the decryption key can decrypt the cipher text, the reverse transformation is clear, the key transmission must pass the security channel. The current popular cryptographic algorithms are mainly DESRSA,IDEA,DSA, as well as the recent Liu's algorithm, by the Chinese Liu honour all invented. Cryptographic algorithms can be divided into traditional cryptographic algorithms and modern cryptographic algorithms, the traditional cryptographic algorithm is characterized by encryption and decryption must be the same key, such as Des and idea; modern cryptographic algorithms differentiate the encryption key from the decryption key, and the encryption key does not actually find the decryption key. Such an entity simply exposes its encryption key (called the public key, the decryption key is called the private key) can, the entity may carry on the secret communication, but does not like the traditional cipher algorithm to have to secretly pass the key before the communication, among them the beauty one wants to know. Therefore the traditional cipher algorithm is also called symmetric cipher algorithm (symmetric cryptographic algorithms), the modern cipher algorithm is called the Asymmetric cipher algorithm or the public key cipher algorithm (Public-key cryptographic algorithms), The concept was first presented by Diffie and Hellman at the United States National Computer Conference in 1976. The cipher algorithm can be divided into the block cipher algorithm and the sequence cipher algorithm according to the processing way of the plaintext in the encryption. The Block cipher algorithm is to divide the cipher into the equal length group, respectively, and the sequence cipher algorithm is a bit more than specially processed, with the known key random sequence and the clear text bitwise XOR. Of course when the packet length is 1 o'clock, the two are confused. These algorithms will be discussed in detail later.
RSA algorithm
This algorithm was introduced in 1978 and is the first algorithm that can be used both for data encryption and digital signature. It is easy to understand and operate, but also very popular. The name of the algorithm is named after the inventor: Ron Rivest, Adishamir and Leonard Adleman. However, the security of RSA has not been proved theoretically.
RSA's security relies on large-number decomposition. Both public and private keys are functions of two large primes (greater than 100 decimal digits). It is speculated that the difficulty of inferring plaintext from a key and cipher is equivalent to breaking the product of two large primes.
The generation of the key pair. Select two large primes, p and Q. Calculation:
n = p * Q
Then randomly select encryption key E, requiring E and (p-1) * (q-1) coprime. Finally, the Euclid algorithm is used to compute the decryption key D, which satisfies
E * d = 1 (mod (p-1) * (q-1))
where N and D are also coprime. The numbers e and n are public keys and D is the private key. Two primes p and Q no longer needed, should be discarded, don't let anyone know.
When encrypting information m (binary representation), first divides m into equal length blocks m1, M2,..., mi, blocks long s, where 2^s <= N, s as large as possible. The corresponding ciphertext is:
ci = mi^e (mod n) (a)
The following calculations are made when decrypting:
mi = ci^d (mod n) (b)
RSA can be used for digital signatures, with a (a) signature and (b) validation. When the specific operation takes into account the security and the large amount of M information, it is generally the first HASH operation.
Security for RSA.
RSA's security relies on the large number decomposition, but whether equal to the large number decomposition has not been proved theoretically, because does not prove that the RSA must make the large number decomposition. Assuming there is an algorithm that does not need to decompose large numbers, it can certainly be modified to be a large number decomposition algorithm. At present, some of RSA's mutation algorithms have been proved to be equivalent to large number decomposition. In any case, decomposing n is the most obvious method of attack. Now, people have been able to decompose more than 140 decimal digits of large primes. Therefore, the modulus n must be selected larger, depending on the specific application of the situation.
The speed of RSA.
Because of the large number of calculations, the RSA is 100 times times faster than DES, both software and hardware implementations. Speed has been a flaw in RSA. Generally, it is used only for small amounts of data encryption.

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.