Mathematics in blockchain (3)

blocksight 2021-04-23 20:24:21 阅读数:287

本文一共[544]字,预计阅读时长:1分钟~
mathematics blockchain

Write it at the front

As mentioned earlier, cryptography is the cornerstone of blockchain , No cryptography , Blockchain is a castle in the air , It's hard to exist . The cornerstone of cryptography is mathematics . In the last section, we introduced the equation of elliptic curve , This section mainly deals with some knowledge of number theory and addition operation on elliptic curve .

Groups and abelian groups

First, let's talk about the basis of group theory . A group in an algebra is simply a set of elements and operations defined on them . For example, all integers form a group , Operations include addition and so on . The set here uses G(group) Express , The set is going to be a group , Generally, the following properties should be satisfied :1. Sealing property : If a and b All belong to G aggregate , that a+b Also belong to G;

2. Associative law :(a+b)+c=a+(b+c)

3. There are unit elements ( In binary operations , A unit element is an element whose value is not changed by operation with any element , Take real numbers for example , The unit of multiplication is 1, The unit of addition is 0)O bring a+O=O+a=a ;

4. Every element has an inverse element , That is to say, for any element a There must be b bring a+b=O(O It's unit yuan ) .

A set satisfying the above four properties is called a group , There are also some special groups , Such as Abelian group (Abelian Group) Besides satisfying the basic properties of groups , It also satisfies the law of exchange, that is :a+b=b+a So Abelian group is also called Abelian group . According to these properties , We can know the set of integers Z It's an Abelian group , Set of natural numbers N But it's not a group , Because it doesn't satisfy the fourth property . Okay , The basic knowledge of group theory comes here first ( It seems simple , There are also many complex features that are temporarily omitted ). It should be noted that , Set elements in a group , It can be numbers , It can also be other types of elements , For example, resolving the midpoint of a set ( Coordinate form ) etc. .

Groups on elliptic curves

With the basic knowledge of groups , We can further define groups on elliptic curves in a similar way . Just now we said that the elements of a group can be of any type , A group element on an elliptic curve is a point on an elliptic curve The unit element is infinite, and the point is denoted as O( For infinity, please refer to the previous article Projective plane and elliptic curve ). Any point P The inverse of is this point about x Axisymmetric point . The addition of elliptic curve groups is also different from that of integers , Its additive definition can be described as : Given three collinear nonzero points P ,Q,R , Their sum is P+Q+R=O. The geometric meaning is : too 𝑃、𝑄 Make a straight line at two 𝐿, Intersect the elliptic curve at the third point , The point is about X The point of symmetry of the axis is what is sought 𝑅 spot . The addition of elliptic curve has a clear geometric meaning . As shown below :

 picture

Here are some exceptions :1 𝑂+𝑂=𝑂, For any 𝑃, Yes 𝑃+𝑂=𝑃;𝑂 See zero 2 𝑃=(𝑥,𝑦) The negative element of is about X The point of symmetry in −𝑃=(𝑥,−𝑦)( Not about the origin symmetry ),𝑃+(−𝑃)=𝑂, Can be seen as P And -P The line intersects the elliptic curve at infinity 3 Calculation 𝑃 spot (𝑃≠𝑂) Twice as much as , It's tangent to that point , Then take the intersection of tangent and elliptic curve 𝑆 About X The point of symmetry of the axis −𝑆, That is to say 2𝑃=𝑃+𝑃=−𝑆, obtain 2 The multiple value can be recursively reduced to several times .

It can be seen that , Point set of elliptic curve ( Including infinity O) And the addition operations defined above form an Abelian group : The unit is 𝑂 spot ,𝑃(𝑥,𝑦) The inverse element of is 𝑃(𝑥,−𝑦), Sealing property , Associativity and exchangeability are also obviously satisfied .

Algebraic operations of elliptic curve groups

Geometric interpretation is convenient to understand the meaning of elliptic curve point addition , Algebraic interpretation is easier to operate . Over the curve 𝑃(,) and 𝑄(,) At two o 'clock (𝑃 and 𝑄 It's not negative for each other ) Make a straight line , The problem of finding the third point of intersection with a curve can be easily described by algebraic methods .

That is to ask for :

 picture

Where the slope 𝑘=

image-20210423192340773

take (2) Plug in (1) It is easy to find the symmetry point of the third intersection by using the method of degree alignment , That is to say 𝑃,𝑄 The sum of the 𝑅(,) by :

=−−=−+𝑘(−) If P=Q, The sum of the two is the multiplication , Multiple points can be added repeatedly to get . for example 𝑃+𝑃=2𝑃=𝑅, When ≠0 when , Algebra is described as :

=−2

=(−)−

Come here , The operation of elliptic curve group elements in real number field is basically clear , But is it enough to implement encryption and decryption on elliptic curve ? The answer is not enough , But it's close . In the next section, we will introduce the group domain and operation of elliptic curve algorithm in cryptography .

Welcome to your attention , If you have any questions, please leave a message !

版权声明:本文为[blocksight]所创,转载请带上原文链接,感谢。 https://netfreeman.com/2021/04/20210423201642203o.html