Hello,
Please correct me if I am fundamentally wrong, but recently I was wondering about one thing - is it possible to somehow compare points from two different representations? We know that theoretically Affine point (xa,ya) could come from operations on Jacobian point (xj/zj^2, yj/zj^3). On the other hand, Jacobian (x,z,y) from Affine would be just (xa, ya, 1).
I would like to compare Affine point (AP) with a given Jacobian point (JP) - or at least exclude possibility that JP would be converted into given AP.
In other words:
https://github.com/bitcoin-core/secp256k1/blob/master/src/secp256k1.cWe have JP (secp256k1_gej) and to receive "well-known" public key (through secp256k1_ge), we must launch launch:
secp256k1_ec_pubkey_create_helper + secp256k1_pubkey_save
which basically is (forget variables names, operations are important):
secp256k1_fe_sqr(&zi2, zi);
secp256k1_fe_mul(&zi3, &zi2, zi);
secp256k1_fe_mul(&r->x, &a->x, &zi2);
secp256k1_fe_mul(&r->y, &a->y, &zi3);
secp256k1_fe_normalize_var(&ge->x);
secp256k1_fe_normalize_var(&ge->y);
secp256k1_fe_get_b32(pubkey->data, &ge->x);
secp256k1_fe_get_b32(pubkey->data + 32, &ge->y);
Now, the question is:
Is there any step where I may stay (or operations I may skip) in that path (Jp->AP pubkey), if for a given generated Jacobian Point (secp256k1_gej) I want to exclude/ (or confirm) possibility that JP will == known public key? If I convert my pubkey into secp256k1_ge, which is basically (x, y, 1), may I compare it with unprocessed secp256k1_gej ?