The relationship between prime and cryptography

Prime number to be used in cryptography, the so-called public key information you want to convey is to add a few rocky hill at the time of coding, coding delivered to the recipient after anyone Shui after this message, if the recipient does not have this secret Jue key, the decryption process (actually find prime numbers Li Cheng), because the process will find prime numbers (decomposition of the quality factor) for too long and can not interpret the information.

Which number is prime

it is hard to capture the distribution of prime numbers. The interval between the prime number be as large as, for no matter how much a natural number n, there are always two prime numbers, the distance between them is no greater than n and prime therebetween. The reason is simple, to n, the n consecutive integers are arranged, and are co-number: (n + 1)! +2, (n + 1)! + 3, ... (n + 1 )! + (N + 1). Seen in the (n + 1)! +1 and (n + 1)! No primes between + (n + 2).

For thousands of years, ancient mathematicians are hoping to find a mathematical formula, put all the prime numbers are represented. Euler find the formula N = n2 + n + 41, when n = -40, -39, ... 0,1 , ... 39, N is a prime number, only 80 prime numbers. Later it was proved, N = n2 + n + 72491 , when n = 0,1,2, ... 11000 are prime time, only a plurality of one million. It can be shown that it is impossible for the whole polynomial coefficients represent the full prime number, and does not mean the number of engagement.

Seventeenth century Fermat guess, 2n + 1 th power of 2, n = 0,1,2 ... when is a prime number, this number is called Fermat primes, but when n = 5, the 232 + 1 is not a prime number so far The sixth but could not find Fermat primes.

The largest prime number discovered in the 18th century is the largest prime number discovered 231-1,19 century is the century of human 2127-1,20 largest known prime number is 2859433-1, expressed in decimal, which is a 258 715 number.

Prime number and password

Seventies of this century, several American mathematicians made a coding method, this method can be agreed upon between the two sides open communication, but could not decipher the code, this miraculous password associated with prime numbers.

It is known that any natural number can be decomposed into a product of prime numbers, order Excluding factor, is the only form of decomposition. This is called the Fundamental Theorem of Arithmetic, Euclid already proven. But a large integer factorization did not pass a simple way, only with a smaller prime numbers one by one to try in addition, extremely time-consuming. If computer 100 to decompose a number, to the time spent in terms of years. But the two 100-bit multiply the number of computers is very easy. American mathematician on the use of cryptography of this invention, the preparation easy and difficult to decipher. This encoding the last name initials of the three inventors named RSA code.

For example, A, B two communications were agreed two numbers N and e, A wants to send digital M B, M he is not directly emitted, but even by the M e times, and then divided by N, the remainder K issued to B. B has a secret number d, A does not even know that he will not even take the K d times, and then divided by N, the remainder is to get the original number M.

This number is selected, N = p × q, p , q are two large prime numbers selected, select e, d, ed-1 is that the (p-1) × multiple (q-1), and and e cause p-1, q-1 no common factor, it is easy to do. According to this method, the encoding rules may be open, but since N is too large, decomposition p, q is almost impossible, others will not know d, impossible to decipher the password.

After RSA suggested that three inventors had announced a password, offering a reward of $ 100 to decipher, they predicted that people need at least 20,000 years to decipher, even hundredfold increase computer performance, it takes 200 years. But only after less than 18 years, this password was cracked, meaning: "The magic words are squeamish ossifrage ". This password crack so quickly, because more than 600 workers in over 20 countries around the world spontaneously join together to take advantage of computer networksWhile factoring, a continuous exchange of information, summary of the results, with less than a year, it will be decomposed into N 129 is the product of two numbers 64 and 65 prime. The computer network will break down efficiency by approximately ten thousand times, it is the inventor had not envisioned. However, if you increase the number of bits to 200 or 300, a large amount of work will be incredible, even if there is a major breakthrough in computer technology, it is almost impossible to decipher.

Guess you like

Origin www.cnblogs.com/macliu/p/10942285.html