Author

Topic: Half of any bitcoin (crypto) public key - (public key half) (Read 2449 times)

jr. member
Activity: 51
Merit: 1
chatGPT suggest this..

It won't work because the math to do it (correctly) is not known

Code:
import os
import sys
from hashlib import sha256
from binascii import hexlify, unhexlify
from ecdsa import SECP256k1, SigningKey, VerifyingKey
from ecdsa.ecdsa import generator_secp256k1

def find_generator_point(P):
    count = 0
    G = generator_secp256k1
    while P != G:
        P = P.__rmul__(2)
        count += 1
    with open("divisions.txt", "w") as f:
        f.write(str(count))
    return P

if __name__ == '__main__':
    # Generate a random private key
    sk = SigningKey.generate(curve=SECP256k1)
    # Derive the public key from the private key
    vk = sk.get_verifying_key()
    # Convert the public key to an EC point
    P = vk.pubkey.point
    # Find the generator point by dividing P repeatedly
    G = find_generator_point(P)
    print("Generator Point: ({}, {})".format(hexlify(G.x().to_bytes(32, 'big')).decode(), hexlify(G.y().to_bytes(32, 'big')).decode()))


It won't work because that AI is an idiot, lol there is no SHA256 involved in finding k from p, and there is no "dividing" repeatedly until finding G, what AI can suggest is the worst way possible to brute force because it's an imbecile computer.😅

point division. but you won't be splitting the private key when applied.
copper member
Activity: 1330
Merit: 899
🖤😏
chatGPT suggest this..

It won't work because the math to do it (correctly) is not known

Code:
import os
import sys
from hashlib import sha256
from binascii import hexlify, unhexlify
from ecdsa import SECP256k1, SigningKey, VerifyingKey
from ecdsa.ecdsa import generator_secp256k1

def find_generator_point(P):
    count = 0
    G = generator_secp256k1
    while P != G:
        P = P.__rmul__(2)
        count += 1
    with open("divisions.txt", "w") as f:
        f.write(str(count))
    return P

if __name__ == '__main__':
    # Generate a random private key
    sk = SigningKey.generate(curve=SECP256k1)
    # Derive the public key from the private key
    vk = sk.get_verifying_key()
    # Convert the public key to an EC point
    P = vk.pubkey.point
    # Find the generator point by dividing P repeatedly
    G = find_generator_point(P)
    print("Generator Point: ({}, {})".format(hexlify(G.x().to_bytes(32, 'big')).decode(), hexlify(G.y().to_bytes(32, 'big')).decode()))


It won't work because that AI is an idiot, lol there is no SHA256 involved in finding k from p, and there is no "dividing" repeatedly until finding G, what AI can suggest is the worst way possible to brute force because it's an imbecile computer.😅
member
Activity: 113
Merit: 28
chatGPT suggest this..

It won't work because the math to do it (correctly) is not known

Code:
import os
import sys
from hashlib import sha256
from binascii import hexlify, unhexlify
from ecdsa import SECP256k1, SigningKey, VerifyingKey
from ecdsa.ecdsa import generator_secp256k1

def find_generator_point(P):
    count = 0
    G = generator_secp256k1
    while P != G:
        P = P.__rmul__(2)
        count += 1
    with open("divisions.txt", "w") as f:
        f.write(str(count))
    return P

if __name__ == '__main__':
    # Generate a random private key
    sk = SigningKey.generate(curve=SECP256k1)
    # Derive the public key from the private key
    vk = sk.get_verifying_key()
    # Convert the public key to an EC point
    P = vk.pubkey.point
    # Find the generator point by dividing P repeatedly
    G = find_generator_point(P)
    print("Generator Point: ({}, {})".format(hexlify(G.x().to_bytes(32, 'big')).decode(), hexlify(G.y().to_bytes(32, 'big')).decode()))


member
Activity: 313
Merit: 34
Guys, I hope you are all doing great!
Can anyone please refer some python script that can apply this halving thing on public keys and calculates its half?HuhHuh??
this from MrMaxwell might suit you very simple to use
https://github.com/MrMaxweII/Secp256k1-Calculator
On the other hand if you want to divide a pubkey which corresponds to an odd pk you will have its half etc etc... deleting the float is another much more complicated story. In short, dividing a pubkey in half will not help you much unless you know the starting pk


BRO, would you please give a little help how to use this calculator that you've referred above? I mean how to calculate half point, where should I put my public key whose half I am interested in.... Much appreciate your above help though

https://rawcdn.githack.com/nlitsme/bitcoinexplainer/aa50e86e8c72c04a7986f5f7c43bc2f98df94107/ecdsacrack.html
newbie
Activity: 18
Merit: 0
Guys, I hope you are all doing great!
Can anyone please refer some python script that can apply this halving thing on public keys and calculates its half?HuhHuh??
this from MrMaxwell might suit you very simple to use
https://github.com/MrMaxweII/Secp256k1-Calculator
On the other hand if you want to divide a pubkey which corresponds to an odd pk you will have its half etc etc... deleting the float is another much more complicated story. In short, dividing a pubkey in half will not help you much unless you know the starting pk


BRO, would you please give a little help how to use this calculator that you've referred above? I mean how to calculate half point, where should I put my public key whose half I am interested in.... Much appreciate your above help though
member
Activity: 117
Merit: 32
Guys, I hope you are all doing great!
Can anyone please refer some python script that can apply this halving thing on public keys and calculates its half?HuhHuh??
this from MrMaxwell might suit you very simple to use
https://github.com/MrMaxweII/Secp256k1-Calculator
On the other hand if you want to divide a pubkey which corresponds to an odd pk you will have its half etc etc... deleting the float is another much more complicated story. In short, dividing a pubkey in half will not help you much unless you know the starting pk
newbie
Activity: 17
Merit: 0
Guys, I hope you are all doing great!
Can anyone please refer some python script that can apply this halving thing on public keys and calculates its half?HuhHuh??
member
Activity: 814
Merit: 20
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
halvig has a int and float part, veryvery hard divide pubkey without flot part, but posible use combination  x / d = result1, result 1- 1(uno) =  result 2, result2 x d = downgraded pubkey = pubkey without int part.

divide 120 pub to 119, substract 1, multiply to 119 you get result 118 etc...
....
Obviously your divisor (d) must be 2 if you are trying to downgrade a PK by 1 bit. Then the remainder will only be 1 or 0.

But subtraction does not really eliminate the float part by subtracting 1, you will either get the same pubkey when you multiply it again or a different one, so if the (quotient-1) subtraction gives you a different public key when its multiplied, you know that the quotient is an even private key.

Not that private key parities correspond to public key parities (they do *not* correlate), so the parity of the private key is still unknown. You are basically throwing away 1 bit of privte key during each division without further information about the private key composition.


i know about substracting is more good, but, if you thant get 80vbit from 120 is very hard too do it this because needs about  1 099 511 627 776 -1 substraction.

