Bitcoin Forum
May 02, 2024, 05:44:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about P2PKH  (Read 145 times)
victorkimba17 (OP)
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 09, 2019, 05:48:41 AM
 #1

I read this article in https://en.bitcoin.it/wiki/Transaction

P2PKH uses :
Code:
scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

scriptSig is supplied by the redeemer. scriptPubKey is from the referred previous transaction.

For example. i send bitcoin to the recipient using the pubkeyHash of the recipient. Because the redeeming condition requires the pubKey and the sig, does it mean anyone with the pubKey and sig can redeem the bitcoin?
1714671846
Hero Member
*
Offline Offline

Posts: 1714671846

View Profile Personal Message (Offline)

Ignore
1714671846
Reply with quote  #2

1714671846
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6577


Just writing some code


View Profile WWW
May 09, 2019, 06:00:08 AM
Merited by ABCbits (1)
 #2

Because the redeeming condition requires the pubKey and the sig, does it mean anyone with the pubKey and sig can redeem the bitcoin?
Yes. Anyone who can provide the public key and a valid signature can spend that output. However there is no one signature; the signature is specific to the spending transaction. So in order to create a valid signature, you also need to have the private key for the public key.

victorkimba17 (OP)
Jr. Member
*
Offline Offline

Activity: 113
Merit: 5


View Profile
May 09, 2019, 06:45:21 AM
 #3

Thank you.

From:
https://bitcoin.org/en/transactions-guide#introduction

Code:
An secp256k1 signature made by using the ECDSA cryptographic formula to combine certain transaction data
 (described below) with Bob’s private key. This lets the pubkey script verify that Bob owns the private key which
created the public key.
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!