Skip to content

Commit 6c0be85

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 fecf436 commit 6c0be85

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/group_impl.h

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ static const secp256k1_fe secp256k1_fe_const_b = SECP256K1_FE_CONST(0, 0, 0, 0,
6767
static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) {
6868
secp256k1_fe zi2;
6969
secp256k1_fe zi3;
70+
VERIFY_CHECK(!a->infinity);
7071
secp256k1_fe_sqr(&zi2, zi);
7172
secp256k1_fe_mul(&zi3, &zi2, zi);
7273
secp256k1_fe_mul(&r->x, &a->x, &zi2);

0 commit comments

Comments
 (0)