This video belongs to the openHPI course Blockchain - Sicherheit auch ohne Trust Center. Do you want to see more?
An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.
Scroll to current position
- 00:00Let's take a look now, what transactions in the Bitcoin system look like.
- 00:05So here's an example:
- 00:07Alice, a contestant, wants to make a transfer to Bob, and then such a transaction, the notification of the instruction looks like this,
- 00:18that it characterizes the addressee via his public key.
- 00:24And this public key is going with the hash of the previous message, the previous transaction into such a hash calculation, is thus coded,
- 00:37and the whole thing gets signed, so this pair of Bob's Public Key and the hash value, is then signed, encrypted with Alice's private key, then sent.
- 00:53Private key, public key, you remember, it was these asymmetric cryptographic systems.
- 01:00Each participant in the network must have two such keys, the private key that he keeps secret just for himself. and the public key that all other participants in the network also know.
- 01:15The public key is used to encrypt something, which only the recipient can decipher again,
- 01:22because the private key needed to decrypt it, is only sitting with the receiver.
- 01:28And with the signature, it's the other way around, the private key is used, in Alice's case, so anyone can check it out,
- 01:36everyone knows Alice's public key, and if he can decipher the message again, then he sees, aha, message actually comes from Alice.
- 01:45Now, the next transaction.
- 01:46The next transaction that Bob sends, and Bob sends to Charly, so take the public key from Charly,
- 01:54now takes the hash value of this transaction and welds it to Charly's public key.
- 02:05A hash value is calculated from it and signed now, signed the Bob, so he takes his private key.
- 02:15About the private key, about the signature, can be tracked over and over again, can be tracked beyond doubt, where did the transaction come from, who sent it?
- 02:23In the Bob case, here it was Alice.
- 02:26This installation of the public key is then ensured, that this transaction sent to Bob is also actually is really processed by Bob.
- 02:41And this is how it works in the network with the various transactions, with the various payment transactions.
- 02:47This transaction is addressed to Charly, Charly wants to send something to David now.
- 02:52His public key, the corresponding hash value, and Charly signs it, and it's always possible, to perform this verification using this use of keys.
- 03:04So, what is also possible that now, so that is more efficient, multiple inputs - Inputs are always the revenues - that they can be combined.
- 03:14It is always assumed that in a transaction the sum of the outputs always - outputs, that is the expenses, the coins - always matches the sum of the inputs.
- 03:29So the participants then at the end can only have the outputs at their disposal, so there's no account where the money is now, but the money can always only be spent from previous inputs.
- 03:47So if we take a look at this, the transaction assumes that therefore the sum of the inputs, that are here 2 and 1 and 3, 6, that it matches the sum of the outputs.
- 04:01That's five here and 0.5 is 5.5. Doesn't match.
- 04:06What is the reason, how is that interpreted?
- 04:10Well, that's interpreted in such a way that the difference Between the input and output in a transaction is always regarded as a transaction fee.
- 04:20So as a payment for the work that is necessary in the system, to establish that trust.
- 04:29This work will essentially consist of this, to form such blocks.
- 04:34There are different miners competing for this work, and who actually built the block at the end,
- 04:41who is the recipient of the transaction fees, which then remain here as the difference between input and output.
- 04:51In that case we had said yes, here was input 6 bitcoins, output was 5.5 so there was 0.5 left as the transaction fee, is the difference between 6 and 5.5.
- 05:07How is such a transaction addressed now? so how do you make it clear who this money's handed over to?
- 05:18And this is done with the help of the public keys of the participants.
- 05:23This pay-to-public key, P2PK, this has been the first type of Bitcoin transaction.
- 05:33This means that the output is directly sent to the public key of the addressee,
- 05:41and he can prove the possession of the corresponding private key at any time, that this is actually him.
- 05:49There are PKI, Public Key Infrastructures, in this system, where it is possible to assign public keys exactly to the participants.
- 05:58And this mechanism is used to transfer now, to carry out such transactions.
- 06:05The output, i.e. what Bob receives except for the transaction, so what Bob's credited with, he can only spend,
- 06:18if he has the appropriate signature, so if he can prove with the signature that he is the owner of the corresponding private key.
- 06:29Anyone can verify that, so that's how security gets into the system, and in this way, as a first idea, it's quite practicable to say, we always send the transactions to the recipient's public key,
- 06:44and he'll know when he's got the money, the output transferred to him, the received output, if he then wants to transfer it further, that he must then sign the corresponding message.
- 06:59So here we have the transactions, which are about this hash value - that we had seen - is then installed.
- 07:10And that's where the recipient's public key is built in, and then can be checked by anyone on the network,
- 07:20that it's justified even then, to transfer the received bitcoins to others as well.
- 07:28But then one went over and said the public key as oneself (in itself), which cannot be derived from the private key.
- 07:39That is a limitation of the computing power today, So with this Public Key System, that's guaranteed as we know it today,
- 07:48that from the public key of the private cannot be derived.
- 07:53Whether this is so in all time, even if the computers much larger computing power - you sometimes hear and read about quantum computing -
- 08:04some things in this crypto world will go much faster than they do today, and if it goes much faster, safety's gone.
- 08:10That's why they thought it might not be good at all, to send the output directly to the public key,
- 08:17but that's why the output today to the hash of the public key.
- 08:25The mechanism that anyone can check, Who was the recipient of the transaction, who was the recipient of the output
- 08:33and whether he is authorized to distribute this output further, that can be granted as well like sending that to the public key itself,
- 08:45but it's a hell of a lot safer.
- 08:48For complex conditions, so if you're there. several transfers to different parties at the same time, or from different parties,
- 09:01there's a way to do that, too, this is the so-called "Pay-to-Script-Hash", so here's what you can do to give just one example,
- 09:10one could say that a certain transaction depends on of the consent of three parties, so their public key is involved,
- 09:24and you can then specify that for the transfer you want to use of these three keys must have at least two participants, that sign there to be seen as a valid transaction.
- 09:43This means that if two of the three specified public key, that is, with the corresponding private key can be encrypted,
- 09:53then the money can be reused in the network, it's seen as a regular transaction.
- 10:01As you can see, these mechanisms are now used for mathematical regulation, that this payment traffic - we still have to see why -
- 10:14is recognized by all in the network, which is traceable about these interlinked transactions,
- 10:22if the money someone wants to spend are actually Bitcoin he has at his disposal.
To enable the transcript, please select a language in the video player settings menu.