<blockquote>
  <p>how are these files stored, encrypted and sent to B on the blockchain?</p>
</blockquote>

<p>They aren't. Those files are not stored on the blockchain nor are they transmitted to B using the blockchain.</p>

<blockquote>
  <p>Does blockchain technology handle the security of the actual digital merchandise?</p>
</blockquote>

<p>It can, if you make one that does. Bitcoin's does not.</p>

CC BY-SA 4.0
2018-09-11T16:10:05.503Z
Thanks, Andrew. (Please note that I try not to confine this to bitcoin -- I just used bitcoin to exemplify blockchain) So do most blockchain applications just transfer actual files using the general protocols on the network? How are the goods associated with the tokens used to purchase them in a transaction? What if the token is correctly recorded on the blockchain but the merchandise is hacked while being transferred? Are chain code/smart contract designed to solve this issue?
Nicholas
CC BY-SA 4.0
2018-09-11T18:06:05.003Z
@Nicholas you can use digital fingerprints/signatures to verify authenticity of digital "merchandise". You could also use them to establish ownership of a file, without actually storing the file on the blockchain, i.e. just store the fingerprint of the file, for example. Blockchains contain records of events used to establish distributed consensus, they were not designed for arbitrary file storage, but that doesn't mean it can't be done or doesn't exist.
JBaczuk
CC BY-SA 4.0
2018-09-11T15:59:32.660Z
2018-09-11T15:59:32.660Z
Ava Chow
<p>As Satoshi Nakamoto <a href="https://bitcoin.org/bitcoin.pdf" rel="nofollow noreferrer">put it</a>:</p>

<blockquote>
  <p>Transactions  that  are  computationally  impractical  to   reverse   would  protect  sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. </p>
</blockquote>

<p>Bitcoin in particular, and probably most other cryptocurrencies, are primarily concerned with moving money from actor A to actor B without needing to trust actor C. They generally do not address how to guarantee, without a trusted intermediary of some sort, that goods will subsequently move from B's control to A's control.</p>

<p>In the Bitcoin world, blockchain mining fees apply on a per-byte basis, so adding a digital "Game of Thrones complete 4K video series" to the blockchain would not be feasible. It isn't a delivery mechanism itself.</p>

<p>There's an <a href="http://www.jbonneau.com/doc/GBGN17-FC-physical_escrow.pdf" rel="nofollow noreferrer">interesting whitepaper on escrow as a solution</a> with a good set of references</p>

<blockquote>
  <p>We consider the problem of buying physical goods with cryp-
  tocurrencies.  There  is  an  inherent  circular  dependency:  should  be  the
  buyer trust the seller and pay before receiving the goods or should the
  seller trust the buyer and ship the goods before receiving payment? This
  dilemma is addressed in practice using a third party escrow service. How-
  ever, we show that naive escrow protocols introduce both privacy and
  security issues. We formalize the escrow problem and present a suite of
  schemes with improved security and privacy properties. Our schemes are
  compatible with Bitcoin and similar blockchain-based cryptocurrencies.</p>
</blockquote>

<p>The first reference is to <a href="https://en.bitcoin.it/wiki/Atomic_cross-chain_trading" rel="nofollow noreferrer">Atomic Cross-chain trading</a> which begins to address the exchange of digital assets.</p>

CC BY-SA 4.0
2018-09-11T22:07:06.560Z
2018-09-11T22:13:06.190Z
2018-09-11T22:13:06.190Z
RedGrittyBrick
<p>My understanding of how a transaction is secured in blockchain, especially in bitcoin, is that the output of transaction data is locked to the recipient's address (a shorter version of his public key). When the recipient decides to use the token locked to his address, he generates a digital signature using his private key and runs a <code>CHECKSIG</code> function on his address and the digital signature to prove that he owns the private key. I assume the <code>CHECKSIG</code> function will return a <code>True</code> and unfreeze the cryptocurrency if the digital signature matches the locked address (i.e., public key).</p>

<p>However, it looks like the transaction is just a <code>number</code> concatenating outbound address and recipient's address plus the inputs and outputs (i.e., how much money is exchanged between two addresses). This <a href="http://learnmeabitcoin.com/glossary/transaction-data" rel="nofollow noreferrer">website</a> provides a closer look at the components of transaction data.</p>

<hr>

<blockquote>
  <p>Then how is the actual transaction data stored, encrypted and sent via
  blockchain?</p>
