Skip to content

Commit 9239447

Browse files
committed
Merge #1673: Assert field magnitude at control-flow join
3a4f448 Assert field magnitude at control-flow join (Peter.Dettman) Pull request description: ACKs for top commit: sipa: ACK 3a4f448 jonasnick: ACK 3a4f448 Tree-SHA512: b78b500458597104a1d76985b0b619886f6dc2a4b136ca7ee37823796c8920041459b5674985bb4e1cc93ee7be5a702f6a84f8e5ddd25b97da6babacf0f34c0e
2 parents 9fab425 + 3a4f448 commit 9239447

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)