Bitcoin Address Wiki Issue

4

I'm having issues following through the technical wiki here - https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses

Point 2 says to perform a SHA256 hash on the public key, which I'm understanding is "0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"

When I try and perform a SHA256 hash on this using an online calculator such as http://www.xorbin.com/tools/sha256-hash-calculator I get a hash of 32511e82d56dcea68eb774094e25bab0f8bdd9bc1eca1ceeda38c7a43aceddce

Can anyone explain to me why I'm getting a different hash to their example given? Am I assuming the wrong public key? Is it only meant to be a segment of that? Or does the wiki have a mistake.

ConfusedUser

Posted 2013-03-31T04:35:10.970

Reputation: 43

Answers

4

The SHA256 hash tool you're using doesn't decode the hex into binary before hashing it. You can test that by passing in a string that isn't valid hex, like 'fhwdgads.' The wiki article assumes that you do that.

This one will do what you want if you select the "Binary hash" option.

Nick ODell

Posted 2013-03-31T04:35:10.970

Reputation: 27 521

2Or from the shell: $ echo -n '01234567890ABCDEF' | xxd -r -p | sha256sum -b – Stephen Gornick – 2013-03-31T23:28:38.810