</blockquote>

<p>For example, if A decides to buy some merchandise from B using cryptocurrency (merchandise can be digitalized, say, some valuable digital files), how are these files <strong>stored</strong>, <strong>encrypted</strong> and <strong>sent</strong> to B on the blockchain? Does blockchain technology handle the security issue of the actual digital merchandise?</p>

<transactions><blockchain><ethereum><transaction-verification><encryption>
How does blockchain technology handle the actual transaction data?
Nicholas
# How does blockchain technology handle the actual transaction data?

(Asked by: username_0 on 2018-09-11)

My understanding of how a transaction is secured in blockchain, especially in bitcoin, is that the output of transaction data is locked to the recipient's address (a shorter version of his public key). When the recipient decides to use the token locked to his address, he generates a digital signature using his private key and runs a `CHECKSIG` function on his address and the digital signature to prove that he owns the private key. I assume the `CHECKSIG` function will return a `True` and unfreeze the cryptocurrency if the digital signature matches the locked address (i.e., public key).

However, it looks like the transaction is just a `number` concatenating outbound address and recipient's address plus the inputs and outputs (i.e., how much money is exchanged between two addresses). This [website](http://learnmeabitcoin.com/glossary/transaction-data) provides a closer look at the components of transaction data.

---

> Then how is the actual transaction data stored, encrypted and sent via
> blockchain?

For example, if A decides to buy some merchandise from B using cryptocurrency (merchandise can be digitalized, say, some valuable digital files), how are these files **stored**, **encrypted** and **sent** to B on the blockchain? Does blockchain technology handle the security issue of the actual digital merchandise?

**Tags:** transactions, blockchain, ethereum, transaction-verification, encryption


---

## 2 answers

### Answer by username_1 on 2018-09-11. Score: 3

> how are these files stored, encrypted and sent to B on the blockchain?

They aren't. Those files are not stored on the blockchain nor are they transmitted to B using the blockchain.

> Does blockchain technology handle the security of the actual digital merchandise?

It can, if you make one that does. Bitcoin's does not.

> **Comments:**
> **username_0**: Thanks, Andrew. (Please note that I try not to confine this to bitcoin -- I just used bitcoin to exemplify blockchain) So do most blockchain applications just transfer actual files using the general protocols on the network? How are the goods associated with the tokens used to purchase them in a transaction? What if the token is correctly recorded on the blockchain but the merchandise is hacked while being transferred? Are chain code/smart contract designed to solve this issue?  
> **username_2**: @username_0 you can use digital fingerprints/signatures to verify authenticity of digital "merchandise". You could also use them to establish ownership of a file, without actually storing the file on the blockchain, i.e. just store the fingerprint of the file, for example. Blockchains contain records of events used to establish distributed consensus, they were not designed for arbitrary file storage, but that doesn't mean it can't be done or doesn't exist.  

---

### Answer by username_3 on 2018-09-11. Score: 2

As Satoshi Nakamoto [put it](https://bitcoin.org/bitcoin.pdf):

> Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers.

Bitcoin in particular, and probably most other cryptocurrencies, are primarily concerned with moving money from actor A to actor B without needing to trust actor C. They generally do not address how to guarantee, without a trusted intermediary of some sort, that goods will subsequently move from B's control to A's control.

In the Bitcoin world, blockchain mining fees apply on a per-byte basis, so adding a digital "Game of Thrones complete 4K video series" to the blockchain would not be feasible. It isn't a delivery mechanism itself.

There's an [interesting whitepaper on escrow as a solution](http://www.jbonneau.com/doc/GBGN17-FC-physical_escrow.pdf) with a good set of references

> We consider the problem of buying physical goods with cryp-
> tocurrencies. There is an inherent circular dependency: should be the
> buyer trust the seller and pay before receiving the goods or should the
> seller trust the buyer and ship the goods before receiving payment? This
> dilemma is addressed in practice using a third party escrow service. How-
> ever, we show that naive escrow protocols introduce both privacy and
> security issues. We formalize the escrow problem and present a suite of
> schemes with improved security and privacy properties. Our schemes are
> compatible with Bitcoin and similar blockchain-based cryptocurrencies.

The first reference is to [Atomic Cross-chain trading](https://en.bitcoin.it/wiki/Atomic_cross-chain_trading) which begins to address the exchange of digital assets.


---

