snarkVM
snarkVM copied to clipboard
[Testnet3] Add `is_on_curve` check for `from_coordinates` call
Motivation
This PR checks that the short Weierstrass Jacobian affine element is on the curve when constructed via from_coordinates. This check is already done in the Twisted Edwards variant of from_coordinates.
Tracking PR: #957
I think we should also check subgroup membership here (and also in the TE case). If we know for certain that something is in the subgroup, then we should add a from_coordinates_unchecked method that omits the subgroup check.