This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
elliptic_curves [2025/06/17 15:02] – created transatoshi | elliptic_curves [2025/06/17 15:08] (current) – [Operations] transatoshi | ||
---|---|---|---|
Line 8: | Line 8: | ||
These are the relevant mathematical operations we can do on Elliptic-curve points. | These are the relevant mathematical operations we can do on Elliptic-curve points. | ||
- | Addition | + | === Addition |
+ | Given two points, we can add them to one another (or subtract) and the result would be a new point on the curve. | ||
Multiplication - Given a point, we can multiply it any number of times. | Multiplication - Given a point, we can multiply it any number of times. | ||
Addition | Addition | ||
Given three aligned points P, Q and R, their sum is always 0. We treat this as an inherent property of elliptic curves. | Given three aligned points P, Q and R, their sum is always 0. We treat this as an inherent property of elliptic curves. | ||
- | P + Q + R = 0 | + | '' |
We can then write it as: | We can then write it as: | ||
- | P + Q = -R | + | |
+ | '' | ||
So that adding the two points P and Q results in -R, the inverse of R. | So that adding the two points P and Q results in -R, the inverse of R. | ||
If we draw a line passing through P and Q, this line will cross a third point on the curve, R (so that P, Q and R are aligned). If we take the inverse of this point, which is simply the one symmetric to it about the x-axis, we have found the result of adding two curve points, P + Q. Let’s illustrate: | If we draw a line passing through P and Q, this line will cross a third point on the curve, R (so that P, Q and R are aligned). If we take the inverse of this point, which is simply the one symmetric to it about the x-axis, we have found the result of adding two curve points, P + Q. Let’s illustrate: | ||
- | . Multiplying point P by scalar k would simply require adding point P onto it self k times. This operation is easily demonstrated by assigning k=2 so that k*P = P+P. To illustrate how it would look like on the curve, we draw a tangent line. You can imagine that the line intersects three points, whereas two of them are P, such that: | We can’t multiply a point by another point, but we can multiply a point by a number (scalar). Multiplying point P by scalar k would simply require adding point P onto it self k times. This operation is easily demonstrated by assigning k=2 so that k*P = P+P. To illustrate how it would look like on the curve, we draw a tangent line. You can imagine that the line intersects three points, whereas two of them are P, such that: | ||
- | P + P = -R | + | '' |
- |  is as follows: | And more clearly, a public key (of private key k) is as follows: | ||
- | P = k*G | + | '' |
This is easy to compute. | This is easy to compute. | ||
But, if everybody knows points P and G, can they find out what k is? The answer is no; The difficulty of getting from one point to another is precisely the definition of the Elliptic curve discrete logarithm problem. | But, if everybody knows points P and G, can they find out what k is? The answer is no; The difficulty of getting from one point to another is precisely the definition of the Elliptic curve discrete logarithm problem. | ||
- | Secp256k1 | + | === Secp256k1 |
The specific Elliptic curve that Grin employs is rust-secp256k1 (y2 = x3 + 7) using Schnorr signature scheme. | The specific Elliptic curve that Grin employs is rust-secp256k1 (y2 = x3 + 7) using Schnorr signature scheme. | ||
+ |