Bitcoin Forum
December 11, 2019, 03:51:45 AM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Input scripts have keys?  (Read 76 times)
Frodek
Member
**
Offline Offline

Activity: 125
Merit: 15


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?
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1576036305
Hero Member
*
Offline Offline

Posts: 1576036305

View Profile Personal Message (Offline)

Ignore
1576036305
Reply with quote  #2

1576036305
Report to moderator
1576036305
Hero Member
*
Offline Offline

Posts: 1576036305

View Profile Personal Message (Offline)

Ignore
1576036305
Reply with quote  #2

1576036305
Report to moderator
darosior
Full Member
***
Offline Offline

Activity: 209
Merit: 256



View Profile WWW
October 29, 2019, 12:52:31 PM
Merited by ETFbitcoin (1), kzv (1), BrewMaster (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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!