0

I am trying to create a raw TX and sign it. I know that to sign a transaction we need the message hash (here m) value which is double sha256 hash of something like this:

01000000 #Version
01 #Number of Input
be66e10da854e7aea9338c1f91cd489768d1d6d7189f586d7a3613f2a24d5396 #reverse hash of txid 
00000000 #Number of output to create
19 76 a9 14 dd6cce9f255a8cc17bda8ba0373df8e861cb866e 88 ac #Placeholder for purpose of signing, the scriptPub of output
ffffffff #sequence
01 #output to create
23ce010000000000 #Value to send (output val - fees)
19 76 a9 14 a2fd2e039a86dbcf0e1a664729e09e8007f89510 88 ac #address to which we are sending 
00000000 #Lock time
01000000 #Hash code

Together they can be written as:

0100000001be66e10da854e7aea9338c1f91cd489768d1d6d7189f586d7a3613f2a24d5396000000001976a914dd6cce9f255a8cc17bda8ba0373df8e861cb866e88acffffffff0123ce0100000000001976a914a2fd2e039a86dbcf0e1a664729e09e8007f8951088ac0000000001000000

Now after double hashing them the value I am getting is:

8cce3b8b2ab5644d4ab4d5c13be06608c18631fc46c0866000e67dca98d3f6bb

While the value should be:

1cde0239b55717cca8003104abc2ec2673d4f6fabea0b74351940e382e88486f

To calculate has I have used this calculator

Please help me what is wrong here. Thanks

4

0

Browse other questions tagged or ask your own question.