<p>According to some of his other writings, Satoshi had a working prototype when he wrote the whitepaper¹. The whitepaper gives a high-level overview of how Bitcoin works, and to that end, Satoshi simplified some of the concepts.</p>
<p>For example, &quot;We define an electronic coin as a chain of digital signatures.&quot; is a simplification, because transactions can have multiple inputs and multiple outputs. The resulting structure is a directed acyclic graph, not a chain.</p>
<p>Likewise, the &quot;Hash&quot; box being composed from previous transaction and public key of the recipient is a simplification. The first output type, Pay to Public Key (P2PK), locked funds to the recipient's public key (literally: <code>&lt;pubkey&gt; OP_CHECKSIG</code>). Meanwhile, inputs identify which &quot;coin&quot; they're spending by referencing the transaction output's outpoint, <code>txid:vout</code>, composed of transaction id and position in the output list. For signing, we then create a digest of the entire transaction to commit to the exact inputs and outputs as well as other details of the transaction. This hash of the transaction to be signed, the <em>sighash</em>, is then used as the input for the signing algorithm, along with the senders private key. As you can see, the whitepaper does not provide nearly enough information to deduce the actual implementation.</p>
<p>The whitepaper does a fine job explaining Bitcoin in broad strokes, but the actual implementation details only became apparent when the software itself was published. Here's for example a copy of the <a href="https://github.com/JeremyRubin/satoshis-version" rel="nofollow noreferrer">original release's codebase</a> annotated by Jeremy Rubin.</p>
<hr />
<p><sup>¹ A <em>whitepaper</em> is a document meant to give a concise overview of something, usually to entice readers to learn more about a product or proposal. (And it worked! Read it some nine or ten years ago, I'm still fascinated.) However, it's a marketing document. It's not meant to be a comprehensive technical document. I don't understand why people are acting as if it were some form of ultimate truth (in this vein, see e.g. this <a href="https://gist.github.com/harding/dabea3d83c695e6b937bf090eddf2bb3" rel="nofollow noreferrer">errata</a>).</sup></p>

CC BY-SA 4.0
2022-01-23T15:42:51.973Z
Thanks for taking the time to answer. I was trying to put myself in the mindset of someone who would've been on the mailing list at the time and seen this whitepaper.  If you saw Satoshi's email and whitepaper back in '08 and you had only read the abstract and introduction and then you read section 2 (transactions) how would you have interpreted what he was saying? Would you reply to him and tell him to be a bit more precise? Or do you think he deliberately left it a bit vague as if to say 'the implementation could very, but this is the gist of it'?
Kryptonite
CC BY-SA 4.0
2022-01-23T15:47:43.440Z
Also, do you know where I would find a copy of the original code? I don't think his prototype was ever released publicly, not sure, where would I find earliest version?
Kryptonite
CC BY-SA 4.0
2022-01-24T01:24:32.197Z
@Kryptonite: I added a link to a copy of the originally released sourcecode.
Murch
CC BY-SA 4.0
2022-01-24T04:35:16.943Z
Oh, just seeing your previous comment. I've added a comment on how I perceive the whitepaper.
Murch
CC BY-SA 4.0
2022-01-25T10:04:33.653Z
Okay that's helped to clear a few things up, especially the erratum you linked to - that's exactly what I was after, thanks.
Kryptonite
CC BY-SA 4.0
2022-01-25T13:15:46.413Z
Great, glad to hear it was helpful.
Murch
CC BY-SA 4.0
2022-01-23T14:15:43.887Z
2022-01-24T04:35:04.127Z
2022-01-24T04:35:04.127Z
Murch
<p>I have read the whitepaper a few times now, I just want to know precisely what Satoshi meant by 'digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin.'<a href="https://i.sstatic.net/kXI76.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kXI76.png" alt="enter image description here" /></a></p>
<p>Forget everything you know about Bitcoin, imagine you are reading this for the first time in late 2008 and you have only read the abstract and sections 1&amp;2. Does he mean:</p>
<ol>
<li>Get hash of previous transaction, <em>Prev_Hash</em></li>
<li>Get public key of whom we are transferring coin to, <em>Pub_Key</em></li>
<li>Concatenate these two strings, <em>New_String = concat(Prev_Hash,Pub_Key)</em></li>
<li>Digitally sign <em>New_String</em> using whatever algorithm (no mention of specifics in
whitepaper)</li>
</ol>
<p><strong>OR</strong></p>
<ol>
<li>Get previous transaction, <em>Prev_Tx</em></li>
<li>Get public key of whom we are transferring coin to, <em>Pub_Key</em></li>
<li>Concatenate these two strings, <em>New_String = concat(Prev_Tx, Pub_Key)</em></li>
<li>Hash <em>New_String</em>, <em>Hashed_New_String</em></li>
<li>Digitally sign <em>Hashed_New_String</em> using whatever algorithm</li>
</ol>
<p>Or any other ways of going about it, such as signing a hash of Prev_Tx, and then Also signing a hash of Pub_key and having 2 signatures.</p>
<p>I want to explore evolution of Bitcoin in a chronological way by trying to put myself in the shoes of the people working on it at the very start and so I want to know what Satoshi really meant. Can't seem to find anything online</p>

CC BY-SA 4.0
2022-01-23T12:31:20.200Z
I think the first would be best since then when you decrypt it you are left with a string and then if you know, for example, the first 32bytes refers to the Prev_Hash (because it is output of SHA_256), then you can just split this string into 2 and the first string would be a digital fingerprint of the previous transaction you are referring to and the second string would be the public key you are transferring to. This is all a miner would need in order to validate a transaction, is it not?
Kryptonite
CC BY-SA 4.0
2022-01-23T12:33:22.233Z
Also, exactly what is included in each transaction, 3 things? Pub_Key of next owner, hash of previous transaction, and the signature? [Pub_Key, Hash(Prev_Tx), Sig]? So when a miner receives this tuple, they looks at second entry to get "Tx_id" and find it in the blockchain, they then use the first entry of Prev_Tx to decrypt the Sig (3rd entry) and then they can use the first 2 entries and do: concat(Prev_Hash,Pub_Key) and check to see if both are equal?
Kryptonite
CC BY-SA 4.0
2022-01-23T12:37:56.253Z
"TX_id" being defined as the hash of the transaction...
Kryptonite
CC BY-SA 4.0
2022-01-23T13:41:38.450Z
You can (and should) edit your question rather than adding comments. In stackexchange websites, comments are temporary and disposable. Comments are mainly to assist an author to improve a question or an answer.
RedGrittyBrick
CC BY-SA 4.0
2022-01-23T15:44:34.623Z
Ah okay, I will do in future, it's my first time on here so I wasn't aware
Kryptonite
<transactions><satoshi-nakamoto><whitepaper>
Bitcoin Whitepaper - Details of digital signature used in transactions
Kryptonite
# Bitcoin Whitepaper - Details of digital signature used in transactions

(Asked by: username_0 on 2022-01-23)

I have read the whitepaper a few times now, I just want to know precisely what Satoshi meant by 'digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin.'[![enter image description here](https://i.sstatic.net/kXI76.png)](https://i.sstatic.net/kXI76.png)

Forget everything you know about Bitcoin, imagine you are reading this for the first time in late 2008 and you have only read the abstract and sections 1&2. Does he mean:

1. Get hash of previous transaction, *Prev\_Hash*
2. Get public key of whom we are transferring coin to, *Pub\_Key*
3. Concatenate these two strings, *New\_String = concat(Prev\_Hash,Pub\_Key)*
4. Digitally sign *New\_String* using whatever algorithm (no mention of specifics in
   whitepaper)

**OR**

1. Get previous transaction, *Prev\_Tx*
2. Get public key of whom we are transferring coin to, *Pub\_Key*
3. Concatenate these two strings, *New\_String = concat(Prev\_Tx, Pub\_Key)*
4. Hash *New\_String*, *Hashed\_New\_String*
5. Digitally sign *Hashed\_New\_String* using whatever algorithm

Or any other ways of going about it, such as signing a hash of Prev\_Tx, and then Also signing a hash of Pub\_key and having 2 signatures.

I want to explore evolution of Bitcoin in a chronological way by trying to put myself in the shoes of the people working on it at the very start and so I want to know what Satoshi really meant. Can't seem to find anything online

**Tags:** transactions, satoshi-nakamoto, whitepaper

> **Comments:**
> **username_0**: I think the first would be best since then when you decrypt it you are left with a string and then if you know, for example, the first 32bytes refers to the Prev_Hash (because it is output of SHA_256), then you can just split this string into 2 and the first string would be a digital fingerprint of the previous transaction you are referring to and the second string would be the public key you are transferring to. This is all a miner would need in order to validate a transaction, is it not?  
> **username_0**: Also, exactly what is included in each transaction, 3 things? Pub_Key of next owner, hash of previous transaction, and the signature? [Pub_Key, Hash(Prev_Tx), Sig]? So when a miner receives this tuple, they looks at second entry to get "Tx_id" and find it in the blockchain, they then use the first entry of Prev_Tx to decrypt the Sig (3rd entry) and then they can use the first 2 entries and do: concat(Prev_Hash,Pub_Key) and check to see if both are equal?  
> **username_0**: "TX_id" being defined as the hash of the transaction...  
> **username_1**: You can (and should) edit your question rather than adding comments. In stackexchange websites, comments are temporary and disposable. Comments are mainly to assist an author to improve a question or an answer.  
> **username_0**: Ah okay, I will do in future, it's my first time on here so I wasn't aware  

---

## 1 answers

### Answer by username_2 on 2022-01-23. Score: 2 | Accepted answer

According to some of his other writings, Satoshi had a working prototype when he wrote the whitepaper¹. The whitepaper gives a high-level overview of how Bitcoin works, and to that end, Satoshi simplified some of the concepts.

For example, "We define an electronic coin as a chain of digital signatures." is a simplification, because transactions can have multiple inputs and multiple outputs. The resulting structure is a directed acyclic graph, not a chain.

Likewise, the "Hash" box being composed from previous transaction and public key of the recipient is a simplification. The first output type, Pay to Public Key (P2PK), locked funds to the recipient's public key (literally: `<pubkey> OP_CHECKSIG`). Meanwhile, inputs identify which "coin" they're spending by referencing the transaction output's outpoint, `txid:vout`, composed of transaction id and position in the output list. For signing, we then create a digest of the entire transaction to commit to the exact inputs and outputs as well as other details of the transaction. This hash of the transaction to be signed, the *sighash*, is then used as the input for the signing algorithm, along with the senders private key. As you can see, the whitepaper does not provide nearly enough information to deduce the actual implementation.

The whitepaper does a fine job explaining Bitcoin in broad strokes, but the actual implementation details only became apparent when the software itself was published. Here's for example a copy of the [original release's codebase](https://github.com/JeremyRubin/satoshis-version) annotated by Jeremy Rubin.

---

¹ A *whitepaper* is a document meant to give a concise overview of something, usually to entice readers to learn more about a product or proposal. (And it worked! Read it some nine or ten years ago, I'm still fascinated.) However, it's a marketing document. It's not meant to be a comprehensive technical document. I don't understand why people are acting as if it were some form of ultimate truth (in this vein, see e.g. this [errata](https://gist.github.com/harding/dabea3d83c695e6b937bf090eddf2bb3)).

> **Comments:**
> **username_0**: Thanks for taking the time to answer. I was trying to put myself in the mindset of someone who would've been on the mailing list at the time and seen this whitepaper.  If you saw Satoshi's email and whitepaper back in '08 and you had only read the abstract and introduction and then you read section 2 (transactions) how would you have interpreted what he was saying? Would you reply to him and tell him to be a bit more precise? Or do you think he deliberately left it a bit vague as if to say 'the implementation could very, but this is the gist of it'?  
> **username_0**: Also, do you know where I would find a copy of the original code? I don't think his prototype was ever released publicly, not sure, where would I find earliest version?  
> **username_2**: @username_0: I added a link to a copy of the originally released sourcecode.  
> **username_2**: Oh, just seeing your previous comment. I've added a comment on how I perceive the whitepaper.  
> **username_0**: Okay that's helped to clear a few things up, especially the erratum you linked to - that's exactly what I was after, thanks.  
> **username_2**: Great, glad to hear it was helpful.  

---

