@@ -2967,7 +2967,7 @@ static int check_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) {
29672967 secp256k1_fe an = * a ;
29682968 secp256k1_fe bn = * b ;
29692969 secp256k1_fe_normalize_weak (& an );
2970- return secp256k1_fe_equal_var (& an , & bn );
2970+ return secp256k1_fe_equal (& an , & bn );
29712971}
29722972
29732973static void run_field_convert (void ) {
@@ -2990,9 +2990,9 @@ static void run_field_convert(void) {
29902990 secp256k1_fe_storage fes2 ;
29912991 /* Check conversions to fe. */
29922992 CHECK (secp256k1_fe_set_b32_limit (& fe2 , b32 ));
2993- CHECK (secp256k1_fe_equal_var (& fe , & fe2 ));
2993+ CHECK (secp256k1_fe_equal (& fe , & fe2 ));
29942994 secp256k1_fe_from_storage (& fe2 , & fes );
2995- CHECK (secp256k1_fe_equal_var (& fe , & fe2 ));
2995+ CHECK (secp256k1_fe_equal (& fe , & fe2 ));
29962996 /* Check conversion from fe. */
29972997 secp256k1_fe_get_b32 (b322 , & fe );
29982998 CHECK (secp256k1_memcmp_var (b322 , b32 , 32 ) == 0 );
@@ -3149,7 +3149,7 @@ static void run_field_misc(void) {
31493149 CHECK (check_fe_equal (& q , & z ));
31503150 /* Test the fe equality and comparison operations. */
31513151 CHECK (secp256k1_fe_cmp_var (& x , & x ) == 0 );
3152- CHECK (secp256k1_fe_equal_var (& x , & x ));
3152+ CHECK (secp256k1_fe_equal (& x , & x ));
31533153 z = x ;
31543154 secp256k1_fe_add (& z ,& y );
31553155 /* Test fe conditional move; z is not normalized here. */
@@ -3174,7 +3174,7 @@ static void run_field_misc(void) {
31743174 q = z ;
31753175 secp256k1_fe_normalize_var (& x );
31763176 secp256k1_fe_normalize_var (& z );
3177- CHECK (!secp256k1_fe_equal_var (& x , & z ));
3177+ CHECK (!secp256k1_fe_equal (& x , & z ));
31783178 secp256k1_fe_normalize_var (& q );
31793179 secp256k1_fe_cmov (& q , & z , (i & 1 ));
31803180#ifdef VERIFY
@@ -3679,8 +3679,8 @@ static void ge_equals_ge(const secp256k1_ge *a, const secp256k1_ge *b) {
36793679 if (a -> infinity ) {
36803680 return ;
36813681 }
3682- CHECK (secp256k1_fe_equal_var (& a -> x , & b -> x ));
3683- CHECK (secp256k1_fe_equal_var (& a -> y , & b -> y ));
3682+ CHECK (secp256k1_fe_equal (& a -> x , & b -> x ));
3683+ CHECK (secp256k1_fe_equal (& a -> y , & b -> y ));
36843684}
36853685
36863686/* This compares jacobian points including their Z, not just their geometric meaning. */
@@ -3718,8 +3718,8 @@ static void ge_equals_gej(const secp256k1_ge *a, const secp256k1_gej *b) {
37183718 u2 = b -> x ;
37193719 secp256k1_fe_mul (& s1 , & a -> y , & z2s ); secp256k1_fe_mul (& s1 , & s1 , & b -> z );
37203720 s2 = b -> y ;
3721- CHECK (secp256k1_fe_equal_var (& u1 , & u2 ));
3722- CHECK (secp256k1_fe_equal_var (& s1 , & s2 ));
3721+ CHECK (secp256k1_fe_equal (& u1 , & u2 ));
3722+ CHECK (secp256k1_fe_equal (& s1 , & s2 ));
37233723}
37243724
37253725static void test_ge (void ) {
@@ -3787,7 +3787,7 @@ static void test_ge(void) {
37873787 /* Check Z ratio. */
37883788 if (!secp256k1_gej_is_infinity (& gej [i1 ]) && !secp256k1_gej_is_infinity (& refj )) {
37893789 secp256k1_fe zrz ; secp256k1_fe_mul (& zrz , & zr , & gej [i1 ].z );
3790- CHECK (secp256k1_fe_equal_var (& zrz , & refj .z ));
3790+ CHECK (secp256k1_fe_equal (& zrz , & refj .z ));
37913791 }
37923792 secp256k1_ge_set_gej_var (& ref , & refj );
37933793
@@ -3796,7 +3796,7 @@ static void test_ge(void) {
37963796 ge_equals_gej (& ref , & resj );
37973797 if (!secp256k1_gej_is_infinity (& gej [i1 ]) && !secp256k1_gej_is_infinity (& resj )) {
37983798 secp256k1_fe zrz ; secp256k1_fe_mul (& zrz , & zr , & gej [i1 ].z );
3799- CHECK (secp256k1_fe_equal_var (& zrz , & resj .z ));
3799+ CHECK (secp256k1_fe_equal (& zrz , & resj .z ));
38003800 }
38013801
38023802 /* Test gej + ge (var, with additional Z factor). */
@@ -3825,7 +3825,7 @@ static void test_ge(void) {
38253825 ge_equals_gej (& ref , & resj );
38263826 /* Check Z ratio. */
38273827 secp256k1_fe_mul (& zr2 , & zr2 , & gej [i1 ].z );
3828- CHECK (secp256k1_fe_equal_var (& zr2 , & resj .z ));
3828+ CHECK (secp256k1_fe_equal (& zr2 , & resj .z ));
38293829 /* Normal doubling. */
38303830 secp256k1_gej_double_var (& resj , & gej [i2 ], NULL );
38313831 ge_equals_gej (& ref , & resj );
@@ -3908,7 +3908,7 @@ static void test_ge(void) {
39083908 ret_set_xo = secp256k1_ge_set_xo_var (& q , & r , 0 );
39093909 CHECK (ret_on_curve == ret_frac_on_curve );
39103910 CHECK (ret_on_curve == ret_set_xo );
3911- if (ret_set_xo ) CHECK (secp256k1_fe_equal_var (& r , & q .x ));
3911+ if (ret_set_xo ) CHECK (secp256k1_fe_equal (& r , & q .x ));
39123912 }
39133913
39143914 /* Test batch gej -> ge conversion with many infinities. */
@@ -4148,8 +4148,8 @@ static void test_group_decompress(const secp256k1_fe* x) {
41484148 CHECK (!ge_odd .infinity );
41494149
41504150 /* Check that the x coordinates check out. */
4151- CHECK (secp256k1_fe_equal_var (& ge_even .x , x ));
4152- CHECK (secp256k1_fe_equal_var (& ge_odd .x , x ));
4151+ CHECK (secp256k1_fe_equal (& ge_even .x , x ));
4152+ CHECK (secp256k1_fe_equal (& ge_odd .x , x ));
41534153
41544154 /* Check odd/even Y in ge_odd, ge_even. */
41554155 CHECK (secp256k1_fe_is_odd (& ge_odd .y ));
@@ -4207,12 +4207,12 @@ static void test_pre_g_table(const secp256k1_ge_storage * pre_g, size_t n) {
42074207 CHECK (!secp256k1_fe_normalizes_to_zero_var (& dqx ) || !secp256k1_fe_normalizes_to_zero_var (& dqy ));
42084208
42094209 /* Check that -q is not equal to p */
4210- CHECK (!secp256k1_fe_equal_var (& dpx , & dqx ) || !secp256k1_fe_equal_var (& dpy , & dqy ));
4210+ CHECK (!secp256k1_fe_equal (& dpx , & dqx ) || !secp256k1_fe_equal (& dpy , & dqy ));
42114211
42124212 /* Check that p, -q and gg are colinear */
42134213 secp256k1_fe_mul (& dpx , & dpx , & dqy );
42144214 secp256k1_fe_mul (& dpy , & dpy , & dqx );
4215- CHECK (secp256k1_fe_equal_var (& dpx , & dpy ));
4215+ CHECK (secp256k1_fe_equal (& dpx , & dpy ));
42164216
42174217 p = q ;
42184218 }
@@ -4431,7 +4431,7 @@ static void run_point_times_order(void) {
44314431 secp256k1_fe_sqr (& x , & x );
44324432 }
44334433 secp256k1_fe_normalize_var (& x );
4434- CHECK (secp256k1_fe_equal_var (& x , & xr ));
4434+ CHECK (secp256k1_fe_equal (& x , & xr ));
44354435}
44364436
44374437static void ecmult_const_random_mult (void ) {
0 commit comments