Post
Topic
Board Development & Technical Discussion
Re: How to define which coordinate is negative?
by
ajeev
on 24/07/2022, 06:18:03 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.


is there any way to find private key range
first half below this(57896044618658097711785492504343953926418782139537452191302581570759080747168) or
second half above this(57896044618658097711785492504343953926418782139537452191302581570759080747168) using public key