dividing with float part sovs with fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0342ec8 with not 02 03  pubkey but with pubkey *-1, this transform priv/pubkey in for from 12345 to fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0361108 form and you not  get negative number then substract because 12345 - 12346 = -1, and you range will jamp dramnaticaly from 5 chars to fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140chard

, but if substract 123456 from fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0361108 - 123456 =  0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0342ec8 and range not jump.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
halvig has a int and float part, veryvery hard divide pubkey without flot part, but posible use combination  x / d = result1, result 1- 1(uno) =  result 2, result2 x d = downgraded pubkey = pubkey without int part.

divide 120 pub to 119, substract 1, multiply to 119 you get result 118 etc...
....
Obviously your divisor (d) must be 2 if you are trying to downgrade a PK by 1 bit. Then the remainder will only be 1 or 0.

But subtraction does not really eliminate the float part by subtracting 1, you will either get the same pubkey when you multiply it again or a different one, so if the (quotient-1) subtraction gives you a different public key when its multiplied, you know that the quotient is an even private key.

Not that private key parities correspond to public key parities (they do *not* correlate), so the parity of the private key is still unknown. You are basically throwing away 1 bit of privte key during each division without further information about the private key composition.
member
Activity: 406
Merit: 45
How can we can fine half like this?


2**120
1329227995784915872903807060280344576

private key = 1329227995784915872903807060280344576

1329227995784915872903807060280344576 hex = 1000000000000000000000000000000

binary = 1000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000

Half binary first (60) = 100000000000000000000000000000000000000000000000000000000000

(hex) 800000000000000  = (dec) 576460752303423488

half of 1329227995784915872903807060280344576 is 576460752303423488

member
Activity: 814
Merit: 20
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk

What meaning is Half of any bitcoin?
Do you mean half of the public key right?
or
Did you mean half of the scalar to the private key right? or what?


halvig has a int and float part, veryvery hard divide pubkey without flot part, but posible use combination  x / d = result1, result 1- 1(uno) =  result 2, result2 x d = downgraded pubkey = pubkey without int part.

divide 120 pub to 119, substract 1, multiply to 119 you get result 118 etc...
....
member
Activity: 814
Merit: 20
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk

What meaning is Half of any bitcoin?
Do you mean half of the public key right?
or
Did you mean half of the scalar to the private key right? or what?


half of base point, pubkey, privkey,  /2, * 7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1

this is a all half
member
Activity: 406
Merit: 45

What meaning is Half of any bitcoin?
Do you mean half of the public key right?
or
Did you mean half of the scalar to the private key right? or what?
member
Activity: 814
Merit: 20
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
The goal is to "half" the point. You want to find the point Q where 2Q = P, your original point.

So you compute 2^-1 (mod n) where n is the order of the group (see the secp256k1 parameters: https://en.bitcoin.it/wiki/Secp256k1)

2^1 is the multiplicative inverse of 2 (mod n). 2 x 2^1 = 1 (mod n). When you do the scalar multiplication it cancels out a factor of 2.

2Q = P

(2^-1)2Q = (2^-1)P

Q = (2^-1)P

Hope that makes sense.

here the another answer

https://crypto.stackexchange.com/questions/59972/half-of-any-bitcoin-crypto-public-key-public-key-half-is-possible



ECC is cryptography over an elliptic curve group.

Firstly you have an elliptic curve, e.g. Bitcoin uses a Koblitz curve secp256k1 y2=x3+7.

The group is defined over curve points over a finite field Fp (integer modular p). The group elements are points on the curve. A point in the affine form consists of two coordinates P=(x,y) where x,y∈Fp.

For group elements, you can do point addition P+Q, as well as scalar multiplication sP, where s is an integer in Zn where n is the order of the group (how many elements in the group).

A public key in bitcoin is a point P. To do P2, you multiply 12 to P where 12 is the multiplicative inverse of 2 in Zn. It is an integer that can be found using the extended Euclidean algorithm and is 57896044618658097711785492504343953926418782139537452191302581570759080747169 in the case of secp256k1.



but in crypt o ,

private key 3

x =  f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
y =  388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672

half of the above public key is 1 given below

x =  79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
y =  483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

but the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

what wrong in this how to correct this

3/2 = 1


  

"the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010 "

to get scalar_pkey the xy above:

modinv2 = modinv(2, N)
             =  57896044618658097711785492504343953926418782139537452191302581570759080747169 == ((N-1)/2)+1) or invers ((N-1)/2)

pkey xy = private key 3  * modinv2 % N
            = 3 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 % N
            = 173688133855974293135356477513031861779256346418612356573907744712277242241507 % N
            = 57896044618658097711785492504343953926418782139537452191302581570759080747170

**applies to all odd privatekey values

The private key      : 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a2L
Dec private key      : 57896044618658097711785492504343953926418782139537452191302581570759080747170
Biner private key   : 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110101110101010111011011100111001 1010101111010010001010000000111011101111111101001001011110100011001101000000110 110010000010100010

the uncompressed DEC public key (not address):
(89636686429439908262420422079980100111093242688153882571369946125714247242771L, 10834049905482024808827094233028503931704324296739647619935835709590451240976L)

the uncompressed HEX public key (not address):
(0xc62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413L, 0x17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010L)

the uncompressed public key (HEX):
04c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d41317f3dadd76727 5ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

the official Public Key - compressed:
02c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413



Notice :
there is a doubling of scalar numbers either even or odd,
exm1 :
11 ECdouble => 22 ECdiv =>  11
13 ECdouble => 26 ECdiv =>  13
20 ECdouble => 40 ECdiv =>  20 ECdiv =>  10 ECdiv =>  5
21 ECdouble => 42 ECdiv =>  21

but actually there is no division of the odd scalar pkey divided by 2, there is only a 1xGpoint subtraction, then the result can be divided by 2

Exm: binary 1001

sequentially 1 2 4 9
the value of 9 is actually 8+1

for the last binary division result (right) or to get the decimal value 4 of 9, you can't divide 9 by 2,
but first subtract 9 by 1 and then divide by 2 (8 / 2 = 4)

if forced 9/2 and using the above operation, the calculation result will go to
57896044618658097711785492504343953926418782139537452191302581570759080747173 (HEX:0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a5)

the uncompressed public key (not address):
(46399714550823657646711952010527975805134803763457644396793103212103067379801L, 109666243570543015459678453826250465783941922322291717279653226122816671713075L)

the official Public Key - compressed:
0366954eca0543426304036fc70fc0fe3381f5195e88433bc32c5a8a60341e2859


Exm2: binary 10010
sequentially 1 2 4 9 18

18 /2 = 9
(9-1)/2 = 4
4/2 = 2
2/2 = 1






try halving and substract, ie reverse of double and add

13 priv

022B4EA0A797A443D293EF5CFF444F4979F06ACFEBD7E86D277475656138385B6C  - pub

priv even pub odd, shit



DES PKEY = 19
HEX PKEY = 0x13
Pubkey   = 022b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c


