Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/field.h
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len); | static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len); | ||||
/** Convert a field element to the storage type. */ | /** Convert a field element to the storage type. */ | ||||
static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a); | static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a); | ||||
/** Convert a field element back from the storage type. */ | /** Convert a field element back from the storage type. */ | ||||
static void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a); | static void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a); | ||||
/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ | /** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. Both *r and *a must be initialized.*/ | ||||
static void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag); | static void secp256k1_fe_storage_cmov(secp256k1_fe_storage *r, const secp256k1_fe_storage *a, int flag); | ||||
/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */ | /** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. Both *r and *a must be initialized.*/ | ||||
static void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag); | static void secp256k1_fe_cmov(secp256k1_fe *r, const secp256k1_fe *a, int flag); | ||||
#endif /* SECP256K1_FIELD_H */ | #endif /* SECP256K1_FIELD_H */ |