Information Security-Nine: Public key cryptosystem

Source: Internet
Author: User
Tags greatest common divisor

§ 5 Public Key cryptosystem <?xml:namespace prefix = o ns = "Urn:schemas-microsoft-com:office:office"/>

 

Introduction to §5.1 Public key cryptosystem

First, public key cryptography system

The public cryptography system has the following characteristics:

⑴ users must be able to efficiently calculate public and secret key pairs, PK and SK.

⑵ If you do not know the SK, then even if you know PK, algorithm E and D and ciphertext y, it is not feasible to determine the calculation of clear text X.

⑶ after encryption, you should restore the original plaintext x, that is,

DSK (EPK (X)) =x (*)

All x in the EPK domain is set up.

EPK (DSK (X)) =x (*,*)

The cryptography system has the following characteristics:

⑴ Key distribution is simple. Because the encryption key differs from the decryption key, and the decryption key cannot be inferred from the encryption key, the encryption key table can be sent to the individual user by the competent authority, like the phone number book.

⑵ Secret saved key amount decreased. Every member of a network that communicates with a password only needs to secretly save its own decryption key, and N communication members only need to produce n-pair keys.

⑶ can meet the confidentiality requirements of private conversations between strangers.

⑷ can complete a digital signature. (explained later)

Two Differences between the two cipher systems

1. Algorithm: The algorithm of public key cryptography is easy to be described by precise mathematical terms. It is based on a specific known mathematical problem, and security depends on the mathematical problem of the solution is computationally impossible. In contrast, traditional cryptography algorithms are based on mathematical equations of complex disorders. Although it is not difficult to solve a single equation, it cannot be solved by the analytic method because it is iterated and disturbed many times.

2. Key: The key generation methods of these two cryptography systems are also different. In traditional cryptography, cryptographic keys and cryptographic keys can be easily deduced from each other, so they are randomly selected in a simple way. In the public key cryptosystem, the secret key cannot be simply introduced by the public key. The secret key is chosen according to the specific requirements, and the public key is calculated effectively by the procedure of secret key utilization.

§5.2 RSA Cryptographic System and preliminary knowledge

The RSA cryptosystem was invented by the American Rivest (Rivstedt) Shamir (Shamir) and Adleman (Edreman) and named after them, the secrecy of this system is based on the composite of the large prime factor and the factorization is a very difficult problem. (for example, take two large prime numbers P, Q,p Q= R requires, in turn, to find the P and Q from R decomposition, which is very difficult to calculate and is basically not feasible.

Before we introduce the RSA system, we introduce some mathematical knowledge.

First, the basic nature of number theory:

Definition 1: A positive integer greater than 1 that can only be divisible by itself and not divisible by other positive integers is called prime (prime number).

Theorem 1: Set A and R are two integers, r≠0 must have = integer Q and I exist, making a=qr+i 0≤i<∣r∣

Theorem 2: Set A and B are two integers, and (A, b) =d (d is the largest common factor of a and B.) Then there are integers s and t make D=SA+TB.

(Factor decomposition theorem)

Theorem 3: Each positive integer greater than 1 has a method that represents the product of the prime number (excluding the order in which the principal prime factor appears).

Second, the concept and basic nature of congruence:

Definition 1: If the difference of two integers a and b can be divisible by another integer r, that is, r∣a-b, then A/b about modulo r congruence, denoted by the symbol a≡b (MODR). (i.e. A and B have the same remainder)

If R (A-B) is recorded as a (MODR)

(If A≡b (MODR) is A-B=MR. That is A=B+MR, that is, a, B is the same as the remainder when R is removed.

It is obvious that the congruence relationship is an equivalence relation, i.e.

(1) Reflexive: A≡a (MODR)

(2) Symmetrical: if A≡b (MODR), then B≡a (MODR)

(3) Transitive: if A≡b,b≡c (MODR), then A≡c (MODR)

Theorem 4: If A1≡B1 (MODR), A2≡B2 (MODR),......, an≡bn (MODR)

Then A1 a2......an≡b1 B2......bn (MODR)

Corollary 1: If A≡b (MODR), then for any positive integer n,

An≡bn (MODR)

Corollary 2: If A≡b (MODR), then for any integer c

A c≡b C (MODR)

Proof: When n=2, ∵a<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags"/>1a2-b1b2= (A1-B1) a2+ (A2-B2) B1

And R∣a1-b1, R∣A2-B2, ∴r∣ (a1a2-b1b2)

So a1a2≡b1b2 (MODR)

Proposition 1: If CA≡CB (MODR) and (c,r) = 1, then a≡b (MODR)

Theorem 5: (according to the principle of modulus calculation)

Set A1 and A2 as integers, op representing the two-dollar operator +,-,x,

Then (A1OPA2) modr=[(A1 Modr) op (A2 modr)] Modr

Where Amodr represents the remainder after a is removed by R, AMODR=RESR (a)

Theorem 6: if (a,r) = 1, the same ax=1 (MODR) has a unique solution.

Proof: ∵ (a,r) =1

∴<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml"/>s,t integer makes Sa+tr=1

∴1-AS=TR is R∣1-as, 1≡as (MODR)

Three, Euler functions

For ease of discussion, the following assumptions are that modulo r is a positive integer

In order to explain the Euler function, some basic language is introduced.

By modulo R, the integer set I is divided into r subsets, each subset is called a congruence class of modulo r, and any two integers in the same congruence class are the same as the remainder of R, while the remainder of the different congruence classes are not the same as those of the R division.

Proposition 1: (1) If A and R coprime, then A is in the same class in which all the numbers are associated with R coprime;

(2) If a does not coprime with R, then all the numbers in the same class where a is located are not associated with R coprime.

Definition 2: In a complete residual system of r, all components of the number of R-elements are referred to as the simplified remainder of R (the remainder of the system). (r) To simplify the number of remaining lines

Defines the number of R coprime in a fully-remaining system of 3:R called the Euler function of R, denoted by (R) the number of simplified remainder lines in R. Because (R) is independent of the total remaining system used, it is more visually descriptive.

Definition 2: Euler function (r) represents 0,1,2,......, r-1 the number of R coprime in the R number, called the Euler function of R.

Example (5) =4. (10) =4 {1,3,7,9}

In general ① if R is a prime number, then (r) =r-1,② if R is composite, then (R) <r-1

③ when r=1, all integers are associated with 1 coprime, (α,1) =1 because all integers and 1 greatest common divisor are 1, so this class is the class with 1 coprime, ∴ (1) =1

Proposition 3: if (x1,r) =1, (x2,r) =1,......, (xn,r) =1

Then (x1 x2......xn R) =1

Proposition 4: if (A, b) = 1, then (AB) = (a)

Theorem 7

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.