Vernacular elliptic curve cryptography

Elliptic curve cryptography is the next generation of public key cryptography, which has significantly improved security compared to previous public key cryptography systems such as RSA and Diffe-Hellman. Elliptic curve cryptography is currently one of the most powerful cryptographic algorithms widely used, but there are not many developers who really understand its working principles.

Block chain development tutorial link: Ethernet Square | bitcoin | EOS | Tendermint | Hyperledger Fabric | Omni / USDT | Ripple

1. Elliptic curve equation

Insert picture description here

An elliptic curve is composed of a series of points that satisfy certain mathematical equations. An elliptic curve equation looks like this:

Y² = X³ + ax + b

There are also other elliptic curve expressions. Technically, an elliptic curve is composed of points that satisfy the above equations. Some of its inherent characteristics make it very suitable for cryptography.

The curve above has many interesting characteristics, one of which is horizontal symmetry. The symmetry point of any point on the elliptic curve with respect to the X axis is still on the curve. Another more interesting feature is that there are no more than 3 intersections between any straight line that is not perpendicular to the X axis and the elliptic curve. Suppose we choose two points on the elliptic curve to draw a straight line, then this straight line will intersect the elliptic curve at the third point.

Think of this process as a billiard game. If you shoot a ball at point A to point B, when the ball hits the curve, it will bounce downward (if the ball is above the X axis) or upward (if the ball is above the X axis). Below the X axis), just like the animation below:

Insert picture description here

If the movement of the billiard ball on these two points is called dot operation, then any two points on the elliptic curve can be dot operation:

A dot B = C
A dot A = B
A dot C = D

Now, if you have two points, an initial point and the end point after you do the dot operation n times, then when you only know the end point and the initial point, it is very difficult to find out exactly what n is. .

Suppose a person plays billiards in the house by himself. He can hit the ball over and over again according to the above rules. After a while, another person sees the current position of the billiard ball. Even if he knows the rules of the game and the position of the ball at the beginning, he cannot Determine how many times the ball has been hit. The only way is to replay the game yourself and try to get the ball to the same position.

Insert picture description here

2. Prime elliptic curve

The elliptic curve we saw is a simplified version, which is very helpful for explaining the working principle of elliptic curve, but there is still a big gap with the curve actually used in cryptography.

Insert picture description here

To use elliptic curve in cryptography, you need to first limit the value range to a finite interval. Just like in RSA, we only allow integers in a fixed interval. If the value exceeds the maximum value of this interval, the modulus is taken. If we choose a prime number as the interval maximum value, then this elliptic curve is called a prime number curve and has incredible cryptographic properties.

Insert picture description here

Although the above picture does not look like a curve in the traditional sense, it is indeed the result of the original elliptic curve being limited to the specified interval and rounding. You can see that the symmetry about the X axis still exists.

Back to our billiard game, the previous dot operation is still applicable to this discrete curve. The linear equation on the curve still has the same value. What is even more exciting is that the dot operation on the discrete curve can be calculated more efficiently. When the straight line connecting two points hits the boundary, it will turn to the other side and continue to move forward until it hits a point:
Insert picture description here

With these new tools, we can perform some cryptographic operations. Suppose you have a message, set it to the x coordinate, and then find the y coordinate of the corresponding point on the curve.

The output is: (71, 6), “-”, (78, 44), (80, 4), 64, 24)

The discrete logarithm of elliptic curve is a difficult problem, which is the foundation of elliptic curve cryptography. Although there have been three centuries of mathematical research, no algorithm has been found to be more effective than the original solution. Unlike prime number decomposition, based on current mathematical knowledge, there is no shortcut that can narrow the gap in threshold functions. This means that it is far more difficult to solve the discrete logarithm of the elliptic curve than the prime number decomposition for the same value, which also means that the elliptic curve cryptography system is more difficult to break than RSA or Diffe-Hellman.

With elliptic curve cryptography, you can get the same level of security with a smaller key. Small keys are becoming more and more important, especially today more and more cryptographic calculations are run on less powerful devices such as mobile phones and IOT devices.


Original link: Elliptic Curve Cryptography Discipline Generalization-Huizhi Net

Guess you like

Origin blog.csdn.net/shebao3333/article/details/106801551