Bitcoin Forum
May 07, 2024, 02:36:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does HASHSIG work?  (Read 145 times)
fabbit (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
January 19, 2020, 04:10:41 PM
Last edit: January 19, 2020, 08:17:06 PM by fabbit
 #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?
1715092579
Hero Member
*
Offline Offline

Posts: 1715092579

View Profile Personal Message (Offline)

Ignore
1715092579
Reply with quote  #2

1715092579
Report to moderator
1715092579
Hero Member
*
Offline Offline

Posts: 1715092579

View Profile Personal Message (Offline)

Ignore
1715092579
Reply with quote  #2

1715092579
Report to moderator
1715092579
Hero Member
*
Offline Offline

Posts: 1715092579

View Profile Personal Message (Offline)

Ignore
1715092579
Reply with quote  #2

1715092579
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715092579
Hero Member
*
Offline Offline

Posts: 1715092579

View Profile Personal Message (Offline)

Ignore
1715092579
Reply with quote  #2

1715092579
Report to moderator
1715092579
Hero Member
*
Offline Offline

Posts: 1715092579

View Profile Personal Message (Offline)

Ignore
1715092579
Reply with quote  #2

1715092579
Report to moderator
1715092579
Hero Member
*
Offline Offline

Posts: 1715092579

View Profile Personal Message (Offline)

Ignore
1715092579
Reply with quote  #2

1715092579
Report to moderator
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1202
Merit: 582


OGRaccoon


View Profile
January 19, 2020, 09:25:33 PM
Last edit: January 19, 2020, 09:44:28 PM by MagicByt3
Merited by Heisenberg_Hunter (1)
 #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://bitcointalk.org/index.php?topic=255145.msg2760786#msg2760786

** Edit **

You can also read here some more info about it.

https://github.com/bitcoin/bips/blob/master/bip-0017.mediawiki

┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
fabbit (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
January 19, 2020, 09:38:46 PM
 #3

Thanks, but why the scriptSig is replaced with scriptPubKey?
BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
January 20, 2020, 10: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://bitcointalk.org/index.php?topic=5216988.msg53606106#msg53606106

There is a FOMO brewing...
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!