x= 0x2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c
y= 0x85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a

div xy :
0x1c2bd878b94169da722a9de0c4e317cea8802aa96045830111a89d1d9de4270cL 0xf6a4826643c20ce10f240e855f610eb78e5193a278f1418ae0ad55515b71ff6aL

(div xy) - 1 :
0x41f7fa0a9a59513ae221e3b84b91995fc9d40eb5d120a6d8e663452ad92099c8L 0xf7ec24416d13b49dda2e33a1a7df14482423d69b2a22e54c21543145a186befdL

(div xy) - xy :
0x1c2bd878b94169da722a9de0c4e317cea8802aa96045830111a89d1d9de4270cL 0x95b7d99bc3df31ef0dbf17aa09ef14871ae6c5d870ebe751f52aaada48dfcc5L




double xy :
0xb699a30e6e184cdfa88ac16c7d80bffd38e2e1fc705821ea69cd5fdf1691fff7L 0xd505700c51d860ce5a096ee637ebed3bd9d7268126c76a16b745bc318a51ab04L

(double xy)+1 :
0x80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6fL 0x1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57aL

(double xy)+xy :
0x2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120L 0x4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40L

"priv even pub odd, shit"...  am i missing something??




this pubkey is odd 022b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c but privkey is even  19 in des, so imposible start with even privkey then use 02... pubkeys,.  02...,03...., nit always correlate with odd even parametr unfortunately
newbie
Activity: 2
Merit: 0
The goal is to "half" the point. You want to find the point Q where 2Q = P, your original point.

So you compute 2^-1 (mod n) where n is the order of the group (see the secp256k1 parameters: https://en.bitcoin.it/wiki/Secp256k1)

2^1 is the multiplicative inverse of 2 (mod n). 2 x 2^1 = 1 (mod n). When you do the scalar multiplication it cancels out a factor of 2.

2Q = P

(2^-1)2Q = (2^-1)P

Q = (2^-1)P

Hope that makes sense.

here the another answer

https://crypto.stackexchange.com/questions/59972/half-of-any-bitcoin-crypto-public-key-public-key-half-is-possible



ECC is cryptography over an elliptic curve group.

Firstly you have an elliptic curve, e.g. Bitcoin uses a Koblitz curve secp256k1 y2=x3+7.

The group is defined over curve points over a finite field Fp (integer modular p). The group elements are points on the curve. A point in the affine form consists of two coordinates P=(x,y) where x,y∈Fp.

For group elements, you can do point addition P+Q, as well as scalar multiplication sP, where s is an integer in Zn where n is the order of the group (how many elements in the group).

A public key in bitcoin is a point P. To do P2, you multiply 12 to P where 12 is the multiplicative inverse of 2 in Zn. It is an integer that can be found using the extended Euclidean algorithm and is 57896044618658097711785492504343953926418782139537452191302581570759080747169 in the case of secp256k1.



but in crypt o ,

private key 3

x =  f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
y =  388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672

half of the above public key is 1 given below

x =  79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
y =  483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

but the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

what wrong in this how to correct this

3/2 = 1


  

"the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010 "

to get scalar_pkey the xy above:

modinv2 = modinv(2, N)
             =  57896044618658097711785492504343953926418782139537452191302581570759080747169 == ((N-1)/2)+1) or invers ((N-1)/2)

pkey xy = private key 3  * modinv2 % N
            = 3 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 % N
            = 173688133855974293135356477513031861779256346418612356573907744712277242241507 % N
            = 57896044618658097711785492504343953926418782139537452191302581570759080747170

**applies to all odd privatekey values

The private key      : 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a2L
Dec private key      : 57896044618658097711785492504343953926418782139537452191302581570759080747170
Biner private key   : 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110101110101010111011011100111001 1010101111010010001010000000111011101111111101001001011110100011001101000000110 110010000010100010

the uncompressed DEC public key (not address):
(89636686429439908262420422079980100111093242688153882571369946125714247242771L, 10834049905482024808827094233028503931704324296739647619935835709590451240976L)

the uncompressed HEX public key (not address):
(0xc62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413L, 0x17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010L)

the uncompressed public key (HEX):
04c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d41317f3dadd76727 5ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

the official Public Key - compressed:
02c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413



Notice :
there is a doubling of scalar numbers either even or odd,
exm1 :
11 ECdouble => 22 ECdiv =>  11
13 ECdouble => 26 ECdiv =>  13
20 ECdouble => 40 ECdiv =>  20 ECdiv =>  10 ECdiv =>  5
21 ECdouble => 42 ECdiv =>  21

but actually there is no division of the odd scalar pkey divided by 2, there is only a 1xGpoint subtraction, then the result can be divided by 2

Exm: binary 1001

sequentially 1 2 4 9
the value of 9 is actually 8+1

for the last binary division result (right) or to get the decimal value 4 of 9, you can't divide 9 by 2,
but first subtract 9 by 1 and then divide by 2 (8 / 2 = 4)

if forced 9/2 and using the above operation, the calculation result will go to
57896044618658097711785492504343953926418782139537452191302581570759080747173 (HEX:0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a5)

the uncompressed public key (not address):
(46399714550823657646711952010527975805134803763457644396793103212103067379801L, 109666243570543015459678453826250465783941922322291717279653226122816671713075L)

the official Public Key - compressed:
0366954eca0543426304036fc70fc0fe3381f5195e88433bc32c5a8a60341e2859


Exm2: binary 10010
sequentially 1 2 4 9 18

18 /2 = 9
(9-1)/2 = 4
4/2 = 2
2/2 = 1






try halving and substract, ie reverse of double and add

13 priv

022B4EA0A797A443D293EF5CFF444F4979F06ACFEBD7E86D277475656138385B6C  - pub

priv even pub odd, shit



DES PKEY = 19
HEX PKEY = 0x13
Pubkey   = 022b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c


x= 0x2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c
y= 0x85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a

div xy :
0x1c2bd878b94169da722a9de0c4e317cea8802aa96045830111a89d1d9de4270cL 0xf6a4826643c20ce10f240e855f610eb78e5193a278f1418ae0ad55515b71ff6aL

(div xy) - 1 :
0x41f7fa0a9a59513ae221e3b84b91995fc9d40eb5d120a6d8e663452ad92099c8L 0xf7ec24416d13b49dda2e33a1a7df14482423d69b2a22e54c21543145a186befdL

(div xy) - xy :
0x1c2bd878b94169da722a9de0c4e317cea8802aa96045830111a89d1d9de4270cL 0x95b7d99bc3df31ef0dbf17aa09ef14871ae6c5d870ebe751f52aaada48dfcc5L




double xy :
0xb699a30e6e184cdfa88ac16c7d80bffd38e2e1fc705821ea69cd5fdf1691fff7L 0xd505700c51d860ce5a096ee637ebed3bd9d7268126c76a16b745bc318a51ab04L

