![]() |
Bitcoin Core
25.99.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. More... | |
#define | SECP256K1_B 7 |
Variables | |
static const secp256k1_ge | secp256k1_ge_const_g = SECP256K1_G |
static const secp256k1_fe | secp256k1_fe_const_b = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, SECP256K1_B) |
#define SECP256K1_B 7 |
Definition at line 70 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 35 of file group_impl.h.
#define SECP256K1_G_ORDER_13 |
Definition at line 20 of file group_impl.h.
#define SECP256K1_G_ORDER_199 |
Definition at line 26 of file group_impl.h.
#define SECP256K1_G_ORDER_7 |
Definition at line 14 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
Definition at line 94 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 77 of file group_impl.h.
|
static |
Definition at line 205 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 409 of file group_impl.h.
|
static |
Definition at line 349 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 466 of file group_impl.h.
|
static |
|
static |
|
static |
Definition at line 290 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 322 of file group_impl.h.
|
static |
|
static |
|
static |
|
static |
Definition at line 264 of file group_impl.h.
|
static |
|
static |
Definition at line 242 of file group_impl.h.
|
static |
Definition at line 198 of file group_impl.h.
|
static |
Definition at line 75 of file group_impl.h.
|
static |
Definition at line 69 of file group_impl.h.