In fact, before reaching this particular VERIFY_CHECK, we had already successfully passed through
VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
ensuring that f is not -m.
In fact, before reaching this particular VERIFY_CHECK, we had already successfully passed through
VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
ensuring that f is not -m.
642@@ -643,13 +643,12 @@ static void secp256k1_modinv32_var(secp256k1_modinv32_signed30 *x, const secp256
643
644 /* g == 0 */
645 VERIFY_CHECK(secp256k1_modinv32_mul_cmp_30(&g, len, &SECP256K1_SIGNED30_ONE, 0) == 0);
646- /* |f| == 1, or (x == 0 and d == 0 and |f|=modulus) */
647+ /* |f| == 1, or (x == 0 and d == 0 and f=modulus) */
micro-nit:
0 /* |f| == 1, or (x == 0 and d == 0 and f == modulus) */
Okay yes. All VERIFY_CHECKs are redundant in a sense, but this one is really covered by another VERIFY_CHECK already.
utACK e53ed2efebcca6483a511ac0d9f3162973d66dda
Just to be clear, this PR isn’t removing a redundant check, it is strengthening the existing check by removing a disjunctive clause.
Oh, right, I got this wrong. But I still think the change makes sense.
In fact, before reaching this particular VERIFY_CHECK, we had already successfully passed through
VERIFY_CHECK(secp256k1_modinv64_mul_cmp_62(&f, len, &modinfo->modulus, -1) > 0); /* f > -modulus */
ensuring that f is not -m.
utACK ef7ff03407fa79e7eab1b6771b77f72828e63636
(There seems to be some CI hiccup unrelated to this PR.)