(double xy)+1 :
0x80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6fL 0x1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57aL

(double xy)+xy :
0x2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120L 0x4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40L

"priv even pub odd, shit"...  am i missing something??


member
Activity: 814
Merit: 20
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
The goal is to "half" the point. You want to find the point Q where 2Q = P, your original point.

So you compute 2^-1 (mod n) where n is the order of the group (see the secp256k1 parameters: https://en.bitcoin.it/wiki/Secp256k1)

2^1 is the multiplicative inverse of 2 (mod n). 2 x 2^1 = 1 (mod n). When you do the scalar multiplication it cancels out a factor of 2.

2Q = P

(2^-1)2Q = (2^-1)P

Q = (2^-1)P

Hope that makes sense.

here the another answer

https://crypto.stackexchange.com/questions/59972/half-of-any-bitcoin-crypto-public-key-public-key-half-is-possible



ECC is cryptography over an elliptic curve group.

Firstly you have an elliptic curve, e.g. Bitcoin uses a Koblitz curve secp256k1 y2=x3+7.

The group is defined over curve points over a finite field Fp (integer modular p). The group elements are points on the curve. A point in the affine form consists of two coordinates P=(x,y) where x,y∈Fp.

For group elements, you can do point addition P+Q, as well as scalar multiplication sP, where s is an integer in Zn where n is the order of the group (how many elements in the group).

A public key in bitcoin is a point P. To do P2, you multiply 12 to P where 12 is the multiplicative inverse of 2 in Zn. It is an integer that can be found using the extended Euclidean algorithm and is 57896044618658097711785492504343953926418782139537452191302581570759080747169 in the case of secp256k1.



but in crypt o ,

private key 3

x =  f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
y =  388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672

half of the above public key is 1 given below

x =  79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
y =  483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

but the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

what wrong in this how to correct this

3/2 = 1


  

"the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010 "

to get scalar_pkey the xy above:

modinv2 = modinv(2, N)
             =  57896044618658097711785492504343953926418782139537452191302581570759080747169 == ((N-1)/2)+1) or invers ((N-1)/2)

pkey xy = private key 3  * modinv2 % N
            = 3 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 % N
            = 173688133855974293135356477513031861779256346418612356573907744712277242241507 % N
            = 57896044618658097711785492504343953926418782139537452191302581570759080747170

**applies to all odd privatekey values

The private key      : 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a2L
Dec private key      : 57896044618658097711785492504343953926418782139537452191302581570759080747170
Biner private key   : 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110101110101010111011011100111001 1010101111010010001010000000111011101111111101001001011110100011001101000000110 110010000010100010

the uncompressed DEC public key (not address):
(89636686429439908262420422079980100111093242688153882571369946125714247242771L, 10834049905482024808827094233028503931704324296739647619935835709590451240976L)

the uncompressed HEX public key (not address):
(0xc62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413L, 0x17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010L)

the uncompressed public key (HEX):
04c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d41317f3dadd76727 5ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

the official Public Key - compressed:
02c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413



Notice :
there is a doubling of scalar numbers either even or odd,
exm1 :
11 ECdouble => 22 ECdiv =>  11
13 ECdouble => 26 ECdiv =>  13
20 ECdouble => 40 ECdiv =>  20 ECdiv =>  10 ECdiv =>  5
21 ECdouble => 42 ECdiv =>  21

but actually there is no division of the odd scalar pkey divided by 2, there is only a 1xGpoint subtraction, then the result can be divided by 2

Exm: binary 1001

sequentially 1 2 4 9
the value of 9 is actually 8+1

for the last binary division result (right) or to get the decimal value 4 of 9, you can't divide 9 by 2,
but first subtract 9 by 1 and then divide by 2 (8 / 2 = 4)

if forced 9/2 and using the above operation, the calculation result will go to
57896044618658097711785492504343953926418782139537452191302581570759080747173 (HEX:0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a5)

the uncompressed public key (not address):
(46399714550823657646711952010527975805134803763457644396793103212103067379801L, 109666243570543015459678453826250465783941922322291717279653226122816671713075L)

the official Public Key - compressed:
0366954eca0543426304036fc70fc0fe3381f5195e88433bc32c5a8a60341e2859


Exm2: binary 10010
sequentially 1 2 4 9 18

18 /2 = 9
(9-1)/2 = 4
4/2 = 2
2/2 = 1






try halving and substract, ie reverse of double and add

13 priv

022B4EA0A797A443D293EF5CFF444F4979F06ACFEBD7E86D277475656138385B6C  - pub

priv even pub odd, shit

newbie
Activity: 2
Merit: 0
The goal is to "half" the point. You want to find the point Q where 2Q = P, your original point.

So you compute 2^-1 (mod n) where n is the order of the group (see the secp256k1 parameters: https://en.bitcoin.it/wiki/Secp256k1)

2^1 is the multiplicative inverse of 2 (mod n). 2 x 2^1 = 1 (mod n). When you do the scalar multiplication it cancels out a factor of 2.

2Q = P

(2^-1)2Q = (2^-1)P

Q = (2^-1)P

Hope that makes sense.

here the another answer

https://crypto.stackexchange.com/questions/59972/half-of-any-bitcoin-crypto-public-key-public-key-half-is-possible



ECC is cryptography over an elliptic curve group.

Firstly you have an elliptic curve, e.g. Bitcoin uses a Koblitz curve secp256k1 y2=x3+7.

The group is defined over curve points over a finite field Fp (integer modular p). The group elements are points on the curve. A point in the affine form consists of two coordinates P=(x,y) where x,y∈Fp.

For group elements, you can do point addition P+Q, as well as scalar multiplication sP, where s is an integer in Zn where n is the order of the group (how many elements in the group).

A public key in bitcoin is a point P. To do P2, you multiply 12 to P where 12 is the multiplicative inverse of 2 in Zn. It is an integer that can be found using the extended Euclidean algorithm and is 57896044618658097711785492504343953926418782139537452191302581570759080747169 in the case of secp256k1.



but in crypt o ,

private key 3

x =  f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
y =  388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672

half of the above public key is 1 given below

x =  79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
y =  483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

but the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

what wrong in this how to correct this

3/2 = 1


  

"the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010 "

to get scalar_pkey the xy above:

modinv2 = modinv(2, N)
             =  57896044618658097711785492504343953926418782139537452191302581570759080747169 == ((N-1)/2)+1) or invers ((N-1)/2)

pkey xy = private key 3  * modinv2 % N
            = 3 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 % N
            = 173688133855974293135356477513031861779256346418612356573907744712277242241507 % N
            = 57896044618658097711785492504343953926418782139537452191302581570759080747170

**applies to all odd privatekey values

The private key      : 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a2L
Dec private key      : 57896044618658097711785492504343953926418782139537452191302581570759080747170
Biner private key   : 1111111111111111111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111110101110101010111011011100111001 1010101111010010001010000000111011101111111101001001011110100011001101000000110 110010000010100010

