Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: indaxis on January 11, 2022, 08:57:08 AM



Title: How to define which coordinate is negative?
Post by: indaxis on January 11, 2022, 08:57:08 AM
Good day

I have 2 points:

P1=
14191455994323772597241090149390194844060070267542625335030526433746129697775
56665880437360020920156314485129600171712953656147713075817973497803847118302

P2=
14191455994323772597241090149390194844060070267542625335030526433746129697775
59126208799956174503414670523558307681557031009492850963639610510104987553361

Both points have the same X, and different Y
One of this points is positive (x,y), and another is negative (x,-y)

If we add this points with each other we get zero.

So how to define which coordinate is negative and which is positive? Any solution? Advices?  ???

Thank you!


Title: Re: How to define which coordinate is negative?
Post by: o_e_l_e_o on January 11, 2022, 09:18:54 AM
In reality, neither coordinate is negative. Both y coordinates are points on the secp256k1 curve, which is defined modulo p, and so there are no negative coordinates, as anything negative simply loops round mod p and becomes positive again. And so we use even and odd to differentiate the two y coordinates.


Title: Re: How to define which coordinate is negative?
Post by: brainless on January 11, 2022, 05:50:12 PM
In reality, neither coordinate is negative. Both y coordinates are points on the secp256k1 curve, which is defined modulo p, and so there are no negative coordinates, as anything negative simply loops round mod p and becomes positive again. And so we use even and odd to differentiate the two y coordinates.

lets guess
P1 is Even
P2 is Odd

post your guess and lets get answer in private key from creator
:)


Title: Re: How to define which coordinate is negative?
Post by: indaxis on January 11, 2022, 06:14:27 PM

lets guess
P1 is Even
P2 is Odd

post your guess and lets get answer in private key from creator
:)

it was first what i checked.  It is not correlated (


Title: Re: How to define which coordinate is negative?
Post by: brainless on January 11, 2022, 07:14:33 PM

lets guess
P1 is Even
P2 is Odd

post your guess and lets get answer in private key from creator
:)

it was first what i checked.  It is not correlated (

PK is 96, but i try to test how much participant , no one interested, as they loose hopes, maximum newbie apear and start trying brute force or kanagroo, vantisearch etc
Enjoy your time


Title: Re: How to define which coordinate is negative?
Post by: ssxb on January 27, 2022, 06:08:46 AM

lets guess
P1 is Even
P2 is Odd

post your guess and lets get answer in private key from creator
:)

it was first what i checked.  It is not correlated (

PK is 96, but i try to test how much participant , no one interested, as they loose hopes, maximum newbie apear and start trying brute force or kanagroo, vantisearch etc
Enjoy your time

@brainless remember me  :o

as far as I know with calculation, you guys cant determine but here is silly answer if you guys start mapping it from center of curve to each side (positive & negative side / or call it even or odd) perhaps in age of Altron you will know what point is that ~  i mean positive or negative

example

curve centers : 

0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63

now if you start mapping points, you will get  :-\

....
025699b93fc6e1bd29e09a328d657a607b4155b61a6b5fcbedd7c12df7c67df8f5
03c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63

02c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
035699b93fc6e1bd29e09a328d657a607b4155b61a6b5fcbedd7c12df7c67df8f5
....

like this points will shrink back toward their min or max value with filling of 02 or 03

until

0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
....
0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63

....
0379be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

and only known way to know which point is on which side is "non" hahaha.

chill and happy brute force while calling your luck.


Title: Re: How to define which coordinate is negative?
Post by: cixegz on January 31, 2022, 08:50:16 AM

0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63

now if you start mapping points, you will get  :-\

....
025699b93fc6e1bd29e09a328d657a607b4155b61a6b5fcbedd7c12df7c67df8f5
03c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63

02c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
035699b93fc6e1bd29e09a328d657a607b4155b61a6b5fcbedd7c12df7c67df8f5
....

like this points will shrink back toward their min or max value with filling of 02 or 03

until

0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
....
0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63

....
0379be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

and only known way to know which point is on which side is "non" hahaha.

chill and happy brute force while calling your luck.


my idea is random publickey x,y to guess for range like this ... 3ffffffffffffffffff : 7ffffffffffffffffff, 5ffffffffffffffffff:6ffffffffffffffffff, 1fffffffffffff:3ffffffffffffffffffffffffff etc....

i know this publickey privatekey range,any one find this publickey range
px: 1a1fd15fce078234aa292fc024178056bf006433c9b4bd208f59eb4c9efec95b   py: a18af1fe46980989d3ff75bf9601121151ef46e2cfab8999408319ce8f3be725

any python code for 200% guess range for random public keys...

any update contribute .. share thinkeasy123@protonmail.com

Edit:
this is rich wallet 031277e88390c528ef8efac312d77d0566f756ed54046b8ba557a15b088b86e20b guess the range
x: 1277e88390c528ef8efac312d77d0566f756ed54046b8ba557a15b088b86e20b y: ea6d50425d69b880c1c2b7b18d93a78b793d80a3b852476d35685a74f9211e4d


Title: Re: How to define which coordinate is negative?
Post by: cixegz on February 10, 2022, 04:18:24 AM
let me give it a try:
still open to correction

Code:
class point_addition:
  def __init__ (self,x,y,a,b):
    #y**2 = x***3+a*x+b
    #x and y co-ordinate needed for calculation
    self.a=a
    self.b=b
    self.x=x
    self.y=y
     if -y**2 != x***3+ a*x + b:
      return ('({}{}) has negative co-ordinate').format(x,y)
    elif y**2 != x***3+ a*x + b:
       return ('({}{}) has positive co-ordinate').format(x,y)
    
    p1 = x (0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63)

    p2 = y (0200000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63)
    print(x,y)

    still a baby coder I wish to get correction  

how to run
what is input,explain please message me reply thinkeasy123@protonmail.com


Title: Re: How to define which coordinate is negative?
Post by: dbc23 on February 10, 2022, 06:29:27 PM
how to run
what is input,explain please message me reply thinkeasy123@protonmail.com
I'm yet to get a comment if it was actually what @ op expected but in the main time all I did was use elliptic curve to try getting both coordinate. Using the general elliptic curve. I assumed since both has the same x coordinate and a different y coordinate I could instantiate the coordinates then return a value of its positive else I get a negative output


Title: Re: How to define which coordinate is negative?
Post by: ajeev on July 21, 2022, 06:11:51 AM

lets guess
P1 is Even
P2 is Odd

post your guess and lets get answer in private key from creator
:)

