Teach you step-by-step encryption and decryption technology--software protection Technology (3) (1)

Source: Internet
Author: User
Keywords Decryption crack.
Section III encryption algorithm 1, RSA algorithm It is the first algorithm that can be used both for data encryption and digital signature. It is easy to understand and operate, and very popular. The name of the algorithm is named after the inventor: Ron Rivest, Adi Shamir and Leonard Adleman. But the security of RSA has not been proved theoretically. It has undergone various attacks and has not yet been completely breached. RSA algorithm: First, find out three numbers, P,q,r, where p,q is two distinct prime numbers, R is the number of coprime with (p-1) (q-1) ... p,q,r these three numbers are privatekey and then find M and make Rm==1mod (p-1) (q-1) ..... This m must exist, because R and (p-1) (q-1) coprime, with the Euclidean method can be obtained ... Again, the calculation of N=pq.......m,n two is the PublicKey encoding process is, if the data is a, consider it a large integer, assuming a<n .... If A>=n, then the a table into S (s<=n, usually s=2^t), then each digit is smaller than n, and then piecewise coding ... Next, Compute B==A^MMODN, (0<=b<n), B is the encoded data ... The decoding process is to compute C==B^RMODPQ (0<=C<PQ), so that the decoding is complete ... It will prove that C and a are equal: if a third person is eavesdropping, he will get several numbers: M,n (=PQ), b ... If he wants to decode, he must find a way to get R ... So, he has to decompose N as a mass factor first ... To prevent his decomposition, the most effective way is to find two very large prime numbers p,q, so that the third party to the factorization of the difficulties .........< theorem > If p,q is a different prime number, Rm==1mod (p-1) (q-1), A is any positive integer, B==A^MMODPQ , C==B^RMODPQ, then c==amodpq the process of proof, will use the Fermat theorem, described as follows: M is any prime number, n is any integer, then N^M==NMODM (in other words, if N and M coprime, then n^ (m-1) ==1MODM) Using some basic group theory knowledge, it is easy to prove the ........< proof of Fermat theorem > because Rm==1mod (p-1) (q-1), Rm=k (p-1) (q-1) +1, where k is an integer because it is preserve multiplication (x==ymodzandu==vmodz=>xu==yvmodz) in modulo, so c==b^r= = (a^m) ^r==a^ (RM) ==a^ (K (p-1) (q-1) +1) modpq1. If a is not a multiple of p and is not a multiple of Q, then a^ (p-1) ==1MODP (Fermat theorem) =>a^ (K (p-1) (q-1)) = = 1modpa^ (q-1) ==1modq (Fermat theorem) =>a^ (K (p-1) (q-1)) ==1MODQ so p,q are divisible a^ (K (p-1) (q-1)) -1=>pq|a^ (K (p-1) (q-1))-1 namely a^ ( p-1) (q-1)) ==1modpq=>c==a^ (K (p-1) (q-1) +1) ==amodpq2. If a is a multiple of p, but not a multiple of Q, a^ (q-1) ==1modq (Fermat theorem) =>a^ (K (p-1) ( q-1)) ==1modq=>c==a^ (K (p-1) (q-1) +1) ==amodq=>q|c-a (K (p|a=>c==a^) (p-1) +1) q-1 So, ==0modp=>p|c-a >c==amodpq3. If a is a multiple of Q, but is not a multiple of p, it is shown as Ibid. 4. If a is a multiple of both P and Q, then pq|a=>c==a^ (K (p-1) (q-1) +1) ==0modpq=>pq|c-a=>c== Amodpqq.e.d. This theorem shows that a is encoded as B and then decoded to C, A==CMODN (N=PQ) .... But when we do code decoding, we limit 0<=a<n,0<=c<n, so that means a is equal to C, so this process can do the coding and decoding function ... RSA security RSA Security relies on large number of decomposition, but whether the same as the large number of decomposition has not been proved theoretically, because there is no proof of RSA must be a large number of 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 variant algorithms of RSA 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 one decimal bit of large primes. Therefore, the modulus n must be selected larger, depending on the specific application. Three, RSA speed because of the large number of calculations, making RSA the fastest situation than des slower than the times, whether it is software or hardware implementation. Speed has been the fault of RSA. Generally, it is used only for small amounts of data encryption. Iv. RSA's Choice ciphertext attack RSA is vulnerable to the choice of ciphertext attack. A general attacker is to disguise a message (extrudes) so that the entity that owns the private keySigned。 Then, after calculation,information it wants. In fact, the attack exploits the same vulnerability: the fact that the power retains the multiplicative structure of the input: (XM) ^d = x^d *m^d mod n has already mentioned that this inherent problem comes from the most useful feature of a public key cryptosystem--everyone can use the public key. But the algorithm can not solve the problem, the main measures are two: one is to adopt a good public key protocol to ensure that the entity does not decrypt any information generated by other entities in the course of work, and does not sign the information that it knows nothing about; the other is to never send a random document signature to a stranger, using one-way first when signing Hashfunction the document as hash, or at the same time using a different signature algorithm. Several different types of attack methods are mentioned in. RSA public Module Attack if the system has a modulus, only different people have different E and D, the system will be dangerous. The most common scenario is that the same information is encrypted with a different public key, which is common mode and coprime, so that the information is recoverable without the private key. Set p as information plaintext, two encryption keys are E1 and E2, Public modulus is N, then: C1 = p^e1 mod nC2 = p^e2 mod n password analysts know N, E1, E2, C1, and C2 to get p. Because E1 and E2 coprime, therefore, the Euclidean algorithm can find R and S, satisfying: R * E1 + S * E2 = 1 Assuming R is negative, the Euclidean algorithm is needed to compute c1^ (-1), then (c1^ ( -1)) ^ (r) * c2^s = P mod N In addition, there are Several other ways to exploit public modulus attacks. In short, if you know a pair of E and D for a given modulus, one is for the attacker to decompose the modulus, one is to help the attacker to compute the other pairs of e ' and d ', without decomposing modulus. The only solution is to not share modulo n. RSA's small exponential attack. One suggestion to improve RSA speed is to make the public key e take a smaller value, which makes encryption easier to implement and faster. But this is unsafe, and the answer is that both E and D take larger values. RSA algorithm is the first algorithm that can be used in both encryption and digital signature, and is easy to understand and operate. RSA is the most widely studied public-key algorithm, from the proposed to now nearly 20 years, experienced a variety of attacks, gradually accepted by people, generally considered to be one of the best public key schemes. RSA security relies on the factorization of large number of factors, but it doesn't prove that the difficulty of deciphering RSA is equivalent to the difficulty of large number decomposition. That is, RSA's major flaw is that it cannot theoretically grasp its secrecy performance, and most people in cryptography tend to factorization is not a NPC problem. RSA's main disadvantages are: a The key is very troublesome, by the prime generation technologyConstraints, and thus difficult to do one at a time. B the packet length is too large, to ensure security, n at least more than bits, so that the cost of the operation is very high, especially the slow, more symmetric cipher algorithm slow several orders of magnitude, and with the development of large number decomposition technology, this length is not conducive to the standardization of data format. At present, the SET (Secure Electronic Transaction) protocol requires the CA to take a more specific key than the specialist, and other entities use the BITS key. 1 2 3 4 5 6 7 8 9 10 next page >> content navigation to force (0 votes) of (0 Votes) nonsense (0 Votes) The professional (0 votes) The title party (0 Votes) passed (0 Votes) The original text: teach you step-by-step encryption and decryption technology--software protection Technology (3) (1) Return to network security home
Related Article

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.