Skip to content

Commit 8e2a5fe

Browse files
correct assertion for secp256k1_fe_mul_inner
Based on the surrounding asserts, 112 bits before this line, and 61 bits after this line, this assertion should be 113 bits. Notably the commensurate line in secp256k1_fe_sqr_inner is correctly assert to be 113 bits.
1 parent 1f1bb78 commit 8e2a5fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/field_5x52_int128_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t
100100
VERIFY_BITS(u0, 56);
101101
/* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
102102
secp256k1_u128_accum_mul(&c, u0, R >> 4);
103-
VERIFY_BITS_128(&c, 115);
103+
VERIFY_BITS_128(&c, 113);
104104
/* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
105105
r[0] = secp256k1_u128_to_u64(&c) & M; secp256k1_u128_rshift(&c, 52);
106106
VERIFY_BITS(r[0], 52);

0 commit comments

Comments
 (0)