Hum... I used your tool to extract the private key from one of my bitcoin address :
1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt
I obtained this public key (using conversion with "openssl ec -pubout -in privkey.pem") :
-----BEGIN PUBLIC KEY-----
MIH1MIGuBgcqhkjOPQIBMIGiAgEBMCwGByqGSM49AQECIQD/////////////////
///////////////////+///8LzAGBAEABAEHBEEEeb5mfvncu6xVoGKVzocLBwKb
/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIh
AP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABJJ6TBhmiWm4
Y1ACBVJVn0oyG9Ay5IzEZq8cPyrs1PERl963YQh5UrGOT0NodynfHswkz8bUpaJW
FsowR/l9wXc=
-----END PUBLIC KEY-----
(no, I won't paste the private key here

)
Anyway, I need a tool to check that this public key (assuming it is not mine, it's just an exemple) is indeed the one of the bitcoin address 1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt
For some reasons I can only do that in bash.
So I try this :
wget -O - http://blockexplorer.com/q/hashtoaddress/$(
bc_key 1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt ~/.bitcoin/wallet.dat |
openssl ec -pubout |
grep -v 'PUBLIC KEY' |
base64 -d |
openssl dgst -sha256 |
cut -d\ -f2 |
xxd -p -r |
openssl dgst -rmd160
)
However I try, I never manage to confirm the initial bitcoin address.
What do I get wrong ?