Bitcoin Forum
May 25, 2024, 01:54:03 AM *
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?
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!