How to verify the signature of a raw transaction

6

1

I know there are many tools to check an ecdsa signature of a bitcoin transaction and I understand the ecdsa algorithm. It takes three inputs, a hash of the transaction, the digital signature and the public key of the sender.

In a raw transaction such as this one: http://blockexplorer.com/rawtx/9b4912711de5e258a74a529227f43647bc3b2304212fb508c5f8e910d5986270

I know the signature is the first line of the Scriptsig and the public key is the second and I assumed that the hash of the transaction is the first line on the page (also in the URL) but they don't validade and I've tried a handful of transactions from blockexplorer.

My question is, what do I take as the first variable to validate a transaction in that form?

Felipe Voloch

Posted 2013-11-17T03:38:25.470

Reputation: 226

1

possible duplicate http://bitcoin.stackexchange.com/q/32305/12983

amaclin 2015-08-12T03:50:35.340

Answers

2

See How to calculate a hash of a Tx? . The hash that serves as the ID of the transaction is not the same hash that is used for signing.

RentFree

Posted 2013-11-17T03:38:25.470

Reputation: 2 391

That's the answer to a different question. If you follow the link given in that answer (to a post of Andresen in the bitcointalk forum) and scroll to the post by etotheipi, a couple of posts below, you will see that.Felipe Voloch 2013-11-17T08:32:21.630