<p>What is meant by the both seems to be answered following the diagram in the pdf: "The transactions where <em>the input script is a signature</em>, and the <em>output script is a verification algorithm</em> are the most common type of transactions" and in context seems to directly refer to Inputs and Outputs used in Bitcoin.</p>

<p>I apologise in advance if you find my answer too simplified.</p>

<p>You can look at Inputs and Outputs like a coin in your pocket: you received it <em>as an input</em> in change while at the store last night, they received it <em>as an input</em> from the bank earlier in the week, and the bank received it <em>as an input</em> from the mint. The exact same coin at the same time was an output from the Mint that went to the bank, an output from the bank to the store, and an output from the store to you. When you give that coin to the gas station tomorrow, it will be your Output, and the gas station's Input.</p>

<p>So it is with a bitcoin: it starts life magicked into being by a miner who receives it as a reward for mining a block. He sells it for cash to pay his electric bill and so in a transaction on the blockchain, that same bitcoin is transferred as an Output from the transaction that magicked it into life, and an Input to the address of the new owner. Every single bitcoin transaction can thus be looked at as defining who owned that sum immediately beforehand: its in-script, and who may spend that coin next: its out-script. (I'm deliberately not mentioning how transaction fees affect Inputs and Outputs for simplicity.)</p>

<p>I've covered how the In and Out describes the movement of a bitcoin sum, but what about "Script"? In bitcoin (and computing generally) a Script is a very short program describing how data is to be handled. Here, the Out-script is a short program that defines the conditions under which that bitcoin may be transferred: in a standard transaction (I'll come to that shortly) the Out-script program will say something like "this sum may only be transferred by the private key that matches public key X". The In-script program will say something like "My right to receive these funds may be identified by Y". Only when combined and validated will the network at large agree that the transaction happened.</p>

<p>I've not read his entire PDF but I'll take a punt on just the section shown that The Standard Transaction he refers to is a p2pkh transaction. Your easy explanation to the diagram is this: Two sets of bitcoins (v1B and v2B) had ended up unspent in transaction Ty1 and Ty2 (think: you have two unspent coins in front of you, both received in change from different stores.) Now comes transaction Tx which identifies itself as having the right to spend those coins through In-scripts1 and 2; it imposes a condition PIx on whomever would next spend those two coins; and the result is the two are combined in one new, larger value vB. (Think: you pick the coins up and put them in your pocket.)</p>

<p>I do not consider myself an expert here, and am acutely aware the above is likely oversimplified to the point of offensiveness. If so, I apologise and encourage you to read <a href="https://en.bitcoin.it/wiki/Transaction" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Transaction</a> for a more serious background to your question.</p>

CC BY-SA 4.0
2018-12-30T13:53:24.420Z
2018-12-30T13:53:24.420Z
Alistair Mann
<p>I am new to bitcoin world and I am reading this paper: Secure multiparty computations on Bitcoin
<a href="https://eprint.iacr.org/2013/784.pdf" rel="nofollow noreferrer">https://eprint.iacr.org/2013/784.pdf</a></p>

<p>The author said on page 7 that the <em>standard bitcoin transaction</em> can be represented as in attached picture. Could anyone explain what is meant by <strong>in-script</strong> and <strong>out-script</strong>. And Could any one give a easy explaniation to that standard transaction?<a href="https://i.sstatic.net/ZtzC7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZtzC7.png" alt="enter image description here"></a> </p>

<transactions><script>
What is the meaning of in-script and out-script in standard bitcoin transaction?
Heba Mohsen
# What is the meaning of in-script and out-script in standard bitcoin transaction?

(Asked by: username_0 on 2018-12-29)

I am new to bitcoin world and I am reading this paper: Secure multiparty computations on Bitcoin
<https://eprint.iacr.org/2013/784.pdf>

The author said on page 7 that the *standard bitcoin transaction* can be represented as in attached picture. Could anyone explain what is meant by **in-script** and **out-script**. And Could any one give a easy explaniation to that standard transaction?[![enter image description here](https://i.sstatic.net/ZtzC7.png)](https://i.sstatic.net/ZtzC7.png)

**Tags:** transactions, script


---

## 1 answers

### Answer by username_1 on 2018-12-30. Score: 1

What is meant by the both seems to be answered following the diagram in the pdf: "The transactions where *the input script is a signature*, and the *output script is a verification algorithm* are the most common type of transactions" and in context seems to directly refer to Inputs and Outputs used in Bitcoin.

I apologise in advance if you find my answer too simplified.

You can look at Inputs and Outputs like a coin in your pocket: you received it *as an input* in change while at the store last night, they received it *as an input* from the bank earlier in the week, and the bank received it *as an input* from the mint. The exact same coin at the same time was an output from the Mint that went to the bank, an output from the bank to the store, and an output from the store to you. When you give that coin to the gas station tomorrow, it will be your Output, and the gas station's Input.

So it is with a bitcoin: it starts life magicked into being by a miner who receives it as a reward for mining a block. He sells it for cash to pay his electric bill and so in a transaction on the blockchain, that same bitcoin is transferred as an Output from the transaction that magicked it into life, and an Input to the address of the new owner. Every single bitcoin transaction can thus be looked at as defining who owned that sum immediately beforehand: its in-script, and who may spend that coin next: its out-script. (I'm deliberately not mentioning how transaction fees affect Inputs and Outputs for simplicity.)

I've covered how the In and Out describes the movement of a bitcoin sum, but what about "Script"? In bitcoin (and computing generally) a Script is a very short program describing how data is to be handled. Here, the Out-script is a short program that defines the conditions under which that bitcoin may be transferred: in a standard transaction (I'll come to that shortly) the Out-script program will say something like "this sum may only be transferred by the private key that matches public key X". The In-script program will say something like "My right to receive these funds may be identified by Y". Only when combined and validated will the network at large agree that the transaction happened.

I've not read his entire PDF but I'll take a punt on just the section shown that The Standard Transaction he refers to is a p2pkh transaction. Your easy explanation to the diagram is this: Two sets of bitcoins (v1B and v2B) had ended up unspent in transaction Ty1 and Ty2 (think: you have two unspent coins in front of you, both received in change from different stores.) Now comes transaction Tx which identifies itself as having the right to spend those coins through In-scripts1 and 2; it imposes a condition PIx on whomever would next spend those two coins; and the result is the two are combined in one new, larger value vB. (Think: you pick the coins up and put them in your pocket.)

I do not consider myself an expert here, and am acutely aware the above is likely oversimplified to the point of offensiveness. If so, I apologise and encourage you to read <https://en.bitcoin.it/wiki/Transaction> for a more serious background to your question.


---

