Merge bitcoin-core/secp256k1#1764: group: Avoid using infinity field directly in other modules

2f73e5281d group: Avoid using infinity field directly in other modules (Tim Ruffing)

Pull request description:

  Minor refactoring to make the abstraction cleaner

ACKs for top commit:
  hebasto:
    ACK 2f73e5281d, I have reviewed the code and it looks OK.
  theStack:
    ACK 2f73e5281d

Tree-SHA512: eae5ad1ce81f491adb48ab1cbf04211f8d43e41255abcacc958fa3dcb1de5021707d56ed1b009a6f3f6c45cd8f20c1f2677891690a3c0a467fc7e064af2512a8
This commit is contained in:
merge-script
2026-01-06 10:12:53 +01:00
5 changed files with 25 additions and 28 deletions

View File

@@ -75,7 +75,7 @@ static void secp256k1_ecmult_odd_multiples_table(int n, secp256k1_ge *pre_a, sec
secp256k1_ge d_ge;
int i;
VERIFY_CHECK(!a->infinity);
VERIFY_CHECK(!secp256k1_gej_is_infinity(a));
secp256k1_gej_double_var(&d, a, NULL);
@@ -356,7 +356,7 @@ static void secp256k1_ecmult_strauss_wnaf(const struct secp256k1_strauss_state *
}
}
if (!r->infinity) {
if (!secp256k1_gej_is_infinity(r)) {
secp256k1_fe_mul(&r->z, &r->z, &Z);
}
}