Author

Topic: possible to decode bitcoin address from 'scriptSig' in a raw transaction? (Read 2356 times)

hero member
Activity: 707
Merit: 505
I did it with gferrin's bitcoin-code,
My confusion stemmed from the
Code:
base58.public_key_to_bc_address()
function in gavinandresen's bitcointools giving me the wrong result. (most likely I am running the wrong version or something)

Thank you for the pointers fellas Smiley
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
Yes, there are many utilities to do that, or you can write your own.  For example:

Code:
$ echo 0406b7bb1663fc7b6a8a5630038a393581fe24c4fa6da64d94fd76de758885809f40ba54c40b95040294defc84d255079b4a13d1f784c1cf271dbc0d4e864a1696 | sx addr
$ 1F1kaJLcYMFGK8Fzx5HD1gBjciGJ6U3a1e
legendary
Activity: 3472
Merit: 4801
Code:
7.  "in":[
8.    {"prev_out":
9.      {"hash":"2007ae...",
10.      "n":0},
11.    "scriptSig":"304502... 042b2d..."}],

Quote
Line 11 contains the signature of the person sending the money,
304502..., followed by a space, and then the corresponding public key, 04b2d.... Again, these are both in hexadecimal.

Can I convert the public key in scriptSig back into it's corresponding bitcoin address or is this not possible?
Thanks Smiley

http://lmgtfy.com/?q=technical+background+of+bitcoin+address&l=1
hero member
Activity: 707
Merit: 505
Code:
7.  "in":[
8.    {"prev_out":
9.      {"hash":"2007ae...",
10.      "n":0},
11.    "scriptSig":"304502... 042b2d..."}],

Quote
Line 11 contains the signature of the person sending the money,
304502..., followed by a space, and then the corresponding public key, 04b2d.... Again, these are both in hexadecimal.

Can I convert the public key in scriptSig back into it's corresponding bitcoin address or is this not possible?
Thanks Smiley
Jump to: