Skip to content

Commit 3233817

Browse files
Verify that secp256k1_ge_set_gej_zinv does not operate on infinity.
a->x and a->y should not be used if the infinity flag is set.
1 parent 1e78c18 commit 3233817

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/group_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ static const secp256k1_fe secp256k1_fe_const_b = SECP256K1_FE_CONST(0, 0, 0, 0,
6262
static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) {
6363
secp256k1_fe zi2;
6464
secp256k1_fe zi3;
65+
VERIFY_CHECK(!a->infinity);
6566
secp256k1_fe_sqr(&zi2, zi);
6667
secp256k1_fe_mul(&zi3, &zi2, zi);
6768
secp256k1_fe_mul(&r->x, &a->x, &zi2);

0 commit comments

Comments
 (0)