Bitcoin source code study -- elliptic curve encryption methodsteemCreated with Sketch.

in #currency7 years ago (edited)

COINS the private key generated public key, the method of use is the elliptic curve cryptography.Elliptic curve cryptography is an asymmetric encryption method based on discrete logarithm problem, only from launch public key, private key from the public key inverse introduced the private key.This is a complicated encryption method, we can begin with a simple analogy.

Simple to understand
All profit on zhihu see a simple analogy
Look at a chestnut:
Xiao Ming attended elementary school second grade, will add, but not calculate division.Xiao Ming strangers big strong you are, what you think of a problem for him to do it, although he can understand the topic meaning but hard to do:
Uncle: "xiao Ming xiao Ming, come here, ask you, how much is 1 + 1?"
The university calls: "uncle, I'll be the kindergarten, is equal to 2."
Strong: "it does you a difficult, how much is 7 + 7?"
Ming: "slice, you when people chew a pencil in class, to help the little red school homework is complete.Fingers were without number, such as in 14 bai."
Uncle: "line, have the vision, the uncle ask you again, a few 7 sum equal to 56?"
Ming: "......", silently took out a draft paper, pencils, fingers, toes, 10 minutes of depth calculation: 2 7 1 to 14, 3, 7 equals 21 or 4 7 equals 28...."Uncle, I calculate, is eight, right?"
Uncle: "good boy, not the letter to fail you.A few addition of 7 is equal to 864192?"
You say in your heart, in order to xiao Ming's computing power, is to the number of gears.
Ming: "uncle very fierce ah, I don't come out."
To test the little red see her tomorrow will be a few 7 equal to 56, not calculate I taught her, hey hey."
Same as the above example, the elliptic curve cryptosystem is also a password scheme based on addition order number is hard to find the problem.For elliptic curve cryptosystem, the elliptic curve is the basis of 7 cases, and the private key is basis of addition order number (the inside of the case 8), (7) to carry on the corresponding public key is bp order addition (8) the result (56).

The principle of elliptic curve cryptography
The definition of elliptic curve cryptography addition, familiar with us is not the same as the additive.Addition of elliptic curve on the geometry, the definition of the diagram below

Graph one: two different points together

Figure 2: two of the same points together
Two points addition results refers to both the attachment image and curve intersection point on the x axis.
If two points are the same, then take the tangent intersection points.The slope of the tangent available calculus is obtained.Even if the limit curve slope point for two integer coordinates can be obtained.
Why do you want to define such a complex additive?Is to make not "division" (calculated by the public key, private key).
Two points addition results refers to both the attachment image and curve intersection point on the x axis.
If two points are the same, then take the tangent intersection points.The slope of the tangent available calculus is obtained.Even if the limit curve slope point for two integer coordinates can be obtained.
Why do you want to define such a complex additive?Is to make not "division" (calculated by the public key, private key).

Elliptic curve of the sample
To generate a public key
K = k * G
K is the private key, G is involves, the income of the points on the curve k is a public key.Because of all the currency users involves are the same, a private key k multiplied by k G will get the same public key.The relationship between k and k is fixed, but only one-way operations, namely from k k.This is can put the COINS address derivative (K) Shared with anyone and won't reveal the secret key (K).
The following figure shows on the curve G, 2 G, 4 G geometric operations.

Tip is for the COINSlibsecp256k1To get the public key encryption library, calculation.

Sort:  

Go here https://steemit.com/@a-a-a to get your post resteemed to over 72,000 followers.

Congratulations @benmartinluther! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You published a post every day of the week

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!