add verification for scalars
secp256k1_scalar_verify checks that scalars are reduced mod the group order
This commit is contained in:
@@ -99,4 +99,7 @@ static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_
|
||||
/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. Both *r and *a must be initialized.*/
|
||||
static void secp256k1_scalar_cmov(secp256k1_scalar *r, const secp256k1_scalar *a, int flag);
|
||||
|
||||
/** Check invariants on a scalar (no-op unless VERIFY is enabled). */
|
||||
static void secp256k1_scalar_verify(const secp256k1_scalar *r);
|
||||
|
||||
#endif /* SECP256K1_SCALAR_H */
|
||||
|
||||
Reference in New Issue
Block a user