{"id":23680,"date":"2017-06-06T21:19:54","date_gmt":"2017-06-06T21:19:54","guid":{"rendered":"http:\/\/ci027cfe7b400d2697"},"modified":"2017-06-06T21:19:54","modified_gmt":"2017-06-06T21:19:54","slug":"opentimestamps-has-timestamped-entire-internet-archive-heres-how","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/technical\/opentimestamps-has-timestamped-entire-internet-archive-heres-how","title":{"rendered":"OpenTimestamps Has Timestamped the Entire Internet Archive \u2014 Here\u2019s How"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/opentimestamps-has-timestamped-the-entire-internet-archive-heres-how.jpg\" title=\"\"><\/figure>\n<p>OpenTimestamps, a project led by <a href=\"https:\/\/bitcoincore.org\/\" target=\"_blank\" rel=\"noopener\">Bitcoin Core<\/a> developer Peter Todd, just made sure the <a href=\"https:\/\/archive.org\/\" target=\"_blank\" rel=\"noopener\">Internet Archive<\/a> cannot be forged.<\/p>\n<p>Well, sort of. In a <a href=\"https:\/\/petertodd.org\/2017\/carbon-dating-the-internet-archive-with-opentimestamps\" target=\"_blank\" rel=\"noopener\">blog post<\/a> published last week, the developer and consultant explained how he used his <a href=\"https:\/\/opentimestamps.org\/\" target=\"_blank\" rel=\"noopener\">OpenTimestamps<\/a> project to timestamp all the Internet Archive\u2019s 750,000,000 files onto Bitcoin\u2019s blockchain. This means that no one \u2014 not even the Internet Archive itself \u2014 can modify this collection of books, videos, images and other records; not unnoticeably.<\/p>\n<p>Here\u2019s how he did it.<\/p>\n<h3>Merkle Trees<\/h3>\n<p>The effort is an interesting showcase of the OpenTimestamps project, an open-source and freely available timestamping service.<\/p>\n<p>OpenTimestamps works by combining two cryptographic tools.<\/p>\n<p>The first of these is a Merkle Tree, a cryptographic structure of hashes.<\/p>\n<p>Any piece of data can be hashed, which means it\u2019s scrambled and condensed into a short string of numbers: a hash. This string of numbers is seemingly random; it can\u2019t really be used for anything in itself, not even to reconstruct the original data.<\/p>\n<p>But it can be used as a sort of check. Anyone who has access to the original data can hash this data once again, and will get the exact same hash. Meanwhile, even if the original data is altered minimally (perhaps a picture includes an extra pixel), the resulting hash turns out completely different. A hash proves that the data you have is the exact same data used to create a hash.<\/p>\n<p>A Merkle Tree, then, hashes multiple hashes together. Two hashes become one hash. And another two hashes also become one hash. Then these two resulting hashes become a new hash, so all four hashes are now represented by a single hash. And these four combined hashes can perhaps be hashed together with the hash of four other combined hashes, to once again conclude into a single hash. Etcetera. Because this hashing of hashes can continue in perpetuity, a Merkle Tree can ultimately \u201cstore\u201d virtually unlimited amounts of data.<\/p>\n<p>The real magic of a Merkle Tree is that any of the original data included in the tree can be checked against the single remaining hash of a Merkle Tree: the \u201cMerkle Root,\u201d even without requiring any of the other data hashed into the Merkle Tree. You just need to know where in the tree to find the hash.<\/p>\n<p>The second piece of the puzzle is establishing when that Merkle Tree was created.<\/p>\n<h3>Bitcoin\u2019s Blockchain<\/h3>\n<p>Establishing when a Merkle Tree came into existence is done by utilizing the power of Bitcoin\u2019s blockchain. Literally, Bitcoin\u2019s power-consuming, proof-of-work system guarantees that data must have existed at a certain point in time.<\/p>\n<p>The Bitcoin blockchain is essentially a cryptographic structure, just like a Merkle Tree. But while a Merkle Tree merges hashes into a single compact hash, the blockchain merges them into a timeline. Each Bitcoin block is hashed and included in the next block. That block is hashed too and included in the block after that.<\/p>\n<p>Meanwhile, Bitcoin\u2019s proof of work makes it so that each of these blocks requires real resources to mine. Right now, this already costs thousands, perhaps even tens of thousands, of dollars per block.<\/p>\n<p>This is what makes Bitcoin\u2019s history immutable.<\/p>\n<p>\u201cChanging history,\u201d for example, by removing a transaction from an old block, cannot be done by simply removing that transaction. That would entirely change the hash of the block that included the transaction, invalidating that block. That would in turn invalidate the subsequent block as well, as it doesn\u2019t include the valid hash from the previous block, and as such it would invalidate all blocks that came after it.<\/p>\n<p>Instead, the only way to change Bitcoin\u2019s history is to completely re-mine it. An old transaction can only be \u201cremoved\u201d from a block by mining that same block again, without the transaction. And then you\u2019d need to mine the next block, and the block after that \u2026 all the way until you\u2019ve mined the longest chain. (Technically, the chain with the most accumulated proof of work.)<\/p>\n<p>This will become very expensive very quickly. Even without any competing miners, proof of work requires that re-mining a day of Bitcoin\u2019s history should cost hundreds of thousands of dollars\u2019 worth of energy. With competing miners to catch up on, you need at least a majority of hash power.<\/p>\n<p>Especially with competing miners, rewriting even a couple weeks of Bitcoin history is practically unaffordable for anyone \u2026 never mind re-writing a couple of years.<\/p>\n<p>And to top if off, re-writing this much history would be very obvious too. Many Bitcoin users would notice and would possibly take precautions to make it impossible.<\/p>\n<h3>OpenTimestamps<\/h3>\n<p>OpenTimestamps combines the magic of Merkle Trees with the immutability of Bitcoin\u2019s blockchain.<\/p>\n<p>To showcase it, Todd took 750,000,000 hashes of files from the Internet Archive last week to combine them all into one Merkle Tree. The \u201croot\u201d of that tree, then, was placed into a <a href=\"http:\/\/blocktrail.com\/#!\/BTC\/tx\/564d27fc17068e8d4c997a86287fe79b37b07552b3fb5e3c11c1a3d4fd933882\" target=\"_blank\" rel=\"noopener\">Bitcoin transaction<\/a>. He sent that transaction over the Bitcoin network to have it included in the Bitcoin blockchain. This is now a couple of weeks ago and virtually impossible to ever revert.<\/p>\n<p>As a result, almost the entire Internet Archive is now hashed into Bitcoin\u2019s blockchain. Anyone can take any document from the Internet Archive and verify that it existed in its current form four weeks ago. If the hash checks out, the document has not been altered since, nor could it have been created later.<\/p>\n<p>Finally, to make this timestamp actually useful, the OpenTimestamps team \u2014 specifically Riccardo Casatta, Luca Vaccaro and Igor Barinov \u2014 created an accessible search interface and an in-browser timestamp verifier. With it, anyone can easily browse through the Internet Archive\u2019s database and immediately see whether the records check out with the corresponding hash, as embedded in Bitcoin\u2019s blockchain.<\/p>\n<p>For the first time in history, historical archived data cannot be altered without being noticed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the first time in history, historical archived data cannot be altered without being noticed.<\/p>\n","protected":false},"author":2509,"featured_media":23681,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[556,1568,3534,330,838],"class_list":{"0":"post-23680","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-technical","8":"tag-blockchain","9":"tag-internet","10":"tag-merkle","11":"tag-security","12":"tag-timestamp"},"author_data":{"id":2509,"name":"Aaron van Wirdum","nicename":"aaron-van-wirdum","avatar_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/12\/aaron-van-wirdum-96x96.jpg"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/opentimestamps-has-timestamped-the-entire-internet-archive-heres-how.jpg","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/23680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/2509"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=23680"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/23680\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/23681"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=23680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=23680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=23680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}