My learning on blockchain is mainly theory based. I have always been under the impression that blockchain is about data processing and data storage which I think this is where I am confused.

I have always pictured blockchain as a P2P decentralised data storage system where anyone can transfer/upload/store anything on the blockchain network. Data can be anything of a value. Any upload and transfer of data is encrypted. Data is stored encrypted. There is some magical formula that turns whatever size data into digest. Anyone who retrieve the digest will be able to turn it back to the original content with the key.

The more I delve into it, the more it seems I have been understanding it all wrong.

Data Storage

I understand Bitcoin is not meant for data storage. It can be but not meant for. I read about IPFS.

Now, the data storage part whenever it is mentioned with blockchain technology(not restricted to bitcoin), without reference to IPFS or equivalent, does the data generally mean hashes of digital signatures? We store the digital signatures of the data. We don't 'upload and save' the content like what we do with cloud storage? (Let's assume cost of storage is not an issue.)

The recipient is not able to 'convert' the digest to the original content since the original content is not 'transfer'/'store' on the blockchain at all.

If we want to encrypt the data, we will do it 'on our own' using an external service off the chain. We sign the encrypted data with private key. The recipient will use our public key to verify the digital signature and what they received is the encrypted data. The decryption part is to be communicated off the chain.

Have I understood the above correctly now?


My question is not restricted to Bitcoin but blockchain in general.

2 Answers 2


How does IPFS use Blockchain

https://ipfs.io/#how says


IPFS and the Blockchain are a perfect match! You can address large amounts of data with IPFS, and place the immutable, permanent IPFS links into a blockchain transaction. This timestamps and secures your content, without having to put the data on the chain itself.

So yes, IPFS is separate from the Bitcoin blockchain but it seems you have the option of embedding a hash in a Bitcoin transaction (for which the usual fees are needed) as proof that the hashed data existed at a point in time.

The Bitcoin blockchain is a journal of Bitcoin currency transactions. Small items like hashes can be included in the transaction details that are recorded but you pay a fee per byte and you need to have a funded wallet.

Related Questions


Both Bitcoin and IPFS have a p2p messaging protocol where peers can request and offer public data resources to each other.

Saving Data in the Bitcoin Blockchain

The Bitcoin p2p layer is quite simple and simply allows Bitcoin nodes to gossip/propagate new transactions and valid blocks which extend the chain. Bitcoin nodes take these public data resources (tx's, blocks) and validate them to determine the canonical transaction history.

Saving data in the Bitcoin blockchain means "appending it" to one of these datatypes. You can add up to 80B of arbitrary data to any TX output script which you sign (See OP_RETURN), or arbitrary data in the Coinbase transaction input script if you mine a block. Once organised into the longest chain, both TX and Blocks will immutable, and considered part of the canonical valid transaction history, and so will your arbitrary data. Of course, the amount of data is very limited and not critical to the security or functionality of Bitcoin.

Distributing Data with IPFS

You can think of IPFS as a more generalised p2p protocol, which extends beyond just gossiping/flooding the peer topology with specific types of data (transactions, blocks). IPFS nodes request/provide peers with any filetype, and extend this to any type of data the user would like to share. The data itself is hash-addressed so it can be uniquely identified (similar to tx, and blocks, which are also hash-ID'd). Furthermore, IPFS offers metadata data-types to link different files to each other via hash-links (See IPLD).

Finally, the IPFS also hosts a distributed-hash-table (see Kademlia DHT), which enables any peer to to look up a distributed global map. This can be used as a global namespace, or a distributed resource to find the address of a peer that is currently hosting your file-of-interest.

Saving data in IPFS simply means that your file is being hosted/cached by at least one of the IPFS nodes in the network. If it is requested by other nodes, it will be cached locally at each requesting node for a time period. There are no guarantees that the file will be hosted indefinitely, as network peers collectively serve as distributed cache. The only guarantee to availability is to host your file(s)/data on a IPFS server you run yourself (pinning).

IPFS is conceptually very similar to Bittorrent/Gnutella.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.