Open tuxxy opened 4 years ago
@tuxxy Yeah looks like the current Eq
was a simple derive of Jacobian
struct. It has a scale factor z
, with different x
s and y
s might still represent the same value. I removed the flawed derive.
For now converting Jacobian to Affine and then do the comparison should be the way to go. Let me see if there could be better more efficient ways.
@sorpaas See here for a Solidity implementation of efficient Jacobian point comparison we wrote to use in our smart contracts. It should be helpful enough for your interest. :)
I've noticed that comparing Jacobian points doesn't seem to work very well. I discovered this after trying to compare
jacobian_basepoint_g == scalar_one * jacobian_basepoint_g
.The only way to get the comparison to succeed is to convert them to Affine via
Affine::from_gej
and then perform the comparison. It seems the library needs a proper Jacobian point comparison function implemented.