<blockquote>
  <p>Can anyone confirm exactly how the Hash value shown is computed</p>
</blockquote>

<p>By taking the raw data for the transaction (as in the bytes that are sent over the wire for the transaction) and passing it through a hash function. For Bitcoin, that is SHA-256 double (SHA-256 done twice).</p>

<blockquote>
  <p>and whether or not it contains the previous owner's signature? </p>
</blockquote>

<p>It depends. For simplicity's sake, you could say that it contains the previous owner's signature.</p>

<p>However, due to the activation of segwit, it does not always contain the signature. For segwit, the hash is not actually the hash of the entire transaction but rather parts of it that are non-segwit. Transactions that are non-segwit will have the signatures as part of the hashed data.</p>

CC BY-SA 4.0
2018-05-22T12:58:13.063Z
Awesome, thanks. So when the transaction block does not contain the signature, does the hash of transaction block 2 contain a reference to the computed has of transaction block 1 (i.e., specifically the hash of owner 1's public key + the previous hash)? According to the diagram, nothing other than public key is being hashed unless the signature is included. Is the diagram largely abstracted? Is there a spec I can see that shows exactly what gets hashed--segwit or otherwise?
Jazimov
CC BY-SA 4.0
2018-05-22T16:13:07.653Z
The diagram is largely abstract and does not contain what is actually being hashed. A more specific explanation can be found in BIP 144: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki#hashes
Ava Chow
CC BY-SA 4.0
2018-05-22T05:37:52.423Z
2018-05-22T05:37:52.423Z
Ava Chow
<p>In Satoshi Nakamoto's diagram: </p>

<p><a href="https://i.sstatic.net/HUZQ2.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HUZQ2.jpg" alt="enter image description here"></a></p>

<p>The line coming from transaction block 1 and going the the "Hash" label in transaction block 2 appears to represent the hash of the entire transaction block (Owner 1's Public Key + Hash + Owner 0's Signature) rather than represent the Hash value shown in transaction block 1 (in which case the line should (technically) be attached to the Hash block rather than to the border of the transaction block). Can anyone confirm exactly how the Hash value shown is computed and whether or not it contains the previous owner's signature? </p>

<transactions><bitcoin-core><transaction-verification><satoshi-nakamoto>
Satoshi Nakamoto's Transaction Chain Diagram Hash Value
Jazimov
# Satoshi Nakamoto's Transaction Chain Diagram Hash Value

(Asked by: username_0 on 2018-05-22)

In Satoshi Nakamoto's diagram:

[![enter image description here](https://i.sstatic.net/HUZQ2.jpg)](https://i.sstatic.net/HUZQ2.jpg)

The line coming from transaction block 1 and going the the "Hash" label in transaction block 2 appears to represent the hash of the entire transaction block (Owner 1's Public Key + Hash + Owner 0's Signature) rather than represent the Hash value shown in transaction block 1 (in which case the line should (technically) be attached to the Hash block rather than to the border of the transaction block). Can anyone confirm exactly how the Hash value shown is computed and whether or not it contains the previous owner's signature?

**Tags:** transactions, bitcoin-core, transaction-verification, satoshi-nakamoto


---

## 1 answers

### Answer by username_1 on 2018-05-22. Score: 5 | Accepted answer

> Can anyone confirm exactly how the Hash value shown is computed

By taking the raw data for the transaction (as in the bytes that are sent over the wire for the transaction) and passing it through a hash function. For Bitcoin, that is SHA-256 double (SHA-256 done twice).

> and whether or not it contains the previous owner's signature?

It depends. For simplicity's sake, you could say that it contains the previous owner's signature.

However, due to the activation of segwit, it does not always contain the signature. For segwit, the hash is not actually the hash of the entire transaction but rather parts of it that are non-segwit. Transactions that are non-segwit will have the signatures as part of the hashed data.

> **Comments:**
> **username_0**: Awesome, thanks. So when the transaction block does not contain the signature, does the hash of transaction block 2 contain a reference to the computed has of transaction block 1 (i.e., specifically the hash of owner 1's public key + the previous hash)? According to the diagram, nothing other than public key is being hashed unless the signature is included. Is the diagram largely abstracted? Is there a spec I can see that shows exactly what gets hashed--segwit or otherwise?  
> **username_1**: The diagram is largely abstract and does not contain what is actually being hashed. A more specific explanation can be found in BIP 144: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki#hashes  

---

