paritytech / libsecp256k1

Pure Rust Implementation of secp256k1.
Apache License 2.0
176 stars 84 forks source link

Remove Eq derive for Jacobian for now #44

Closed sorpaas closed 4 years ago

sorpaas commented 4 years ago

This removes the derive of Eq on Jacobian. It is reported in #42 that it just doesn't work. Jacobian has a scale factor z, where values in Affine would be (x / z^2, y / z^3). If z is different, it may represent the same value with different xs and ys.

A proper Eq implementation in Jacobian may just be converting it to Affine and them do the comparison, but that is not cheap. Unless I figured out a better way, making the conversion explicit for library users, by just removing the Eq derive in Jacobian, may be the better idea.