Using the blockchain for data storage
In a previous post I have argued that blockchains are a new source of truth and trust. In this post I'd like to investigate ways and reasons to use blockchain technology to store data.
Who puts data on a money transfer network?
Most people know the technology because of Bitcoin, which is a payment system. But other chains exist which do not focus on value. The Ethereum protocol and the new version of the Bitcoin protocol both allow for data to be attached to transactions.
The protocol is designed to store data. The data part of the transaction is signed and validated the same way as the currency part. Meaning you get a time stamp and the whole transaction is immutable.
At this point you might think "OK, but what good does it do?". Let me address that.
Reasons to store data on a blockchain
Every time you need to be able to prove you knew something at a certain point in time, the blockchain comes in handy.
Here a few examples:
- Intellectual property - proof of prior art
- Plain text counter part to smart-contracts
- Proof of state: what did my property, car, lawn-mawer look like before you took it
- Bills and other documents resulting from maintenance of an object
- Notary signature as proof of document authenticity
- Validation that an identification belongs to a certain private key
These are only some examples, I'm sure you can come up with more examples from your industry and daily work. Please post those in the comments.
The content of the document are not validated only the time and origin. The computer does not understand your data, it just stores it.
Expensive public data store
At current prices it costs around 500$ to store 1MB of data on the Ethereum blockchain. That is not a cost effective way to keep you data safe.
Additionally, anything you commit to a public blockchain becomes just that: public. Most of the time, this is not what you want.
Obviously, we need a better way to store data on the blockchain. A method that would allow to store the data at a reasonable cost and not make it available to everyone. Fortunately, that is not difficult to achieve.
Store only the shadow of the document
Every document, no matter its size, can be reduced to a quasi unique number. The process is called hashing and is a mathematical function that takes a document as its input and spits out a number as its output. For the same input it will produce the same output every time. Change a single coma in a text or a single pixel in an image or movie and the output will be completely different.
The number is determined by the function. We usually use SHA-2 256 which stands for Secure Hashing Algorithm and produces a 256 bit number as its output. To give you an idea of the number, that's between 0 and 5.7896045e+76 or a 5 with 76 zeroes behind it.
The chances that two similar documents will produce the same Hash value are nil.
How does that help?
I have argued that you can inherently trust the contents of a blockchain. By adding the hash of a document to a transaction you can therefore prove that you wrote that document before the transaction happened.
All you need to do is to produce the document along with the transaction and anyone can check if it produces the same hash value.
Where should I keep the document?
The answer to this question is, as always, it depends. If it's public information which you would like to disseminate, then IPFS or a public internet server are good choices.
If on the other hand you want to keep your information private until you need to produce it then it is best to keep it on your local machine or in an encrypted form in a public place.
The important thing is that the document is not altered in any way because any change, even the tiniest of changes, will produce a different hash value and thus invalidate your proof mechanism. Try it for yourself here
Conclusion
The blockchain provides proof of knowledge in the past. In other words: every document I store in a transaction has a time stamp and an origin that can not be falsified.
In the blockchain era nobody can claim to have had an idea before you. No more discussions over the time a picture has been taken or a document signed.
If it's on the blockchain, it's the truth.
decentralisation evangelist and blockchain developer (w3n:micha)
7 年the number is 500$ one time. Once the data is on there, it will stay for ever. But you should actually not do that. You should create a hash of your document and then publish the hash to the blockchain. This way you can proove you had the document at the time of the transaction. There is no program I know of that allows that right now but some are in development.
Investor
7 年Is the number $500 / Mb / Year? And, what simple way is there to do this? Is there a simple program that allows to write a 1mb file to the blockchain and read it back?
ex-Amazon || Head of Supplies at Europe's #1 pet supply online retailer
8 年Hi, I'm still having problems to wrap my mind around the benefits of using the blockchain approach in a retail environment. Basically every movement of goods in the warehouses and transportation streams is tracked by the warehouse management system / ERP. Is there a good example of a retailer using blockchain? Thanks Gregor
thinker, solver, creator
8 年Micha Roon In principle, yes. In practice, block chain runs over IP and subject to delays (time stamp issues) and current security vulnerabilities of the underlying IP networks (quite a few, I reckon). Don't you agree?