Add _fe_normalizes_to_zero method
This commit is contained in:
committed by
Pieter Wuille
parent
d7174edf5f
commit
eed599dd72
@@ -64,12 +64,12 @@ static int secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen) {
|
||||
return secp256k1_fe_set_b32(r, tmp);
|
||||
}
|
||||
|
||||
/* TODO Not actually var currently */
|
||||
SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
|
||||
secp256k1_fe_t na;
|
||||
secp256k1_fe_negate(&na, a, 1);
|
||||
secp256k1_fe_add(&na, b);
|
||||
secp256k1_fe_normalize_var(&na);
|
||||
return secp256k1_fe_is_zero(&na);
|
||||
return secp256k1_fe_normalizes_to_zero(&na);
|
||||
}
|
||||
|
||||
static int secp256k1_fe_sqrt_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
|
||||
|
||||
Reference in New Issue
Block a user