snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

[Testnet3] Add `is_on_curve` check for `from_coordinates` call

Open raychu86 opened this issue 3 years ago • 1 comments

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

raychu86 avatar Aug 12 '22 04:08 raychu86

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.

Pratyush avatar Aug 15 '22 17:08 Pratyush