Post
Topic
Board Development & Technical Discussion
Re: How to define which coordinate is negative?
by
ajeev
on 10/01/2023, 08:41:09 UTC
pk1 = '02C6047F9441ED7D6D3045406E95C07CD85C778E4B8CEF3CA7ABAC09B95C709EE5'#private key=2
pk2 = '022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4'#private key=5


P = pub2point(pk1)
Q = pub2point(pk2)

eq = P.x == Q.x
lt = P.x < Q.x
R = eq or lt
print(R)

>>>>>>>.false


Q is big because it is private key 5 but im getting false output


Since you know the private keys, and you want to sort by private keys, then you must compare the private keys.

You should only compare X points if you want to sort by public key. But since you want to compare by private keys, you have to compare the private keys themselves.

There is no way to order a list of private keys using only their public keys - it is like trying to order a list of strings based on their SHA256 hashes - that is impossible.



hi can you please tell me how to find the publickey of btc address