the uncompressed DEC public key (not address):
(89636686429439908262420422079980100111093242688153882571369946125714247242771L, 10834049905482024808827094233028503931704324296739647619935835709590451240976L)

the uncompressed HEX public key (not address):
(0xc62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413L, 0x17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010L)

the uncompressed public key (HEX):
04c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d41317f3dadd76727 5ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

the official Public Key - compressed:
02c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413



Notice :
there is a doubling of scalar numbers either even or odd,
exm1 :
11 ECdouble => 22 ECdiv =>  11
13 ECdouble => 26 ECdiv =>  13
20 ECdouble => 40 ECdiv =>  20 ECdiv =>  10 ECdiv =>  5
21 ECdouble => 42 ECdiv =>  21

but actually there is no division of the odd scalar pkey divided by 2, there is only a 1xGpoint subtraction, then the result can be divided by 2

Exm: binary 1001

sequentially 1 2 4 9
the value of 9 is actually 8+1

for the last binary division result (right) or to get the decimal value 4 of 9, you can't divide 9 by 2,
but first subtract 9 by 1 and then divide by 2 (8 / 2 = 4)

if forced 9/2 and using the above operation, the calculation result will go to
57896044618658097711785492504343953926418782139537452191302581570759080747173 (HEX:0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a5)

the uncompressed public key (not address):
(46399714550823657646711952010527975805134803763457644396793103212103067379801L, 109666243570543015459678453826250465783941922322291717279653226122816671713075L)

the official Public Key - compressed:
0366954eca0543426304036fc70fc0fe3381f5195e88433bc32c5a8a60341e2859


Exm2: binary 10010
sequentially 1 2 4 9 18

18 /2 = 9
(9-1)/2 = 4
4/2 = 2
2/2 = 1




legendary
Activity: 3430
Merit: 10504
But you do have to have the private key though?
you don't need the private key to make this computation and you can not compute the private key. this is just simple point multiplication as defined by elliptic curve algorithm but instead of the usual generator point you use another point on curve (ie. the public key) and instead of the private key you use another number (ie. 2-1).
you can do this to any of the hundreds of thousands of public keys found on bitcoin blockchain without having private keys.
full member
Activity: 706
Merit: 111
Is there a code or script to do the math?

It's easier than you might think. In fact, you can use any library that allows you to calculate the public key from a private key and replace the parameters:

# Elliptic curve parameters (secp256k1)

P = 2**256 - 2**32 - 977
N = 115792089237316195423570985008687907852837564279074904382605163141518161494337 --> original parameter
#N = 57896044618658097711785492504343953926418782139537452191302581570759080747169 --> here to divide by 2 for example
A = 0
B = 7
Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 --> here put the key you want to divide
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 --> same for y coordinate
G = (Gx, Gy)


So sorta like this:

_p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2FL
_r = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141L
_b = 0x0000000000000000000000000000000000000000000000000000000000000007L
_a = 0x0000000000000000000000000000000000000000000000000000000000000000L
_Gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798L
_Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8L


But you do have to have the private key though?
newbie
Activity: 25
Merit: 1
Is there a code or script to do the math?

It's easier than you might think. In fact, you can use any library that allows you to calculate the public key from a private key and replace the parameters:

# Elliptic curve parameters (secp256k1)

P = 2**256 - 2**32 - 977
N = 115792089237316195423570985008687907852837564279074904382605163141518161494337 --> original parameter
#N = 57896044618658097711785492504343953926418782139537452191302581570759080747169 --> here to divide by 2 for example
A = 0
B = 7
Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 --> here put the key you want to divide
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 --> same for y coordinate
G = (Gx, Gy)
legendary
Activity: 3430
Merit: 10504
Is there a code or script to do the math?
any cryptography library that supports elliptic curve cryptography should have the math, may not be a public member in some cases since these are internals of calculation. depending on the language you want there are a bunch of them for example python-ecdsa is a python library that has all of this.
full member
Activity: 706
Merit: 111
Is there a code or script to do the math?
newbie
Activity: 25
Merit: 1

this topic is already filled with many examples!
i think you should start at the basics and read what Elliptic Curve Cryptography and Modular Arithmetic are before trying to come up with the code that computes half of a public key!
start here: https://en.wikipedia.org/wiki/Modular_arithmetic
then:
https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/
https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
and finally
https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication
https://en.wikipedia.org/wiki/Modular_multiplicative_inverse

Thanks for the links, I have a bit of a headache but now I have the basics to understand.
Well, I now know how to divide a point by 2 as in my example (private key 10). On the other hand, I realize after several tests that if the point to be divided corresponds to an odd private key, the result no longer corresponds to what I expected. As long as the private key is divisible by 2, the calculations seem to respect a certain logic but since the division does not give a whole number (without comma), this "rule" is shattered ^^.
Can someone explain to me this part:
3. If d is odd let P = P + Q
4. Double Q: Q = 2 * Q, halve d rounding towards zero: d = floor (d / 2)

I don't quite understand the logic yet.
The floor () method returns the floor of x i.e. the largest integer not greater than x. With bitcoin is this the rule to apply, why not the other way around? (the smallest integer)?

Thanks in advance
legendary
Activity: 3430
Merit: 10504
I'm sorry but i don't understand, can you give me an example  Tongue
I do not have the necessary bases in mathematics and you lost me with "constant is c" & d Huh
ideally a small python script would be welcome but I'm certainly asking too much Kiss

Signed: the noob ^^

this topic is already filled with many examples!
i think you should start at the basics and read what Elliptic Curve Cryptography and Modular Arithmetic are before trying to come up with the code that computes half of a public key!
start here: https://en.wikipedia.org/wiki/Modular_arithmetic
then:
https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/
https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
and finally
https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication
https://en.wikipedia.org/wiki/Modular_multiplicative_inverse
newbie
Activity: 25
Merit: 1

Multiply by 57896044618658097711785492504343953926418782139537452191302581570759080747169


Let the point you want to multiply is G, and the multiplication constant is c. The result will be P=c*G

One way to do it is:

1. Start with the point at infinity P = (0,0) = 0*G, Q = G = 1*G, d = c

2. if d is zero return P

3. If d is odd let P = P + Q

4. Double Q: Q = 2*Q, halve d rounding towards zero: d = floor(d/2)

5. Go to step 2


I'm sorry but i don't understand, can you give me an example  Tongue
I do not have the necessary bases in mathematics and you lost me with "constant is c" & d Huh
ideally a small python script would be welcome but I'm certainly asking too much Kiss

Signed: the noob ^^



full member
Activity: 204
Merit: 437
In secp256k1 there are two important primes - the prime p which is used for coordinates x and y (2^256 - 2^32 - 977), and the prime n, which is the group order (2^256 - 432420386565659656852420866394968145599).

The group is defined by two operations - addition of two points, and doubling a point.

From this we easily could multiply a point by scalar, this is series of additions and doublings.

Multiplying a point by scalar gives another point. Multiplying a point by n gives the point at infinity (0,0).

