Skip to content

Commit

Permalink
fixup! group: add gej_eq_var
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasnick committed Dec 5, 2022
1 parent 2acc763 commit a4b6070
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -3850,6 +3850,22 @@ void run_gej(void) {
test_gej_cmov(&a, &b);
test_gej_cmov(&b, &a);
}

/* Tests for secp256k1_gej_eq_var */
for (i = 0; i < count; i++) {
secp256k1_fe fe;
random_gej_test(&a);
random_gej_test(&b);
CHECK(!secp256k1_gej_eq_var(&a, &b));

b = a;
random_field_element_test(&fe);
if(secp256k1_fe_is_zero(&fe)) {
continue;
}
secp256k1_gej_rescale(&a, &fe);
CHECK(secp256k1_gej_eq_var(&a, &b));
}
}

void test_ec_combine(void) {
Expand Down

0 comments on commit a4b6070

Please sign in to comment.