it was first what i checked.  It is not correlated (

PK is 96, but i try to test how much participant , no one interested, as they loose hopes, maximum newbie apear and start trying brute force or kanagroo, vantisearch etc
Enjoy your time

hi @brainless

is there any way to guess private key odd or even using public key


Title: Re: How to define which coordinate is negative?
Post by: NotATether on July 21, 2022, 07:21:26 AM
hi @brainless

is there any way to guess private key odd or even using public key

Seeing this question here and that you PM'ed me this question almost verbatim, I decided to write my answer here for the public's benefit.

The short answer is no.

The long answer is that the public key can not be used to guess any bytes of the private key (including the one at the end which we tend to call "parity") using only cryptographic primitives. You need to get this information from side-channels, i.e. CPU frequency analysis when a point is being multiplied by that private key - and it requires physical access to the hardware that's performing the EC multiplication, usually the one that's running the wallet.


Title: Re: How to define which coordinate is negative?
Post by: o_e_l_e_o on July 21, 2022, 10:26:38 AM
hi @brainless

is there any way to guess private key odd or even using public key
No. If there was, you could calculate the entire private key and bitcoin (and elliptic curve multiplication) would be entirely broken.

Take public key K which corresponds to private key k. With G being the generator point, then k*G = K.

If you can work out whether k is odd or even knowing only K, then you can work out whether the last bit of k is 1 or 0. You can then take the multiplicative inverse of 2 of K, which has the effect of halving your private key, which shifts all the bits one position to the right (you would have to do K+(-G) first if the last bit was 1, so you are halving an even number). You can then work out whether the new k is odd or even knowing your new K. You can then repeat this process for the entire length of the private key until you know the full key and then spend the coins.


Title: Re: How to define which coordinate is negative?
Post by: wedom on July 21, 2022, 05:24:53 PM

hi @brainless

is there any way to guess private key odd or even using public key

Unlike many, I think it's possible. The impossibility is not mathematically proven. I think a solution either already exists or will be found in the future. A matter of time.
I am continuing my research in this direction.
Whether I will be able to solve it is not known, but I am sure that there will be a solution in the future.


Title: Re: How to define which coordinate is negative?
Post by: ajeev on July 23, 2022, 05:53:57 AM
if we consider the entire points group like this:
from lowest possible X
(1)X:0000000000000000000000000000000000000000000000000000000000000001 Y:4218f20ae6c646b363db68605822fb14264ca8d2587fdd6fbc750d587e76a7ee
(2)X:0000000000000000000000000000000000000000000000000000000000000001 Y:bde70df51939b94c9c24979fa7dd04ebd9b3572da7802290438af2a681895441
(3)X:0000000000000000000000000000000000000000000000000000000000000002 Y:66fbe727b2ba09e09f5a98d70a5efce8424c5fa425bbda1c511f860657b8535e
(4)X:0000000000000000000000000000000000000000000000000000000000000002 Y:990418d84d45f61f60a56728f5a10317bdb3a05bda4425e3aee079f8a847a8d1
...
to highest possible X
(.)X:fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2c Y:0e994b14ea72f8c3eb95c71ef692575e775058332d7e52d0995cf8038871b67d
(.)X:fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2c Y:f166b4eb158d073c146a38e1096da8a188afa7ccd281ad2f66a307fb778e45b2

all points with lowest Y-coordinate are odd and with highest are even. and if we could calculate exact position of point in this group there could be a correlation
to secp256k1 subgroup S={G,2G,3G,...,(N-1)G}.
but secp256k1 P-N is 432420386565659656852420866390673177326 more than 2^128 since not all values of P can become X-coordinate.

Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424
P = 115792089237316195423570985008687907853269984665640564039457584007908834671663
N = 115792089237316195423570985008687907852837564279074904382605163141518161494337
#print(P-N)432420386565659656852420866390673177326
    #2^128 340282366920938463463374607431768211456
#input()
starting_x = 0x0
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
beta  = 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee
beta2 = 0x851695d49a83f8ef919bb86153cbcb16630fb68aed0a766a3ec693d68e6afa40

def oncurve(x,y): # Checks if point satifies x^3 +7 = y^2 , mod P
  x = (x*x*x+7) % p
  y = (y*y) % p
  return x==y
  
while starting_x < p:
    x = starting_x
    ysquared = ((x*x*x+7) % p)      
    y1 = pow(ysquared, (p+1)//4, p)
    y2 = (y1 * -1) % p
    if (y1**2) % p == (x**3 + 7) % p:
        print(f"Secp256k1 True X Coordinate: {hex(x)[2:].zfill(64)} [{x}]")
        print(f'{hex(x)[2:].zfill(64)}:{hex(y1)[2:].zfill(64)}')
        print( oncurve( x,int(hex(y1)[2:].zfill(64), 16)) )
        print(f'{hex(x)[2:].zfill(64)}:{hex(y2)[2:].zfill(64)}')
        print( oncurve( x,int(hex(y2)[2:].zfill(64), 16)) )
        print(hex((x*beta) % p)[2:].zfill(64))
        print(hex((x*beta2) % p)[2:].zfill(64))
        print('---------------------------------------------------------------------------------------------------------------------------------')
    starting_x += 1

hi is there any way to find private key range using public key

pk1 = '022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4'

pk2 = '02C6047F9441ED7D6D3045406E95C07CD85C778E4B8CEF3CA7ABAC09B95C709EE5'

pk1<=pk2
false


any python code useful for me
im getting below error

typeerror ' ' not supported between instances of 'point' and 'point'


Title: Re: How to define which coordinate is negative?
Post by: NotATether on July 23, 2022, 11:08:40 AM
all points with lowest Y-coordinate are odd and with highest are even. and if we could calculate exact position of point in this group there could be a correlation
to secp256k1 subgroup S={G,2G,3G,...,(N-1)G}.
but secp256k1 P-N is 432420386565659656852420866390673177326 more than 2^128 since not all values of P can become X-coordinate.

The last part effectively rules out dividing the Y by 2 and discarding the fractional part, to attempt to discern the subranges of X (e.g. between 0,2^64-1 and 2^64,2^128-1)

hi is there any way to find private key range using public key

pk1 = '022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4'

pk2 = '02C6047F9441ED7D6D3045406E95C07CD85C778E4B8CEF3CA7ABAC09B95C709EE5'

pk1<=pk2
false


any python code useful for me
im getting below error

typeerror ' ' not supported between instances of 'point' and 'point'

Are you sure you are using this code smapl, because this error message looks funny - there are no point types in this code.


Title: Re: How to define which coordinate is negative?
Post by: ajeev on July 23, 2022, 12:26:38 PM
all points with lowest Y-coordinate are odd and with highest are even. and if we could calculate exact position of point in this group there could be a correlation
to secp256k1 subgroup S={G,2G,3G,...,(N-1)G}.
but secp256k1 P-N is 432420386565659656852420866390673177326 more than 2^128 since not all values of P can become X-coordinate.

The last part effectively rules out dividing the Y by 2 and discarding the fractional part, to attempt to discern the subranges of X (e.g. between 0,2^64-1 and 2^64,2^128-1)

hi is there any way to find private key range using public key

pk1 = '022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4'

pk2 = '02C6047F9441ED7D6D3045406E95C07CD85C778E4B8CEF3CA7ABAC09B95C709EE5'

pk1<=pk2
false


any python code useful for me
im getting below error

typeerror ' ' not supported between instances of 'point' and 'point'

Are you sure you are using this code smapl, because this error message looks funny - there are no point types in this code.



comparing two public key im trying to find which one big or small

is there any alternative way to do this ,already pm you my code

please help!


Title: Re: How to define which coordinate is negative?
Post by: NotATether on July 24, 2022, 05:30:42 AM
comparing two public key im trying to find which one big or small

is there any alternative way to do this ,already pm you my code

please help!

Well you should split up this operation

Code:
R = P <= Q

You should make it:

Code:
eq = P.x == Q.x
lt = P.x < Q.x
R = eq or lt

You cannot directly compare two Point classes. Read this page to understand why: https://crypto.stackexchange.com/questions/98189/how-to-prove-that-an-elliptic-curve-point-is-smaller-or-greater-than-half-of-the

Quote from: the answer in the link above
If there were a polynomial time solution[1] then this would provide a polynomial time solution to the elliptic curve discrete logarithm problem. We strongly believe this not to be the case.
...

[1] They are talking about a similar problem, where you find if the point is on the smaller half or bigger half of the private key range. But this discussion is why you cannot check two Point classes for Less Than - because their private keys are unknown.



To work around this, you should compare the X coordinates directly.

This will tell you if the X points are smaller or bigger, and allows you to order the public keys by characteristic P (instead of by private key order N).

P.S. I would appreciate it if you post the questions about the code inside this thread only, posting the same thing in the thread *and* in my PM mailbox is a bit annoying because I am already watching this thread.


Title: Re: How to define which coordinate is negative?
Post by: ajeev on July 24, 2022, 05:47:08 AM
comparing two public key im trying to find which one big or small

is there any alternative way to do this ,already pm you my code

please help!

Well you should split up this operation

Code:
R = P <= Q

You should make it:

Code:
eq = P.x == Q.x
lt = P.x < Q.x
R = eq or lt

You cannot directly compare two Point classes. Read this page to understand why: https://crypto.stackexchange.com/questions/98189/how-to-prove-that-an-elliptic-curve-point-is-smaller-or-greater-than-half-of-the

Quote from: the answer in the link above
If there were a polynomial time solution[1] then this would provide a polynomial time solution to the elliptic curve discrete logarithm problem. We strongly believe this not to be the case.
...

[1] They are talking about a similar problem, where you find if the point is on the smaller half or bigger half of the private key range. But this discussion is why you cannot check two Point classes for Less Than - because their private keys are unknown.



To work around this, you should compare the X coordinates directly.

This will tell you if the X points are smaller or bigger, and allows you to order the public keys by characteristic P (instead of by private key order N).

P.S. I would appreciate it if you post the questions about the code inside this thread only, posting the same thing in the thread *and* in my PM mailbox is a bit annoying because I am already watching this thread.




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


Title: Re: How to define which coordinate is negative?
Post by: NotATether on July 24, 2022, 06:00:22 AM
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.


Title: Re: How to define which coordinate is negative?
Post by: ajeev on July 24, 2022, 06:18:03 AM
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.


thanks sir!!

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


Title: Re: How to define which coordinate is negative?
Post by: NotATether on July 24, 2022, 06:38:08 AM
thanks sir!!

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

With only the public key, that is impossible (again, read the Stack Exchange link I just posted), because if you were able to do that, then you could also divide the public key by two, and successively guess subranges of the ones you posted above, until you have the correct private key. Basically, you'd be able to brute force the private key.


Title: Re: How to define which coordinate is negative?
Post by: ajeev on July 24, 2022, 05:17:49 PM


all points with lowest Y-coordinate are odd and with highest are even.

can you please explain this how you are saying odd or even.


Title: Re: How to define which coordinate is negative?
Post by: ajeev on January 10, 2023, 08:41:09 AM
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


Title: Re: How to define which coordinate is negative?
Post by: o_e_l_e_o on January 10, 2023, 11:22:52 AM
hi can you please tell me how to find the publickey of btc address
If the only information you have is the address, then chances are you cannot.

Most bitcoin addresses are hashes of the public key or the locking script. Hashing is a one way function and cannot be reversed, so you cannot take an address and go backwards to find the public key. However, when a transaction spending coins from that address is made, the public key will be revealed in the signature of that transaction.

So if you have an address which has never made a transaction, you cannot find out the public key (unless of course you generated that address from the public key yourself). If the address has made a transaction, then you can look at that transaction data and extract the public key from it. Where exactly the public key is within that data depends on the type of address and the transaction itself.

There are a few exceptions to the above, such as P2PK and P2TR outputs.