Introduction to ECC Encryption algorithm introduction

Source: Internet
Author: User
Tags definition
Introduction to Cryptography | Algorithm ECC encryption algorithm


Objective

As with RSA (Ron Rivest,adi Shamir,len Adleman three-bit genius), ECC (elliptic Curves cryptography, elliptic-curve cryptography) also belongs to the public key algorithm. At present, there is not much public literature on ECC in detail in China (I haven't found it anyway). There are some briefs, but also generalities, after reading still cannot understand the essence of ECC (perhaps my understanding is too poor). Some days ago I found some materials from foreign websites, after reading the ECC seems ignorant. So I want to put my understanding of ECC, and share with you. Of course, ECC profound, my understanding is very superficial, the article must be a lot of mistakes, welcome all the way master criticism, I am all ears, and timely correction. The article will be serialized way, I write a little bit on the post. This article mainly focuses on the theory, code implementation is not involved. This requires you to have a little math skills. It is best that you understand the RSA algorithm and have an understanding of the public key algorithm. "The foundation of Modern Algebra" "Elementary Number Theory" and other books, it is better for you to flip first, which is helpful for you to understand this article. Don't be afraid, I will try to make the language more popular, I hope this article can become a stepping stone to learn ECC.

First, from the parallel line talk about.

Parallel lines, never intersect. No one doubted: but in modern times the conclusion was questioned. Will parallel lines intersect in far and far away places? No one has actually seen it. So "parallel lines, never intersect" is just the assumption (we think of the parallel axiom of junior high school learning, is not proved). Now that you can assume that parallel lines never intersect, you can assume that parallel lines intersect very far away. That is, parallel lines intersect at Infinity Point p∞ (Please close your eyes, imagine that the Infinity point p∞,p∞ is not very unreal, in fact, rather than the mathematical exercise of the abstract ability of people, rather than exercise human imagination). Give a diagram to help understand:



The advantage of having a p∞ point on a line is that all the lines intersect and there is only one intersection. This unifies the parallel and intersection of the lines. The point on the original plane is called the normal point for the difference from the Infinity point.
Here are several properties of the Infinity Point.

▲ The Infinity Point on the straight line L can only have one. (from the definition can be directly derived)

▲ a set of parallel lines on the plane has a common infinity point. (from the definition can be directly derived)

▲ any intersecting two straight lines on the plane l1,l2 have different infinity points. (otherwise L1 and L2 have a public infinity point P, then L1 and L2 have two intersection points a, p, so the assumption is wrong.) )

▲ All infinity points on the plane form an infinity line. (Imagine this line yourself)

▲ All infinity points on the plane and all the ordinary points constitute the projective plane.

Second, projective plane coordinate system

The projective plane coordinate system is an extension of the normal plane rectangular coordinate system (that is, the Cartesian coordinate system that we have learned at first). We know that the normal plane rectangular coordinate system does not design coordinates for infinity points, and cannot represent infinity points. In order to express the Infinity Point, the projective plane coordinate system is produced, and the projective plane coordinate system can also represent the old common point (mathematics is also "backward compatible").



We make the following modifications to the coordinates of point A in the normal plane rectangular coordinate system (X,Y):

Order x=x/z, y=y/z (z≠0); then point A can be expressed as (x:y:z).

It becomes a coordinate point with three parameters, which establishes a new coordinate system for the points on the plane.

Example 2.1: Find the coordinates of the point (1,2) under the new coordinate system.

Solution: ∵x/z=1, y/z=2 (z≠0) ∴x=z,y=2z∴ coordinates (Z:2Z:Z), z≠0. namely (1:2:1) (2:4:2) (1.2:2.4:1.2), such as (z:2z:z), z≠0 coordinates, are (1,2) in the new coordinate system coordinates.

We can also get the equation of the line ax+by+cz=0 (think about why?) Tip: The general linear equation under normal plane rectangular coordinate system is ax+by+c=0. Can the new coordinate system represent infinity? Let's just think about where the infinity point is. According to the knowledge in the previous section, we know that the Infinity Point is the intersection of two parallel lines. So, how do you find the intersection coordinates of two lines? This is the knowledge of junior high school, is the two straight lines corresponding to the equation of the solution. The equations for parallel lines are:

ax+by+c1z =0; ax+by+c2z =0 (C1≠C2);

Why Hint: can be considered from the slope, because the parallel line slope is the same;

The two equation is set up and solved. There are c2z= c1z=-(Ax+by), ∵c1≠c2∴z=0∴ax+by=0;
So the infinity point is this form (x:y:0) represents. Note that the usual point is z≠0, the Infinity Point is z=0, so the equation for the Infinity line corresponds to z=0.

Example 2.2: Find the Infinity point where parallel lines l1:x+2y+3z=0 and l2:x+2y+z=0 intersect.
Solution: Because L1∥L2 so have z=0, x+2y=0, so coordinates for ( -2y:y:0), y≠0. That is ( -2:1:0) ( -4:2:0) ( -2.4:1.2:0), such as ( -2y:y:0), y≠0 coordinates, all represent this infinity point.

