[HowTo] Immutable Proof of Timestamps on the Blockhain

Recently I have had a need for proving that I took a certain picture at a certain time. In the future I would have to prove that the picture is older, a.k.a. taken before a certain time.

I asked a good friend of mine, wich I remembered, had the same problem a while ago, when he was in a jurisdictional fight with his landlord. I remembered him telling me a about a website where you could upload the photo and they would conserve and preserve it with proof of the date you uploaded the photo. I asked him if he still knew the site. Since this was a couple of years ago he couldn’t remember out of his head and promised me to look it up.

In the meantime I was thinking to Google the stuff myself but then another idea popped into my head. I am wrapping my head around blockchain technology for a few month now and this way I just thought of now was to obvious and simple, not to try.

Put it on the (immutable and persistent) Blockchain

Yesterday I was experimenting with smart contracts on the Ethereum blockchain and did my first transaction on the testnet that got me my first „Hallo World!“ on it. This involved writhing a hex string, containing the „Hallo World!“, in the data section of the transaction. Now it came to me that this could be any string, especially a particular hash of any kind of file – inspired by the way they do it on IPFS.
So the next conclusions that was obvious, is, that a file is an image and could be hashed – no magic and even less rocket science. Since the blockchain is immutable you will always know from the timestamps when the transaction has happened. So basically, if you encode something into the blockchain, you are doing the same thing as wrapping a fly into amber. The more time passes the thicker the amber gets. And there will be hundreds of thousands, if not even millions of copies of this one message, a.k.a. hash of the file, that you have put into that „amber“.

So here’s how to do it

  • First you get yourself an Ethereum address. There are tons of good tutorials to do this with myetherwallet.com
  • Second take the file you want to create proof of and make a state-of-the-art-hash of this file/image. I use SHA-265 that is also used in the IPFS file system and blockchains like Bitcoin and Ethereum. You can do this online or even on your phone. For example at this website: md5file.com/calculator (note that it does not matter how you name the file only the content counts).
  • Get yourself some Ether on one of the major exchanges or just buy some at coinbase.com (which is the easiest to use). It does not have to be much the minimum amount will do. Could be one or two bucks. Maybe less.
  • Transfer that Ether to your wallet.
  • Now you do a transaction with your calculated hash. You can do this in a couple of ways. The most important thing, however is, that you do a transaction to somewhere and then, that you keep proof of the fact that you own the wallet a.k.a. keeping and securing your password and secret key.
    This will create your „fly in the amber“.
    If you do not want to lose your money, make a second wallet and do the transaction to there. Another way would be to send it back to your exchange. And my favorite way for you would be to send it to me, haha… 🙂  0xc0140cBC74Bf085E126eBe5F4EA7a4A308220659
  • Now you have your proof of time and file connected to each other, forever secured on the „immutable part of internet“.

Verifying the proof

This is the easy part if you followed me through until here. You just need to go to some website that gives you a view on the Ethereum blockchain, for example etherscan.io and paste your transaction code into the search bar where you will find the hash in the field „Input Data“, preceded by a „0x“.

You can now verify that the particular images – or files – hash equals the hash that you get, when you hash the original file/image. This is done exactly the same way as creating the hash. Just go to the website, upload the image and compare the hashes you get. If they match you have the exact file that was hashed beforehand.

This method also works in a secret manner. No one will know what the original image or file is or even that you have put it on the blockchain, until you reveal it to someone. They only see a hash with no meaning on the blockchain – that’s it.

Maybe this is useful for you, for me it was. Making something hundred percent proof, without relying on some services that may vanish in a couple of months or years, without spending a lot of money, just costing you a few cents.

If you want to go even further and do it for free, you can do it at one of the Ethereum testnets, for example the Ropsten Testnet. It basically has the same capabilities as the mainnet but is not backed with actual monetary value. You can Google yourself a faucet and do the whole thing as described above, on the testnet. Doing it this way would cost nothing – it just feels different. Knowing that the main Ethereum blockchain is worth about 18.000.000.000 € at the time of this writing, feels a bit more confident that it will be around for a while. 😉

So all of you who want to prove that some file existed at some certain point in time, this is the thing for you. You don’t need to rely on some hosted service or some (more or less) „trusted“ third party. Either if you are an artist/photographer and want to prove that you had the image before someone else or you want to prove to a court that the wall was wet and your landlord did not do anything about it, this is the thing for you.

There’s my example

The image

 

The computed hash from https://md5file.com/calculator: 06fb1bfd570c577844280a615f983fe2d887bbb77f1834292ca451a5d44bfd71

 

Transaction ID (from Ropsten Testnet): 0x1f62a9c9bbe1a85bc42af434c919e18cf20e894ebade281f2e3293c56f53bc33 (note that the data string on the network ALLWAS is preceded by a „0x“.  – https://ropsten.etherscan.io/tx/0x1f62a9c9bbe1a85bc42af434c919e18cf20e894ebade281f2e3293c56f53bc33

That’s it.

Further reading:

Das könnte Dich auch interessieren …

1 Antwort

  1. Ole sagt:

    Very nice article. You could only add some links for the non-technicals users on why a hash is realy a proof that can’t be faked. This is because it should be impossible to change an existing picture in a way to equal any existing hash on any blockchain. But I doubt that this can be easily mathematicaly proofen.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert