![]() The address can be transmitted through any medium, including one-way mediums which prevent the spender from communicating with the receiver, and it can be further encoded into another format, such as a QR code containing a “bitcoin:” URI. Pubkey hashes are almost always sent encoded as Bitcoin addresses, which are base58-encoded strings containing an address version number, the hash, and an error-detection checksum to catch typos. The hash shortens and obfuscates the public key, making manual transcription easier and providing security against unanticipated problems which might allow reconstruction of private keys from public key data at some later point.īob provides the pubkey hash to Alice. This pubkey hash can also be reliably repeated later, so it also does not need to be stored. The public key (pubkey) is then cryptographically hashed. Because the transformation can be reliably repeated later, the public key does not need to be stored. A copy of that data is deterministically transformed into an secp256k1 public key. Bitcoin uses the Elliptic Curve Digital Signature Algorithm ( ECDSA) with the secp256k1 curve secp256k1 private keys are 256 bits of random data. P2PKH lets Alice spend satoshis to a typical Bitcoin address, and then lets Bob further spend those satoshis using a simple cryptographic key pair.Ĭreating A P2PKH Public Key Hash To Receive Payment ¶īob must first generate a private/public key pair before Alice can create the first transaction. Both Alice and Bob will use the most common form of the standard Pay-To-Public-Key-Hash (P2PKH) transaction type. The figures below help illustrate how these features are used by showing the workflow Alice uses to send Bob a transaction and which Bob later uses to spend that transaction. (The sequence number and locktime are related and will be covered together in a later subsection.) It also has a signature script which allows it to provide data parameters that satisfy the conditionals in the pubkey script. ![]() Anyone who can satisfy the conditions of that pubkey script can spend up to the amount of satoshis paid to it.Īn input uses a transaction identifier (txid) and an output index number (often called “vout” for output vector) to identify a particular output to be spent. The output also has an amount in satoshis which it pays to a conditional pubkey script. An output has an implied index number based on its location in the transaction-the index of the first output is zero. ![]()
0 Comments
Leave a Reply. |