2

I'm making my first steps in blockchain development and I have a questions about storing some sensitive data on a blockchain.

Assuming that two companies developed the protocol of document exchange through Blockchain. They don't want to give access to their information to anybody except themselves.

Ok, I think they can choose between two possibilities:

  1. Content of docs is encoded cryptographically. The result is recorded on Blockchain directly. Pro: companies must not maintain their own DB's for storing docs.
    Contra: maybe it is expensive to store big data on blockchain; (the main) if verification key of a counterparty is stolen then malefactor get access to all documents since nobody can remove data from blockchain.

  2. Counterparties can record on a chain hash result of docs' content only.
    Pro: It is more safely.
    Contra: In this scenario it is impossible to create completely decentralized db since every must maintain the needed data by oneself to get whole content of docs.

Do best practices exist for storing sensitive information on a blockchain?

2

1 Answer 1

6

First of all, let me say that Blockchain technology was not intended to provide data storage and shouldn't be used like a database. It's main aim was to process transactions without trusting a third party and to eliminate double spending. Nevertheless, people found some ways to store small amounts of data like PDF files, images, audio files etc. on the blockchain. But, in doing so, people are just using the blockchain technology as a storage system.

1) Content of docs is encoded cryptographically. The result is recorded on Blockchain directly.

Like you've pointed out, storing data on the public blockchain is very costly. See this for more details. This will bloat the blockchain size in no time. Also, if you encrypt the data and place it on the blockchain, there are many downsides. The keys and mechanisms used for encrypting the text now might be broken in a few years. But, in a blockchain, all the data from the beginning of time will be present. So, after few years, there's a possibility that your cipher text might be deciphered, either through cryptanalysis or through breaking the key using exhaustive search(brute force).

Also, using the same key for encrypting documents over a long period of time is not a best practice. If the key is broken once, the attacker can compromise all the past and future communications i.e., document exchange in your case. This violates the principle of perfect forward secrecy.

2) Counterparties can record on a chain hash result of docs' content only.

This is currently the desired method to use blockchains for verifying the integrity of documents. MIT used this mechanism to store hashes for academic certificates. The code for this is made open-source. An important highlight from their article:

The blockchain is not a simple solution that will fix everything that is wrong with today’s credentials. But it does offer some possibilities for improving the system we have today–and that’s what we are excited to explore.

Finally, the first use-case that you've mentioned prevents changes to the documents exchanged, while the second use case can only detect the changes.

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.