user138015: I'm trying to understand Pay-to-Pubkey-Hash transactions. I picked a random P2PKH  transaction in a blockchain explorer: ab3f542ad5add941f8ba4282cebab0cca81266a83cab6b98ebb8ae730477a570
As far as I understand 0312437e326ef7bef6ea13209720f308548d2d205a4bf94e73bf8233ea7e6bb769 in the scriptSig is the public key and 3b10b087f293aecbb3af71e26d17f4e0ff4ea5f7 in the scriptPubKey is the OP_HASH160 of the public key of the receiver. So I did the following:

SHA256(0312437e326ef7bef6ea13209720f308548d2d205a4bf94e73bf8233ea7e6bb769) = 7205ec1e595ce779b4d8b68fd909e00ef97eb0fdb8274951c7f923e2c82a898f
RIPEMD160(7205ec1e595ce779b4d8b68fd909e00ef97eb0fdb8274951c7f923e2c82a898f) = 73e440177e6b5e27eabef63905bb2e2c1616dc9d

I was expecting the second step to result in 3b10b087f293aecbb3af71e26d17f4e0ff4ea5f7.
What am I doing wrong?

user121614: It appears the tool you're using to generate the hashes interprets the input as ASCII or UTF-8 characters, even though it should be interpreted as a hexadecimal number.
SHA256(0312437e326ef7bef6ea13209720f308548d2d205a4bf94e73bf8233ea7e6bb769) is actually e39ddbed20e2baba5b24f0ee4532249853d22b5d76c48a7a70ec2c373f895c01.

138015: <p>I'm trying to understand Pay-to-Pubkey-Hash transactions. I picked a random P2PKH  transaction in a blockchain explorer: <a href="https://www.blockchain.com/btc/tx/ab3f542ad5add941f8ba4282cebab0cca81266a83cab6b98ebb8ae730477a570" rel="nofollow noreferrer">ab3f542ad5add941f8ba4282cebab0cca81266a83cab6b98ebb8ae730477a570</a></p>
<p>As far as I understand <code>0312437e326ef7bef6ea13209720f308548d2d205a4bf94e73bf8233ea7e6bb769</code> in the <code>scriptSig</code> is the public key and <code>3b10b087f293aecbb3af71e26d17f4e0ff4ea5f7</code> in the <code>scriptPubKey</code> is the <code>OP_HASH160</code> of the public key of the receiver. So I did the following:</p>
<ol>
<li>SHA256(0312437e326ef7bef6ea13209720f308548d2d205a4bf94e73bf8233ea7e6bb769) = 7205ec1e595ce779b4d8b68fd909e00ef97eb0fdb8274951c7f923e2c82a898f</li>
<li>RIPEMD160(7205ec1e595ce779b4d8b68fd909e00ef97eb0fdb8274951c7f923e2c82a898f) = 73e440177e6b5e27eabef63905bb2e2c1616dc9d</li>
</ol>
<p>I was expecting the second step to result in <code>3b10b087f293aecbb3af71e26d17f4e0ff4ea5f7</code>.</p>
<p>What am I doing wrong?</p>
 121614: <p>It appears the tool you're using to generate the hashes interprets the input as ASCII or UTF-8 characters, even though it should be interpreted as a hexadecimal number.</p>
<p>SHA256(0312437e326ef7bef6ea13209720f308548d2d205a4bf94e73bf8233ea7e6bb769) is actually e39ddbed20e2baba5b24f0ee4532249853d22b5d76c48a7a70ec2c373f895c01.</p>