Dividing by 2 in a group with order n is equivalent to multiplying by the scalar 1/2 (mod n).

One can find the inverse of 2 modulo n by the Extended Euclidean Algorithm.
1/2 (mod n) = 57896044618658097711785492504343953926418782139537452191302581570759080747169

You'd have to multiply (x,y) by 1/2 (mod n), this gives
x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
y = 98003708678762621233683240503080860129026887322874138805529884920309963580118


How Huh I just reread your post and I understand that you manage to do it ?
So my question is simple, how multiply a point (x,y) by 1/2 (mod n) ? I can't get a working méthod with python Huh

Assume i have this public key (x = 72488970228380509287422715226575535698893157273063074627791787432852706183111 , y = 2898698443831883535403436258712770888294397026493185421712108624767191)
what is the math méthod to multiply (x,y) by 1/2 (mod n) --> it is also assumed that I do not know the private key
How get (x = 21505829891763648114329055987619236494102133314575206970830385799158076338148 , y = 98003708678762621233683240503080860129026887322874138805529884920309963580118) Huh

 Roll Eyes

Multiply by 57896044618658097711785492504343953926418782139537452191302581570759080747169


Let the point you want to multiply is G, and the multiplication constant is c. The result will be P=c*G

One way to do it is:

1. Start with the point at infinity P = (0,0) = 0*G, Q = G = 1*G, d = c

2. if d is zero return P

3. If d is odd let P = P + Q

4. Double Q: Q = 2*Q, halve d rounding towards zero: d = floor(d/2)

5. Go to step 2

newbie
Activity: 25
Merit: 1
In secp256k1 there are two important primes - the prime p which is used for coordinates x and y (2^256 - 2^32 - 977), and the prime n, which is the group order (2^256 - 432420386565659656852420866394968145599).

The group is defined by two operations - addition of two points, and doubling a point.

From this we easily could multiply a point by scalar, this is series of additions and doublings.

Multiplying a point by scalar gives another point. Multiplying a point by n gives the point at infinity (0,0).

Dividing by 2 in a group with order n is equivalent to multiplying by the scalar 1/2 (mod n).

One can find the inverse of 2 modulo n by the Extended Euclidean Algorithm.
1/2 (mod n) = 57896044618658097711785492504343953926418782139537452191302581570759080747169

You'd have to multiply (x,y) by 1/2 (mod n), this gives
x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
y = 98003708678762621233683240503080860129026887322874138805529884920309963580118


How Huh I just reread your post and I understand that you manage to do it ?
So my question is simple, how multiply a point (x,y) by 1/2 (mod n) ? I can't get a working méthod with python Huh

Assume i have this public key (x = 72488970228380509287422715226575535698893157273063074627791787432852706183111 , y = 2898698443831883535403436258712770888294397026493185421712108624767191)
what is the math méthod to multiply (x,y) by 1/2 (mod n) --> it is also assumed that I do not know the private key
How get (x = 21505829891763648114329055987619236494102133314575206970830385799158076338148 , y = 98003708678762621233683240503080860129026887322874138805529884920309963580118) Huh

 Roll Eyes
newbie
Activity: 25
Merit: 1
Ok, this confirms what i thought. Even if it is possible to halve a point, it is useless ^^
On the other hand I still do not know how to do ^^ lol
Thanks for the explanations all.

member
Activity: 180
Merit: 38
Half a private key of 10 is not private key 5.
That is something entirely different these are curve points.
It's 5 curve points away.

For example think of it this way,
You can plot the first 10 points from G then you have a ladder that you can climb up and down.
Then you start at 10 and move back 5 points you will arrive at another point on the curve
Maybe that will make it a lot easier for you to understand.

PrivateKey:  1

X:  0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
Y:  0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

PrivateKey:  2

X:  0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
Y:  0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a

PrivateKey:  3

X:  0xf9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
Y:  0x388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672

PrivateKey:  4

X:  0xe493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13
Y:  0x51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922

PrivateKey:  5

X:  0x2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4
Y:  0xd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6

PrivateKey:  6

X:  0xfff97bd5755eeea420453a14355235d382f6472f8568a18b2f057a1460297556
Y:  0xae12777aacfbb620f3be96017f45c560de80f0f6518fe4a03c870c36b075f297

PrivateKey:  7

X:  0x5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc
Y:  0x6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da

PrivateKey:  8

X:  0x2f01e5e15cca351daff3843fb70f3c2f0a1bdd05e5af888a67784ef3e10a2a01
Y:  0x5c4da8a741539949293d082a132d13b4c2e213d6ba5b7617b5da2cb76cbde904

PrivateKey:  9

X:  0xacd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe
Y:  0xcc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37

PrivateKey:  10

X:  0xa0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7
Y:  0x893aba425419bc27a3b6c7e693a24c696f794c2ed877a1593cbee53b037368d7


So for your info you also start with X and Y so that is already two coordinates on the curve.
newbie
Activity: 25
Merit: 1
this is all because of how 2-1 is defined and its value is 57896044618658097711785492504343953926418782139537452191302581570759080747169 because 2 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 ≡ 1 (mod N)
it can be computed using Euclidean algorithm or the simplified 2(prime-2) mode prime.
now multiplying that with the point we had returns the half point

x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
Y = 98003708678762621233683240503080860129026887322874138805529884920309963580118


why not. private key will tell you how many times to add G to itself. but after you are done and have the value for k*G as point P then you can do whatever you want with that point. for example you can add another G to that point and compute Q=P+G or R=P-G and similarly you can multiply that point with any number like computing S=3*P (the same way you would compute 3*G).
2-1 is just another number that your point (P or G or Q,...) is multiplied by. you just have to first calculate what integer 2-1 is in congruence with. to do that you compute its modular multiplicative inverse as i explained above. there is also an example in my second comment with small numbers.

Hum! I'm clearly a noob and i can't get it working..
I'm ok with the concept of multiplicative inverse of 2 --> 57896044618658097711785492504343953926418782139537452191302581570759080747169
But how use this number to half a public key with x and y coordinates Huh
I have a lot of difficulty doing research with my broken English, someone can clarify this for me, perhaps with a python code ---> how half public key (private key 10) to get public key (private key 5) Huh

It's now that I realize that mathematics is a profession ^^ lol

Thanks in advance

full member
Activity: 204
Merit: 437
Is it possible without the private key to divide a point by 2 ?

why not. private key will tell you how many times to add G to itself. but after you are done and have the value for k*G as point P then you can do whatever you want with that point. for example you can add another G to that point and compute Q=P+G or R=P-G and similarly you can multiply that point with any number like computing S=3*P (the same way you would compute 3*G).
2-1 is just another number that your point (P or G or Q,...) is multiplied by. you just have to first calculate what integer 2-1 is in congruence with. to do that you compute its modular multiplicative inverse as i explained above. there is also an example in my second comment with small numbers.

