Bitcoin Forum
May 07, 2024, 06:28:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A Technical question about ScriptSig  (Read 144 times)
millemile (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
January 29, 2018, 03:43:52 PM
Merited by DannyHamilton (2)
 #1

Guys, I'm trying to fully understand the raw transaction hex data but got stuck at the scriptsig to publickeyhash part.
For example, in "txid": "1f1cb87e2d81582c5e39e8d7f78286c22835827359ed96976135407bda7202e2" the input compressed public key is "037cb4433473b8a644b89c6932f648c0ccc2c6974ffa0df57c6337a397cc024ed2". OP_HASH160 should convert it into its previous output ("txid": "0db0cb2986024d4555515e530cd3ff564fb267faaaf73ea266fd80a54f478368", "vout": 4,) public key hash "32fb2cfd2ac1104e68aa93d6992c89ae78f752b9".
I used first SHA256 and then RIPEMD160 on this website: http://www.md5calc.com/ to do the OP_HASH160 manually, but the results never match.
Please educate me where's the problem. Thanks in advance!
1715063318
Hero Member
*
Offline Offline

Posts: 1715063318

View Profile Personal Message (Offline)

Ignore
1715063318
Reply with quote  #2

1715063318
Report to moderator
1715063318
Hero Member
*
Offline Offline

Posts: 1715063318

View Profile Personal Message (Offline)

Ignore
1715063318
Reply with quote  #2

1715063318
Report to moderator
1715063318
Hero Member
*
Offline Offline

Posts: 1715063318

View Profile Personal Message (Offline)

Ignore
1715063318
Reply with quote  #2

1715063318
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715063318
Hero Member
*
Offline Offline

Posts: 1715063318

View Profile Personal Message (Offline)

Ignore
1715063318
Reply with quote  #2

1715063318
Report to moderator
1715063318
Hero Member
*
Offline Offline

Posts: 1715063318

View Profile Personal Message (Offline)

Ignore
1715063318
Reply with quote  #2

1715063318
Report to moderator
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
January 29, 2018, 03:51:09 PM
Last edit: January 29, 2018, 04:04:34 PM by Coding Enthusiast
Merited by stingers (6), xdrpx (3), DannyHamilton (2)
 #2

These websites treat the input as an String but your input is a Hex. You either have to write your own code that accepts Hex or if you want to use an online tool, find something that has an option to accept Hex.

Edit: Here is a tool: http://extranet.cryptomathic.com/hashcalc/index
Public Key: 037cb4433473b8a644b89c6932f648c0ccc2c6974ffa0df57c6337a397cc024ed2
First hashing using Sha256: 6e9f13f108af57fcf21a2c14f00474947573ecd9c4bbafa692f44a748c1d4c71
Second hashing using Ripmed-160 on previous result: 32fb2cfd2ac1104e68aa93d6992c89ae78f752b9
Which is the correct result.

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
millemile (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
January 29, 2018, 04:03:10 PM
 #3

These websites treat the input as an String but your input is a Hex. You either have to write your own code that accepts Hex or if you want to use an online tool, find something that has an option to accept Hex.
Many thanks! I found one here (http://extranet.cryptomathic.com/hashcalc/index) and it works very well.
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
January 29, 2018, 04:08:33 PM
 #4

These websites treat the input as an String but your input is a Hex. You either have to write your own code that accepts Hex or if you want to use an online tool, find something that has an option to accept Hex.
Many thanks! I found one here (http://extranet.cryptomathic.com/hashcalc/index) and it works very well.

Yeah, found the same thing. Added to my previous post with an edit Smiley
here is another one:
Step1: https://www.fileformat.info/tool/hash.htm?hex=037cb4433473b8a644b89c6932f648c0ccc2c6974ffa0df57c6337a397cc024ed2
Step2: https://www.fileformat.info/tool/hash.htm?hex=6e9f13f108af57fcf21a2c14f00474947573ecd9c4bbafa692f44a748c1d4c71
RipeMD160 result is: 32fb2cfd2ac1104e68aa93d6992c89ae78f752b9

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
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!