0

When I search for transaction in bitcoin I am able to find explanations which tell me that there are e.g. two persons A and B and A wants to tranfer a number of bitcoin to B. Imagine A wants to pay 2 Bitcoin to B and owns an private key for 1.5 Bitcoin and 1.3 Bitcoin.

First Question: private key for what exactly? What is signed/encrypted with a public key - which system validates that I am a private key owner? (I don't need explanations for public key cryptography RSA, ElGamal and GMR are well known to me)

Now these two amounts of bitcoins are taken by a system X (what is X?) and it will be created an output with amounts 2 Bitcoin (i) and 0.8 Bitcoin (j). Where will the public and private keys for i and j are generated? How and from which holder (after generation) to which (new owner) will they be transmitted? What kind of message do they sign/encrypt (content).

0

First Question: private key for what exactly?

For the scriptPubKey that locks/encumbers the coins from being able to be spent.

An output contains instructions for sending bitcoins. Value is the number of Satoshi (1 BTC = 100,000,000 Satoshi) that this output will be worth when claimed. ScriptPubKey is the second half of a script (discussed later). There can be more than one output, and they share the combined value of the inputs. Because each output from one transaction can only ever be referenced once by an input of a subsequent transaction, the entire combined input value needs to be sent in an output if you don't want to lose it. If the input is worth 50 BTC but you only want to send 25 BTC, Bitcoin will create two outputs worth 25 BTC: one to the destination, and one back to you (known as "change", though you send it to yourself). Any input bitcoins not redeemed in an output is considered a transaction fee; whoever generates the block can claim it by inserting it into the coinbase transaction of that block.

See https://en.bitcoin.it/wiki/Transaction#Output.

which system validates that I am a private key owner?

When transactions are submitted, nodes on the network validate the signature with the scriptPubKey before including them in their mempool for miners to include in the next block.

Now these two amounts of bitcoins are taken by a system X (what is X?) and it will be created an output with amounts 2 Bitcoin (i) and 0.8 Bitcoin (j).

The transaction is created and signed using wallet software, and the transaction is submitted to the nodes on the network, it is propagated to all nodes (given it passes the validation checks).

Where will the public and private keys for i and j are generated? How and from which holder (after generation) to which (new owner) will they be transmitted? What kind of message do they sign/encrypt (content).

The private keys are generated by the user usually in their wallet software and usually the pubkey and scriptPubKey (which is encoded into an address) are also created by the user for people to send them Bitcoin. The message that is signed is the new transaction data itself.

  • Okay, let me call "all nodes" "system X" now how does X do it? I know what proof of work is and also know that a number of transactions are included in a block and the block is validated by users/nodes adding further blocks - which leads to the longest chain of blocks... – Hans Wurst Jun 20 at 16:20
  • I just read about ScriptPubKey spk and ScriptSign ss - so spk signs the output and with ss a user can unlock it to spend it - are both created by user A in my example? Is there independently another public key mechanism to show ownership? If yes, what actions does which of the systems take/secure. The ScriptSigns for each output are transmitted directly from one user to the next/the new owner (email/letter...)? – Hans Wurst Jun 20 at 16:33
  • Just updated with more detail about the wallet software, which handles the creation of keys, transactions, and transaction signing. In your example, the coins that user A owns are encumbered by a scriptPubKey that was created by user A and received a transaction previously. Ownership is determined by providing a scriptSig that matches the scriptPubkey (which usually is a cryptographic signature, but doesn't have to be). The scriptsigs are added to the transaction data which is broadcast to the network via nodes. – JBaczuk Jun 20 at 16:40
  • Thank you very much :) – Hans Wurst Jun 20 at 17:16
  • of course! have fun learning more! – JBaczuk Jun 20 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.