First thanks for the response.
Ok i begin to understand the concept but not ready to go yet ^^.
I know add or substract a point to another (different or equal) but i can't divide a point by any number if i only have the x and y coordinates.
If it's possible can you show me how divide this point by 2 for example ?

x = 72488970228380509287422715226575535698893157273063074627791787432852706183111
y = 62070622898698443831883535403436258712770888294397026493185421712108624767191

It is public key for private key: 10 , and we say here i haven't got this private key.

I expect to obtain the public key:

x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
Y = 98003708678762621233683240503080860129026887322874138805529884920309963580118
(private key 5 )

Thanks in advance



In secp256k1 there are two important primes - the prime p which is used for coordinates x and y (2^256 - 2^32 - 977), and the prime n, which is the group order (2^256 - 432420386565659656852420866394968145599).

The group is defined by two operations - addition of two points, and doubling a point.

From this we easily could multiply a point by scalar, this is series of additions and doublings.

Multiplying a point by scalar gives another point. Multiplying a point by n gives the point at infinity (0,0).

Dividing by 2 in a group with order n is equivalent to multiplying by the scalar 1/2 (mod n).

One can find the inverse of 2 modulo n by the Extended Euclidean Algorithm.
1/2 (mod n) = 57896044618658097711785492504343953926418782139537452191302581570759080747169

You'd have to multiply (x,y) by 1/2 (mod n), this gives
x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
y = 98003708678762621233683240503080860129026887322874138805529884920309963580118

legendary
Activity: 3430
Merit: 10504
I know add or substract a point to another (different or equal) but i can't divide a point by any number if i only have the x and y coordinates.
If it's possible can you show me how divide this point by 2 for example ?
you shouldn't think in terms of "divide by 2" but in terms of "multiply by 2-1" and 2-1 is defined this way in modular arithmetic:
find x such that 2*x ≡ 1 (mod prime)

this is all because of how 2-1 is defined and its value is 57896044618658097711785492504343953926418782139537452191302581570759080747169 because 2 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 ≡ 1 (mod N)
it can be computed using Euclidean algorithm or the simplified 2(prime-2) mode prime.
now multiplying that with the point we had returns the half point

x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
Y = 98003708678762621233683240503080860129026887322874138805529884920309963580118

EDIT: I made the mistake of using P as the prime but it should have been N (curve order). now it is fixed.
newbie
Activity: 25
Merit: 1
Is it possible without the private key to divide a point by 2 ?

why not. private key will tell you how many times to add G to itself. but after you are done and have the value for k*G as point P then you can do whatever you want with that point. for example you can add another G to that point and compute Q=P+G or R=P-G and similarly you can multiply that point with any number like computing S=3*P (the same way you would compute 3*G).
2-1 is just another number that your point (P or G or Q,...) is multiplied by. you just have to first calculate what integer 2-1 is in congruence with. to do that you compute its modular multiplicative inverse as i explained above. there is also an example in my second comment with small numbers.

First thanks for the response.
Ok i begin to understand the concept but not ready to go yet ^^.
I know add or substract a point to another (different or equal) but i can't divide a point by any number if i only have the x and y coordinates.
If it's possible can you show me how divide this point by 2 for example ?

x = 72488970228380509287422715226575535698893157273063074627791787432852706183111
y = 62070622898698443831883535403436258712770888294397026493185421712108624767191

It is public key for private key: 10 , and we say here i haven't got this private key.

I expect to obtain the public key:

x = 21505829891763648114329055987619236494102133314575206970830385799158076338148
Y = 98003708678762621233683240503080860129026887322874138805529884920309963580118
(private key 5 )

Thanks in advance

legendary
Activity: 3430
Merit: 10504
Is it possible without the private key to divide a point by 2 ?

why not. private key will tell you how many times to add G to itself. but after you are done and have the value for k*G as point P then you can do whatever you want with that point. for example you can add another G to that point and compute Q=P+G or R=P-G and similarly you can multiply that point with any number like computing S=3*P (the same way you would compute 3*G).
2-1 is just another number that your point (P or G or Q,...) is multiplied by. you just have to first calculate what integer 2-1 is in congruence with. to do that you compute its modular multiplicative inverse as i explained above. there is also an example in my second comment with small numbers.
newbie
Activity: 25
Merit: 1
hello,

I read this post several, several, several times and i can't understand how it is possible to half a point like the first example.
Is it possible without the private key to divide a point by 2 ?

assume i have like the first example a point without the private key for it and divide it by 2

x = 545d2c25b98ec8827f2d9bee22b7a9fb98091b2008bc45b3b806d44624dc038c
y = f1e18224b09ed00841c5407e571829e41876d44522f97e05e405a91ef38d4f00

How get ?

x = 8f870b1693cb408f96a3da9e3623b6d0315a403395d79f412f26044210bcddd2
y = 8a0a3e2399787a1f084d53500bc577ba1cc4e19ab7b2d9a2bd327e5e56e8afa0

I clearly don't understand the concept of multiply by 2^-1 (mod n)
is it possible for someone to clarify this with an real example (not n, N P Q ETC... LOL ..I was the one sleeping in math classroom ^)

Thanks
copper member
Activity: 193
Merit: 234
Click "+Merit" top-right corner
This makes no sense at all.