It seems that the new coordinate system can represent all the points on the projective plane, and we call this coordinate system that can represent all the points on the projective plane called the projective plane coordinate systems.


Practice:
1. To find the coordinates of point A (2,4) in the projective plane coordinate system.
2, to find the point in the projective plane coordinate system (4.5:3:0.5), in the normal plane rectangular coordinate system coordinates.
3. Find the coordinates of the Infinity point on the line x+y+z=0.
4, Judgment: The line ax+by+cz=0 on the Infinity Point and Infinity Line and straight line ax+by=0 intersection, whether it is the same point?


Three, Elliptic curve

In the previous section, we established the projective plane coordinate system, in which we set up the elliptic curve equation under this coordinate system. As we know, the curves in the coordinates can be represented by equations (e.g., the unit circle equation is x2+y2=1). Elliptic curves are curves, and natural elliptic curves have equations.

Definition of elliptic curve:
An elliptic curve satisfies the equation on the projective plane
Y2z+a1xyz+a3yz2=x3+a2x2z+a4xz2+a6z3----------------[3-1]
, and each point on the curve is nonsingular (or smooth).

Definition Detailed:

▲Y2Z+A1XYZ+A3YZ2 = x3+a2x2z+a4xz2+a6z3 is the Weierstrass equation (Weierstrass, Karl Theodor Wilhelm weierstrass,1815-1897) and is a homogeneous equation.

▲ The shape of the elliptic curve is not elliptical. Just because the description equation of the elliptic curve is similar to the equation for calculating the circumference of an ellipse (the equation for calculating the circumference of the ellipse, I have not seen it, and the integral of the elliptic line (set density 1) is not. Who knows this equation, please tell me ah ^_^), hence the name.

Let's take a look at what the elliptical curve looks like.





▲ the so-called "not singular" or "smooth", in mathematics refers to any point on the curve of the partial derivative FX (x,y,z), Fy (X,y,z), Fz (x,y,z) can not be 0 at the same time. If you have not studied advanced mathematics, you can understand the word, that is, to satisfy any point of the equation there are tangents.

The following two equations are not elliptic curves, although they are the form of the equation [3-1].




Because they have no tangents at (0:0:1) point (i.e. origin).

▲ There is an infinity point o∞ (0:1:0) on the elliptic curve, because this point satisfies the equation [3-1].

Know the infinity point on the elliptic curve. We can put the elliptic curve in the normal plane rectangular coordinate system. Because the ordinary plane rectangular coordinate system is only less infinitely farther than the projective plane coordinate system. In the ordinary plane rectangular coordinate system, we find the curve equation of all the ordinary points on the elliptic curve, plus the Infinity Point o∞ (0:1:0), does it constitute an elliptic curve?

We set x=x/z, y=y/z into the equation [3-1] to get:
y2+a1xy+a3y = X3+a2x2+a4x+a6-------------------------[3-2]

In other words, a smooth curve satisfying the equation [3-2] plus an infinity point o∞ is formed to form the elliptic curve. In order to facilitate operation, formulation, and understanding, the future elaboration of elliptic curves will be mainly in the form of [3-2].

At the end of this section, we'll talk about the tangent slope of the ellipse curve.
It is known from the definition of elliptic curve that the elliptic curve is smooth, so the usual points on the elliptic curve have tangents. One of the most important parameters of a tangent is slope K.

Example 3.1: The slope K of the tangent of the normal point A (x,y) is obtained on the elliptic curve equation y2+a1xy+a3y=x3+a2x2+a4x+a6.
Solution: Order f (x,y) = Y2+a1xy+a3y-x3-a2x2-a4x-a6
To find a partial derivative
Fx (x,y) = A1y-3x2-2a2x-a4
Fy (x,y) = 2y+a1x +a3
The derivative is: F ' (x) =-Fx (x,y)/Fy (x,y) =-(A1Y-3X2-2A2X-A4)/(2y+a1x +a3)
= (3x2+2a2x+a4-a1y)/(2y+a1x +a3)
So k= (3x2+2a2x+a4-a1y)/(2y+a1x +a3)------------------------[3-3]

Do not understand the problem-solving process is not related, remember the conclusion [3-3] on it.


Practice:
1, the elliptic curve equation y2z=x3-xz2 and y2z=x3+xz2+z3 of the legend are converted into ordinary plane rectangular coordinate system equations.


Iv. addition on elliptic curves

In the previous section, we have seen an image of an elliptical curve, but the point and point seem to have no connection. Can we build an algorithm similar to the addition on the real axis? The gifted mathematician found this algorithm.

☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆
Since the introduction of the concept of group, ring and Domain in the mathematics of the recent century, the algebraic operation has reached a high degree of unification. Mathematicians, for example, sum up the main features of ordinary addition, and propose Gathen (also called abelian groups, or Abel groups) in the eyes of the group. The addition of the real number and the addition of the elliptic curve are no different. This may be the mathematical abstraction:). For the specific concepts of group and population, please refer to the Mathematics books in modern algebra.
☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆

Algorithm: Arbitrarily take the elliptic curve two points P,



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.