Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/group.h
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
/** Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient | /** Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient | ||||
than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time | than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time | ||||
guarantee, and b is allowed to be infinity. If rzr is non-NULL this sets *rzr such that r->z == a->z * *rzr (a cannot be infinity in that case). */ | guarantee, and b is allowed to be infinity. If rzr is non-NULL this sets *rzr such that r->z == a->z * *rzr (a cannot be infinity in that case). */ | ||||
static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr); | static void secp256k1_gej_add_ge_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, secp256k1_fe *rzr); | ||||
/** Set r equal to the sum of a and b (with the inverse of b's Z coordinate passed as bzinv). */ | /** Set r equal to the sum of a and b (with the inverse of b's Z coordinate passed as bzinv). */ | ||||
static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv); | static void secp256k1_gej_add_zinv_var(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_ge *b, const secp256k1_fe *bzinv); | ||||
#ifdef USE_ENDOMORPHISM | |||||
/** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */ | /** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */ | ||||
static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a); | static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a); | ||||
#endif | |||||
/** Clear a secp256k1_gej to prevent leaking sensitive information. */ | /** Clear a secp256k1_gej to prevent leaking sensitive information. */ | ||||
static void secp256k1_gej_clear(secp256k1_gej *r); | static void secp256k1_gej_clear(secp256k1_gej *r); | ||||
/** Clear a secp256k1_ge to prevent leaking sensitive information. */ | /** Clear a secp256k1_ge to prevent leaking sensitive information. */ | ||||
static void secp256k1_ge_clear(secp256k1_ge *r); | static void secp256k1_ge_clear(secp256k1_ge *r); | ||||
/** Convert a group element to the storage type. */ | /** Convert a group element to the storage type. */ | ||||
Show All 23 Lines |