First, the public address is a hashed public key, so unless there are major flaws in both SHA256 and RIPEMD-160 (hint: there aren't), you cannot take a public address and derive its public key (and its X and Y coordinates on the elliptic curve).

The public address and the public key are two different things.

Second, the math above is... a complete mess.

Third, even if you hypothetically could, what the heck would be the point of all this?
newbie
Activity: 24
Merit: 0
Hi,
How to Calculate x ,y in Addresses,can you explain more.. if any code in git-hub
can you explain step by  guide please..
I am New to bitcoin ....
please inbox me to learn something...



It is simple XY coordinate python script:
import bitcoin as b
pubkey = b.decode_pubkey("02545d2c25b98ec8827f2d9bee22b7a9fb98091b2008bc45b3b806d44624dc038c")
print("X:", hex(pubkey[0]), "Y:", hex(pubkey[1]))
legendary
Activity: 3430
Merit: 10504
To better understand it, you can do some calculations on smaller finite fields, for example using modulo 67. You can start from 1 and multiply it by two. You will get 1,2,4,8,16,32,64 and then suddenly you will get 128-67=61. Here you can see that dividing 61 by two will give you 64.

your calculation is wrong, 61 divided by 2 in this group does give you 64. read my post above.
your mistake is that you are calculating 61/2=30.5 using simple arithmetic whereas all the calculations here are modular arithmetic meaning:
Code:
61/2 ≡ 61 * 34 ≡ 2047 ≡ 64 (mod 67)
where 34 is calculated by solving this:
Code:
2*x ≡ 1 (mod 67)
newbie
Activity: 8
Merit: 36
When you read about ECDSA used in Bitcoin, you probably learn about adding points and doubling it. But it is also possible to subtract any two points. You can also multiply or divide any point by any number, but you cannot multiply or divide two public keys without knowing at least one matching private key.

Halving a point is possible, but it does not break ECDSA security. It is a bit different than typical integer division when you can just divide everything by two and quickly come to zero and break everything. It is not the case when using ECDSA and doing calculations over finite field.

To better understand it, you can do some calculations on smaller finite fields, for example using modulo 67. You can start from 1 and multiply it by two. You will get 1,2,4,8,16,32,64 and then suddenly you will get 128-67=61. Here you can see that dividing 61 by two will give you 64.
legendary
Activity: 3430
Merit: 10504
How to Calculate x ,y in Addresses,can you explain more.. if any code in git-hub
can you explain step by  guide please..

you can't calculate x,y from a bitcoin address since addresses are basically the hash of a public key (ie. x,y coordinates) and hashes are not reversible.
what OP is explaining is where you already have the public key and want to compute (1/2)*pubkey which is a simple multiplication of the public key with modular multiplicative inverse of 2. any crypto library that has ECC also has a method for computing "ModInverse" and "point multiplication".
newbie
Activity: 7
Merit: 0
Hi,
How to Calculate x ,y in Addresses,can you explain more.. if any code in git-hub
can you explain step by  guide please..
I am New to bitcoin ....
please inbox me to learn something...
newbie
Activity: 22
Merit: 3
2^-1 (mod n) = 57896044618658097711785492504343953926418782139537452191302581570759080747169


2 * 57896044618658097711785492504343953926418782139537452191302581570759080747169 = 1 (mod n)

Multiplying a point by this number will "half" the point.
newbie
Activity: 4
Merit: 0
The goal is to "half" the point. You want to find the point Q where 2Q = P, your original point.

So you compute 2^-1 (mod n) where n is the order of the group (see the secp256k1 parameters: https://en.bitcoin.it/wiki/Secp256k1)

2^1 is the multiplicative inverse of 2 (mod n). 2 x 2^1 = 1 (mod n). When you do the scalar multiplication it cancels out a factor of 2.

2Q = P

(2^-1)2Q = (2^-1)P

Q = (2^-1)P

Hope that makes sense.

here the another answer

https://crypto.stackexchange.com/questions/59972/half-of-any-bitcoin-crypto-public-key-public-key-half-is-possible



ECC is cryptography over an elliptic curve group.

Firstly you have an elliptic curve, e.g. Bitcoin uses a Koblitz curve secp256k1 y2=x3+7.

The group is defined over curve points over a finite field Fp (integer modular p). The group elements are points on the curve. A point in the affine form consists of two coordinates P=(x,y) where x,y∈Fp.

For group elements, you can do point addition P+Q, as well as scalar multiplication sP, where s is an integer in Zn where n is the order of the group (how many elements in the group).

A public key in bitcoin is a point P. To do P2, you multiply 12 to P where 12 is the multiplicative inverse of 2 in Zn. It is an integer that can be found using the extended Euclidean algorithm and is 57896044618658097711785492504343953926418782139537452191302581570759080747169 in the case of secp256k1.



but in crypt o ,

private key 3

x =  f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
y =  388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672

half of the above public key is 1 given below

x =  79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
y =  483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

but the output is

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010

what wrong in this how to correct this

3/2 = 1


  
newbie
Activity: 22
Merit: 3
The goal is to "half" the point. You want to find the point Q where 2Q = P, your original point.

So you compute 2^-1 (mod n) where n is the order of the group (see the secp256k1 parameters: https://en.bitcoin.it/wiki/Secp256k1)

2^1 is the multiplicative inverse of 2 (mod n). 2 x 2^1 = 1 (mod n). When you do the scalar multiplication it cancels out a factor of 2.

2Q = P

(2^-1)2Q = (2^-1)P

Q = (2^-1)P

Hope that makes sense.




newbie
Activity: 4
Merit: 0
Sure, just multiply the point by 2^-1 (mod n).

How its possible there is scalar addition, subtraction and multiplication only , can you explain more (multiply the point by 2^-1 (mod n))
newbie
Activity: 22
Merit: 3
Sure, just multiply the point by 2^-1 (mod n).
newbie
Activity: 1
Merit: 0
To get half of any given bitcoin (crypt o) public key is possible, Technically it's possible, we made that.  The public key that's in the bitcoin network.

Public key x and y == Double(Half of the Public key x and y)

Example's:

Address

Code:
1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx

Public key in network

Code:
02545d2c25b98ec8827f2d9bee22b7a9fb98091b2008bc45b3b806d44624dc038c

Public key x and y

Code:
x = 545d2c25b98ec8827f2d9bee22b7a9fb98091b2008bc45b3b806d44624dc038c
y = f1e18224b09ed00841c5407e571829e41876d44522f97e05e405a91ef38d4f00

Half of the above public key

Code:
x = 8f870b1693cb408f96a3da9e3623b6d0315a403395d79f412f26044210bcddd2
y = 8a0a3e2399787a1f084d53500bc577ba1cc4e19ab7b2d9a2bd327e5e56e8afa0



Address

Code:
1JCe8z4jJVNXSjohjM4i9Hh813dLCNx2Sy

Public key in network

Code:
037f73b63c10ce53c1b73800751d859915badcf5423da1fd7fabfc8556a833f0bd

Public key x and y

Code:
x = 7f73b63c10ce53c1b73800751d859915badcf5423da1fd7fabfc8556a833f0bd
y = bb2402fa216c2eeafc8e5667c8290c8e28199cb7e48bef2fffbdee5dff0ad277

Half of the above public key

Code:
x = acbe1e6677d64cbbb501f3e1e43604bc478e57fcc473e78dd06a6cb3de223c6d
y = d3bf86be940c6a60352da18297d3c3c23a6db42e586fa74294c32a0d7c1b4a88

Half of the above public key

Code:
x = ae05a1d169edb67fe94fef428b6594ba218ce157bb04c8dac2889b805f6e8965
y = 18897d88bb3c44476d8c204bf29650f159c47f6138913ab04ba37fc7bf3081cb



Address

Code:
12ib7dApVFvg82TXKycWBNpN8kFyiAN1dr

Public key in network

Code:
04d6597d465408e6e11264c116dd98b539740e802dc756d7eb88741696e20dfe7d3588695d2e7ad23cbf0aa056d42afada63036d66a1d9b97070dd6bc0c87ceb0d

Public key x and y

Code:
x = d6597d465408e6e11264c116dd98b539740e802dc756d7eb88741696e20dfe7d
y = 3588695d2e7ad23cbf0aa056d42afada63036d66a1d9b97070dd6bc0c87ceb0d

half of the above public key

Code:
x = dc0f6e4ff971e22fffa77df43d24128046599f9b2299bc7a6fbc4e7e9fc4a0ff
y = 615f1884faa5197a00560ecb69f2b18ef223a3dfaee2407d4ea5a2286de2a41b
Jump to: