Skip to content

Commit 3a4f448

Browse files
committed
Assert field magnitude at control-flow join
1 parent 9fab425 commit 3a4f448

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ecmult_const_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ static int secp256k1_ecmult_const_xonly(secp256k1_fe* r, const secp256k1_fe *n,
373373
}
374374
}
375375

376+
SECP256K1_FE_VERIFY_MAGNITUDE(&g, 2);
377+
376378
/* Compute base point P = (n*g, g^2), the effective affine version of (n*g, g^2, v), which has
377379
* corresponding affine X coordinate n/d. */
378380
secp256k1_fe_mul(&p.x, &g, n);

0 commit comments

Comments
 (0)