Bitcoin Forum
May 13, 2024, 12:40:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Input scripts have keys?  (Read 187 times)
Frodek (OP)
Member
**
Offline Offline

Activity: 138
Merit: 25


View Profile
October 29, 2019, 11:34:42 AM
 #1

Usually (but not all) inuts script have two tables, first: 70-72 bytes, second 33 or 65 bytes.
This second table is public key? Where this is in Bitcoin documentation?
1715604037
Hero Member
*
Offline Offline

Posts: 1715604037

View Profile Personal Message (Offline)

Ignore
1715604037
Reply with quote  #2

1715604037
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715604037
Hero Member
*
Offline Offline

Posts: 1715604037

View Profile Personal Message (Offline)

Ignore
1715604037
Reply with quote  #2

1715604037
Report to moderator
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
October 29, 2019, 12:52:31 PM
Merited by ABCbits (1), BrewMaster (1), kzv (1)
 #2

This second table is public key?

Hi,

Yes : for spending an usual P2(W)PKH, the input(/witness) is
Code:
<signature (70-72 bytes long)><pubkey (33 or 65 bytes long)>.

Because the locking script (scriptpubkey/witness program) is in this case
Code:
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
Once having verified that the public key matches the hash in the locking script, there is only OP_CHECKSIG left, which takes <a signature><a public key> and verifies that the signature matches the public key.

Quote
Where this is in Bitcoin documentation?
You can find more about OP_CHECKSIG on the wiki : https://en.bitcoin.it/wiki/OP_CHECKSIG
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!