Author

Topic: Extract Bitcoin Address from Public Key (Read 1809 times)

member
Activity: 73
Merit: 10
member
Activity: 73
Merit: 10
August 19, 2014, 02:29:42 AM
#10
I finally used brainwallet's JS client code.

Thanks
legendary
Activity: 1260
Merit: 1019
August 19, 2014, 12:39:29 AM
#9
Quote
That isn't a Public key it is a hash.  PubKeys are 256 bits.
{troll mode on}
No.
pubkeys are 512 bits.
Yes, it is possible to "compress" it to 257 bits  Grin
{troll mode off}
donator
Activity: 1218
Merit: 1079
Gerald Davis
August 18, 2014, 09:08:13 PM
#8
What happens when you put the public key after https://blockchain.info/address/ ?

Nothing because a PubKey is not an address.   An address is a hash of the pubkey (PubKeyHash) or a hash of the script (ScriptHash) with version and checksum encoded in base58.

https://blockchain.info/address/62e28bc02c39a27ead237ff0c4039871b29be836

That isn't a Public key it is a hash.  PubKeys are 256 bits.
legendary
Activity: 3038
Merit: 1032
RIP Mommy
August 18, 2014, 08:05:49 PM
#7
What happens when you put the public key after https://blockchain.info/address/ ?

Nothing because a PubKey is not an address.   An address is a hash of the pubkey (PubKeyHash) or a hash of the script (ScriptHash) with version and checksum encoded in base58.

https://blockchain.info/address/62e28bc02c39a27ead237ff0c4039871b29be836
donator
Activity: 1218
Merit: 1079
Gerald Davis
August 18, 2014, 07:58:20 PM
#6
What happens when you put the public key after https://blockchain.info/address/ ?

Nothing because a PubKey is not an address.   An address is a hash of the pubkey (PubKeyHash) or a hash of the script (ScriptHash) with version and checksum encoded in base58.
legendary
Activity: 3038
Merit: 1032
RIP Mommy
August 18, 2014, 07:27:33 PM
#5
What happens when you put the public key after https://blockchain.info/address/

?
ffe
sr. member
Activity: 308
Merit: 250
August 18, 2014, 12:02:59 PM
#4
dig into the JavaScript from Bitaddress.org
member
Activity: 73
Merit: 10
August 18, 2014, 11:44:51 AM
#3
I'd like to avoid having to make a request to the server to extract the bitcoin address from the public key.
I found another example on how to extract it with PHP (https://stackoverflow.com/questions/19233053/hashing-from-a-public-key-to-a-bitcoin-address-in-php), but I really prefer doing in it Javascript.
full member
Activity: 518
Merit: 101
August 18, 2014, 08:44:32 AM
#2
I don't know about a javascript implementation, but for python you can check out ours:

https://github.com/orisi/wiki/wiki/Installing-the-oracle-node

And then run ./runclient.sh main

Here's a code that does it:
https://github.com/orisi/orisi/blob/master/src/client/main.py
(function main)
member
Activity: 73
Merit: 10
August 18, 2014, 07:54:01 AM
#1
Hello,

I'd like to extract the bitcoin address from a public key.
I want to create a MultiSig address and would like to check if the bitcoin address corresponds to the public key.
Does anyone know if this has already been made with Javascript?

Thanks
Jump to: