Author

Topic: How does HASHSIG work? (Read 161 times)

legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
January 20, 2020, 05:24:35 AM
#4
Thanks, but why the scriptSig is replaced with scriptPubKey?

did you read the replies in your other topic? the answer to this question is already explained there in 2 posts particularly in this one: https://bitcointalksearch.org/topic/m.53606106
newbie
Activity: 29
Merit: 6
January 19, 2020, 04:38:46 PM
#3
Thanks, but why the scriptSig is replaced with scriptPubKey?
hero member
Activity: 1220
Merit: 612
OGRaccoon
January 19, 2020, 04:25:33 PM
#2
OP_CODESEPARATOR is not used any more from what I can tell this was actually a security risk for bitcoin as per the post below.

The official info behind this would be as follows :

OP_CODESEPARATOR   
OPCode = 171   
Hex =  0xab   
Input = Nothing   
Output = Nothing   
Description = All of the signature checking words will only match signatures to the data after the most recently-executed OP_CODESEPARATOR.

The post below will give some more info related to this  OP code though it is no longer used as far as I can tell.

https://bitcointalksearch.org/topic/m.2760786

** Edit **

You can also read here some more info about it.

https://github.com/bitcoin/bips/blob/master/bip-0017.mediawiki
newbie
Activity: 29
Merit: 6
January 19, 2020, 11:10:41 AM
#1
Hi everyone,

I am reading an article about how HASHSIG works, but i don't understand this:

Before the signature is computed, several temporary changes are made to the transaction: The signature script of the currently signed input is replaced with the public key script, excluding all occurences of OP CODESEPARATOR in it, of the referenced transaction output.

I mean why the scriptSig is replaced with the scriptPubKey?
Jump to: