Author

Topic: How to calculate address? (Read 756 times)

full member
Activity: 196
Merit: 100
November 18, 2013, 04:40:18 PM
#12
...It generates a partial private key that gets converted to a public key and then added with the buyer's public key to calculate the address. Multiple sites and scripts offer this service, such as bitaddress and pybitcointools

I'd like to know the algorithm to do this so that I can do it up in PHP.

I gave you the link to the thread, if you'd read it you'd have found this link https://bitcointalksearch.org/topic/vanity-pool-vanity-address-generator-pool-84569 which explains the process reasonably clearly (it relies on the properties of the ECDSA addition operation as regards private keys and their generated public keys, not being a math guru I can't explain it myself).

I find the ECDSA code in JackJack's Pywallet to be the easiest to follow, so you may want to start there, though it does not implement the split-key algorithm. You'll need to look at the vanitygen source for that (which I find quite difficult to follow) or the javascript in bitaddress.org.
newbie
Activity: 13
Merit: 0
November 18, 2013, 11:53:27 AM
#11
I'm using vanitygen. I supply a public key to it and a prefix. It then finds the vanity address using said public key and provides me a partial private key. Sites like bitaddress.com can take that public key and the partial private key and determine the address. The public key itself is not enough; that returns a different address.

That functionality is intended for vanity key "farms" that calculate private keys as a service. The key combination ensures the generated key is known only by the client and not the service.

I was involved in a short discussion on this a while back so I'll link the thread https://bitcointalksearch.org/topic/vanity-addresses-268567 in case its of any use to you.

...It generates a partial private key that gets converted to a public key and then added with the buyer's public key to calculate the address. Multiple sites and scripts offer this service, such as bitaddress and pybitcointools

I'd like to know the algorithm to do this so that I can do it up in PHP.
full member
Activity: 196
Merit: 100
November 18, 2013, 04:38:18 AM
#10
I'm using vanitygen. I supply a public key to it and a prefix. It then finds the vanity address using said public key and provides me a partial private key. Sites like bitaddress.com can take that public key and the partial private key and determine the address. The public key itself is not enough; that returns a different address.

That functionality is intended for vanity key "farms" that calculate private keys as a service. The key combination ensures the generated key is known only by the client and not the service.

I was involved in a short discussion on this a while back so I'll link the thread https://bitcointalksearch.org/topic/vanity-addresses-268567 in case its of any use to you.
newbie
Activity: 13
Merit: 0
November 17, 2013, 11:43:33 PM
#9
In this, where would I stick the partial private key?

The private key is used to calculate the public key.

You said you already have the public key.

Not sure if this is the right section. Sorry if not.

How can I calculate the address if I have the public key and a private partial key?

Once you have the public key, that's all you need for calculating the address.

Okay let me explain the scenario.

I'm using vanitygen. I supply a public key to it and a prefix. It then finds the vanity address using said public key and provides me a partial private key. Sites like bitaddress.com can take that public key and the partial private key and determine the address. The public key itself is not enough; that returns a different address.
legendary
Activity: 3472
Merit: 4801
November 17, 2013, 11:41:00 PM
#8
In this, where would I stick the partial private key?

The private key is used to calculate the public key.

You said you already have the public key.

Not sure if this is the right section. Sorry if not.

How can I calculate the address if I have the public key and a private partial key?

Once you have the public key, that's all you need for calculating the address.
newbie
Activity: 13
Merit: 0
November 17, 2013, 11:10:34 PM
#7
Here:
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

Cheat sheet:
https://en.bitcoin.it/w/images/en/9/9b/PubKeyToAddr.png

Bitcoin now supports compressed pubkeys (only contains X value, Y value is computed) the above diagram should probably be updated to reflect that.

In this, where would I stick the partial private key?
donator
Activity: 1218
Merit: 1079
Gerald Davis
November 17, 2013, 10:42:21 PM
#6
Here:
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

Cheat sheet:


Bitcoin now supports compressed pubkeys (only contains X value, Y value is computed) the above diagram should probably be updated to reflect that.
newbie
Activity: 13
Merit: 0
November 17, 2013, 10:39:24 PM
#5
bitaddress.org and navigate to the vanity wallet

Thank you. And now how can I do it offline?

Save the site, access it from an offline computer.

All the logic is in the client side javascript.  It works just as well offline.

Alright and now let's assume I want to know how it's done.
donator
Activity: 1218
Merit: 1079
Gerald Davis
November 17, 2013, 10:34:07 PM
#4
bitaddress.org and navigate to the vanity wallet

Thank you. And now how can I do it offline?

Save the site, access it from an offline computer.

All the logic is in the client side javascript.  It works just as well offline.
newbie
Activity: 13
Merit: 0
November 17, 2013, 10:33:00 PM
#3
bitaddress.org and navigate to the vanity wallet

Thank you. And now how can I do it offline?
member
Activity: 86
Merit: 10
November 17, 2013, 10:08:10 PM
#2
bitaddress.org and navigate to the vanity wallet
newbie
Activity: 13
Merit: 0
November 17, 2013, 09:26:58 PM
#1
Not sure if this is the right section. Sorry if not.

How can I calculate the address if I have the public key and a private partial key?
Jump to: