Add secp256k1_fe_is_square_var function
The implementation calls the secp256k1_modinvNN_jacobi_var code, falling back to computing a square root in the (extremely rare) case it failed converge.
This commit is contained in:
@@ -135,4 +135,7 @@ static void secp256k1_fe_half(secp256k1_fe *r);
|
||||
* magnitude set to 'm' and is normalized if (and only if) 'm' is zero. */
|
||||
static void secp256k1_fe_get_bounds(secp256k1_fe *r, int m);
|
||||
|
||||
/** Determine whether a is a square (modulo p). */
|
||||
static int secp256k1_fe_is_square_var(const secp256k1_fe *a);
|
||||
|
||||
#endif /* SECP256K1_FIELD_H */
|
||||
|
||||
Reference in New Issue
Block a user