How to certify a digital asset in the bitcoin’s blockchain

inthebitcoin
Keeping Stock
Published in
6 min readNov 15, 2016

Maybe you heard about certifying a file in the bitcoin’s blockchain. Below is a step by step guide how to certify, that at given moment in time you had a file

Following guide uses inthebitcoin.com service.

First, pick a file you would like to certify. I’ve picked an archived called private.zip. Next, visit https://inthebitcoin.com and click Certify a file button.

Next, fill in the simple form. There are only 2 things to fill in a file you would like to certify and password. Once the form is ready the file hash is calculated which for a large file can take few seconds — for my private.zip which is about 860MB it took 10sec.

Important info: your file is safe as it is NOT transmitted anywhere, the progress bar is all about calculating the hash of a file locally in your browser.

When the form is ready press Certify it button. On the next screen, we see details which are going to be stored and some payment options. At the moment of writing this post, there are two options to pay for the service. First, we can use a coupon to store the message for free. Information about such coupons is posted on inthebitcoin’s social channels. Unfortunately, at this moment no coupons are available and certifying our file is going to cost us 0.0044 BTC which is about $3.11 — not bad for a possibility to proof in future that I had an exact same archive private.zip in my possession today ;-)

There is an optional email input which for someone light-minded like myself might be quite important. I’m going to explain why a bit later in the post, but now let’s press Save.

Before we get to the next screen few words about what exactly will be saved in the bitcoin’s blockchain:

  • HMACSHA1 value computed from file and password
  • SIZE file size in bytes
  • FILE which is file name

This is not much but enough to later prove the possession of this particular file at this particular moment in time.

On the fourth screen, we see the payment detail and a what is called a status link. This link is quite important as it is the only way to check the status of our message. If you provided an email address a step earlier you have nothing to worry about as you will receive an email notification at the moment your message will land in the blockchain. However, if you did not provide an email you better store this link in a safe place.

Let’s make the payment. I will use the classic bitcoin core client.

Let’s choose fast confirmation time and confirm the payment.

Payment is done. Now we just have to wait for an email notification or visit the status link from time to time to check how is our message doing. As we did not provide an email address lets look at the status page.

At the beginning as our payment did not make it yet the status page looks like below:

After a while, the status will change. In normal conditions, it should take no more than 30 min. The exact time can not be predicted and depends on few factors like the current condition of the bitcoin network and the fee we’ve chosen to give away with our transaction. In rare cases, it could take up to few hours.

Waiting… waiting… BANG !!!

A few minutes later

A few minutes later

The certificate

Once the status is green we can open certificate by clicking its picture below the video.

The certificate is a single page HTML document which we should download and store next to our private.zip file. The document contains important information where our data were stored in the blockchain plus the same similar form we had to fill in before which allow for a quick and easy verification that private.zip is the very same file we used before. To do the verification just fill in the form and press the Verify button.

If and only if we supply the very same file and password certificate will highlight green indicating that everything is OK.

If you provide correct file but the wrong password the HMACSHA1 value will turn red.

If all 3 values are not green then it must be the wrong file.

Hmm, this is just a nice looking HTML certificate but how this is going to prove anything in 5 years ?

Behind the certificate and blockchain is a pretty strong math. The HMACSHA1 value is a hash of your file computed from both the file itself and provided password. Such hash is very sensitive to even a single bit change in the data. Even if you have the file and the hash, reversing the operation to guess the password is very very very difficult. Unless there is a major breakthrough in mathematics or quantum computers become dirt cheap there is no way to guess the password or modify what was stored in bitcoin’s blockchain. Because the hash value was stored in bitcoin’s blockchain we know the time when it happened.

You can use the certificate to prove that it was you who did it and that the operation happened at Nov 14, 2016 at 05:34. The prove is in these two transactions:

05afeb1d5f02c9efc8515a035e351dd0fa993c306f343ce7712365e584448810
d11aabb221caf4977255953c9e0a81eaf13d13e85a739f054737648460bb9863

We can see our message stored there. But how exactly it was stored? In the input output scripts section we can see one OP_RETURN script. The decoded value of the script contains part of the message.

Recently I had a conversation with a friend of mine who is a lawyer and this is what he said.

If someone told me a few years back that there will be anything that I could use in court to prove the digital assets possession at given time I would not believe it. But now with blockchain technology, you really can do it.

I hope you liked my tutorial and by now you know how to certify any file in the bitcoin’s blockchain.

Here another tutorial how to store a message in bitcoin’s blockchain

--

--