Skip to content

Commit 1027135

Browse files
Return temporaries to being unsigned in secp256k1_fe_sqr_inner
These temporaries seem to been inadvertently changed to signed during a refactoring. Generally, bit shifting is frowned upon for signed values.
1 parent c891c5c commit 1027135

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
@@ -159,7 +159,7 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t
159159
SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t *a) {
160160
secp256k1_uint128 c, d;
161161
uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
162-
int64_t t3, t4, tx, u0;
162+
uint64_t t3, t4, tx, u0;
163163
const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
164164

165165
VERIFY_BITS(a[0], 56);

0 commit comments

Comments
 (0)