![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
Go to the source code of this file.
Macros | |
| #define | SECP256K1_G_ORDER_7 |
| #define | SECP256K1_G_ORDER_13 |
| #define | SECP256K1_G_ORDER_199 |
| #define | SECP256K1_G |
| Generator for secp256k1, value 'g' defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. | |
| #define | SECP256K1_B 7 |
Variables | |
| static const secp256k1_ge | secp256k1_ge_const_g = SECP256K1_G |
| #define SECP256K1_B 7 |
Definition at line 73 of file group_impl.h.
| #define SECP256K1_G |
Generator for secp256k1, value 'g' defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1.
Definition at line 38 of file group_impl.h.
| #define SECP256K1_G_ORDER_13 |
Definition at line 23 of file group_impl.h.
| #define SECP256K1_G_ORDER_199 |
Definition at line 29 of file group_impl.h.
| #define SECP256K1_G_ORDER_7 |
Definition at line 17 of file group_impl.h.
|
static |
|
static |
|
static |
Definition at line 989 of file group_impl.h.
|
static |
|
static |
Definition at line 890 of file group_impl.h.
|
static |
|
static |
Definition at line 143 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 116 of file group_impl.h.
|
static |
|
static |
|
static |
Definition at line 99 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 977 of file group_impl.h.
|
static |
|
static |
Definition at line 877 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 590 of file group_impl.h.
|
static |
Definition at line 526 of file group_impl.h.
|
static |
We need to calculate (rx,ry,rz) = (ax,ay,az) + (bx,by,1/bzinv). Due to secp256k1's isomorphism we can multiply the Z coordinates on both sides by bzinv, and get: (rx,ry,rz*bzinv) = (ax,ay,az*bzinv) + (bx,by,1). This means that (rx,ry,rz) can be calculated as (ax,ay,az*bzinv) + (bx,by,1), when not applying the bzinv factor to rz. The variable az below holds the modified Z coordinate for a, which is used for the computation of rx and ry, but not for rz.
Definition at line 653 of file group_impl.h.
|
static |
|
static |
|
static |
Definition at line 460 of file group_impl.h.
|
static |
For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity, Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p.
Having said this, if this function receives a point on a sextic twist, e.g. by a fault attack, it is possible for y to be 0. This happens for y^2 = x^3 + 6, since -6 does have a cube root mod p. For this point, this function will not set the infinity flag even though the point doubles to infinity, and the result point will be gibberish (z = 0 but infinity = 0).
Definition at line 495 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
Definition at line 440 of file group_impl.h.
|
static |
Definition at line 427 of file group_impl.h.
|
static |
|
static |
Definition at line 367 of file group_impl.h.
|
static |
|
static |
|
static |
Definition at line 72 of file group_impl.h.