
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Mon, 13 Apr 2026 20:17:31 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Cloudflare’s public IPFS gateways and supporting Interplanetary Shipyard]]></title>
            <link>https://blog.cloudflare.com/cloudflares-public-ipfs-gateways-and-supporting-interplanetary-shipyard/</link>
            <pubDate>Tue, 14 May 2024 13:00:36 GMT</pubDate>
            <description><![CDATA[ Cloudflare is transitioning traffic that comes to our public IPFS gateway to Interplanetary Shipyard’s IPFS gateway. The transition is expected to be complete by August 14th, 2024 ]]></description>
            <content:encoded><![CDATA[ <p></p><p><a href="https://ipfs.tech/">IPFS</a>, the distributed file system and content addressing protocol, has been around since 2015, and Cloudflare has been a user and operator since 2018, when we began <a href="/distributed-web-gateway">operating a public IPFS gateway</a>. Today, we are announcing our plan to transition this gateway traffic to the IPFS Foundation’s gateway, maintained by the <a href="https://ipshipyard.com/">Interplanetary Shipyard</a> (“Shipyard”) team, and discussing what it means for users and the future of IPFS gateways.</p><p><a href="https://blog.ipfs.tech/shipyard-hello-world/">As announced in April 2024</a>, many of the IPFS core developers and maintainers now work within a newly created, independent entity called Interplanetary Shipyard after transitioning from <a href="https://protocol.ai/">Protocol Labs</a>, where IPFS was invented and incubated. By operating as a collective, ongoing maintenance and support of important protocols like IPFS are now even more community-owned and managed. We fully support this “exit to community” and are excited to support Shipyard as they build more great infrastructure for the open web.</p><p>On May 14th, 2024, we will begin to transition traffic that comes to Cloudflare’s <a href="https://docs.ipfs.tech/concepts/public-utilities/#public-ipfs-utilities">public IPFS gateway</a> to the IPFS Foundation’s <a href="https://docs.ipfs.tech/concepts/public-utilities/#public-ipfs-gateways">gateway at ipfs.io or dweb.link</a>. Cloudflare’s public IPFS gateway is just one of many – part of a distributed ecosystem that also includes Pinata, eth.limo, and many more. Visit the <a href="https://ipfs.github.io/public-gateway-checker/">IPFS Public Gateway Checker</a> to see the other publicly available IPFS gateways.</p><p>Cloudflare believes in helping build a better Internet for all and an accessible and private Internet, principles that Protocol Labs, IPFS, and Shipyard all share. We believe the IPFS gateway transition will boost ecosystem collaboration, increase protocol resiliency, and ensure healthy stewardship and governance. Cloudflare is proud to be a partner of the IPFS Project and Shipyard in this transition and will continue to help sponsor their work as gateway stewards.</p>
    <div>
      <h3>What happens next</h3>
      <a href="#what-happens-next">
        
      </a>
    </div>
    <p>All traffic using the <b>cloudflare-ipfs.com</b> or <b>cf-ipfs.com</b> hostname(s) will continue to work without interruption and be redirected to ipfs.io or dweb.link until August 14th, 2024, at which time the Cloudflare hostnames will no longer connect to IPFS and all users must switch the hostname they use to <b>ipfs.io</b> or <b>dweb.link</b> to ensure no service interruption takes place. If you are using either of the Cloudflare hostnames, please be sure to switch to one of the new ones as soon as possible ahead of the transition date to avoid any service interruptions!</p><p>It is important to Cloudflare, IPFS, and Shipyard that this transition is completed seamlessly and with as little impact to users as possible. With that in mind, there is no change to the amount or type of end user information that is visible to either Cloudflare, the IPFS Foundation, or Shipyard before or after the completion of this transition.</p><p>We’re excited to see further development and projects from the IPFS community and play our part in helping those applications be secure, performant, and reliable!</p><hr />
    <div>
      <h3>About Shipyard</h3>
      <a href="#about-shipyard">
        
      </a>
    </div>
    <p><a href="https://ipshipyard.com/">Interplanetary Shipyard</a> is an engineering collective that delivers user agency through technical advancements in <a href="https://ipfs.tech/">IPFS</a> and <a href="https://libp2p.io">libp2p</a>. As the core maintainers of open source projects in the Interplanetary Stack (including IPFS and libp2p implementations such as <a href="https://github.com/ipfs/kubo">Kubo</a>, <a href="https://github.com/ipfs/rainbow/">Rainbow</a>, <a href="https://github.com/ipfs/boxo">Boxo</a>, <a href="https://github.com/ipfs/helia">Helia</a>, and <a href="https://github.com/libp2p/go-libp2p">go-libp2p</a>/<a href="https://github.com/libp2p/js-libp2p">js-libp2p</a>), and supporting performance measurement tooling (<a href="https://probelab.io/">Probelab</a>), they are committed to open source innovation and building bridges between traditional web frameworks and the decentralized ecosystem. To achieve this, their engineers work alongside technical teams in web2 and web3 to promote adoption and drive practical applications.</p> ]]></content:encoded>
            <category><![CDATA[Web3]]></category>
            <category><![CDATA[Distributed Web]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Cloudflare Gateway]]></category>
            <guid isPermaLink="false">2301leOruEAwLBe7M7S5hk</guid>
            <dc:creator>Brian Batraski</dc:creator>
            <dc:creator>Wesley Evans</dc:creator>
            <dc:creator>Cameron Wood (Guest Author)</dc:creator>
            <dc:creator>Bethany Crystal (Guest Author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[Public access for our Ethereum and IPFS gateways now available]]></title>
            <link>https://blog.cloudflare.com/ea-web3-gateways/</link>
            <pubDate>Mon, 16 May 2022 12:57:48 GMT</pubDate>
            <description><![CDATA[ Today we are excited to announce that our Ethereum and IPFS gateways are publicly available to all Cloudflare customers for the first time ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today we are excited to announce that our Ethereum and IPFS gateways are publicly available to all Cloudflare customers for the first time. Since our announcement of our private beta last September the interest in our Eth and IPFS gateways has been overwhelming. We are humbled by the demand for these tools, and we are excited to get them into as many developers' hands as possible. Starting today, any Cloudflare customer can log into the dashboard and configure a zone for Ethereum, IPFS, or both!</p><p>Over the last eight months of the private beta, we’ve been busy working to fully operationalize the gateways to ensure they meet the needs of our customers!</p><p>First, we have created a new <a href="https://api.cloudflare.com/#web3-hostname-properties">API</a> with end-to-end managed hostname deployment. This ensures the creation and management of gateways as you continue to scale remains extremely quick and easy! It is paramount to give time and focus back to developers to focus on your core product and services and leave the infrastructural components to us!</p><p>Second, we’ve added a <a href="http://dash.cloudflare.com/?to=/:account/:zone/web3">brand new UI</a> bringing web3 to Cloudflare's zone-level dashboard. Now, regardless of the workflow you are used to, we have parity between our UI and API to ensure we fit into your existing processes and no time is wasted internally to have to figure out ‘how we integrate’, but rather, a quick setup and start to serve content or connect your services!</p><p>Third, we are pleased to say that you will soon have testnet support to ensure your new development can be easily tested, hardened, and deployed to your mainnet without incurring additional risk to your brand trust, product availability, or concern that something may fail silently and begin a cascade of problems throughout your network. We want to ensure that anyone leveraging our web3 gateways is able to achieve more confidence and trust that whatever changes are pushed forward do not impact end user experience. At the end of the day, the Internet is for end users and their experience and perception must always be kept within our purview at all times.</p><p>Lastly, Cloudflare loves to build on top of Cloudflare. This helps us stay resilient and also shows our commitment and belief in all the products we create! We have always used our SSL for SaaS and Workers products in the background. Building on our own services gives our customers the ability to define and control their own HTTP features on top of traffic destined for web3 gateways, including: rate limits, WAF rules, custom security filters, serving video, customer defined Workers logic, custom redirects and more!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/30FMdovSIlUpWq4n63c0KR/c623107c8c1991700c55cefdbd592378/image1-42.png" />
            
            </figure><p>Today thousands of different individuals, companies, and DAO's are building new products leveraging our web3 gateways -- the most reliable web3 infrastructure with the largest network</p><p>Here are just a few snippets of how people are already using our web3 Gateways, and we can’t wait to see what you build on them:</p><ul><li><p>DeFi DAO’s use the Cloudflare IPFS gateway to serve their front end web applications globally without latency or cache penalties.</p></li><li><p>NFT designers use the Ethereum Gateway to effortlessly drop new offerings, and the IPFS gateway to store them in a fully decentralized system.</p></li><li><p>Large Dapp developers trust us to handle huge traffic spikes quickly and efficiently, without rate limits or overage caps. They combine all our offerings into a single pane of glass so that they don’t have to juggle multiple systems.</p></li></ul><p>As part of this announcement, we will begin migrating our existing users away from the legacy gateway endpoints and onto our new API, which is easier, highly managed, and more robust. To ensure a smooth transition, you will first need to make sure you have signed up for a <a href="https://developers.cloudflare.com/fundamentals/get-started/setup/account-setup/">Cloudflare account</a> if you did not already have one. On top of that, we have made sure to keep our free users in mind and thus our free users will continue to use the gateways at no cost with our free tier option! This includes no cap in the amount of traffic that can be pushed through our gateways along with offering the most transparent and forecastable pricing models in the market today. We are very excited about the future and look forward to sharing the next iterations of web3 at Cloudflare!</p><p>Also, if you can’t wait to start building on our gateways, check out our <a href="https://developers.cloudflare.com/web3/">product documentation</a> for more guidance.</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Web3]]></category>
            <category><![CDATA[Ethereum]]></category>
            <category><![CDATA[IPFS]]></category>
            <guid isPermaLink="false">21fRaPsfontOlRPBBt88E5</guid>
            <dc:creator>Wesley Evans</dc:creator>
            <dc:creator>Brian Batraski</dc:creator>
        </item>
        <item>
            <title><![CDATA[Serving Cloudflare Pages sites to the IPFS network]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-on-ipfs/</link>
            <pubDate>Mon, 16 May 2022 12:57:44 GMT</pubDate>
            <description><![CDATA[ Today, we're announcing we're bridging the two. We will make it possible for our customers to serve their sites on the IPFS network ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Four years ago, <a href="/distributed-web-gateway/">Cloudflare went Interplanetary</a> by offering a gateway to the IPFS network. This meant that if you hosted content on IPFS, we offered to make it available to every user of the Internet through HTTPS and with Cloudflare protection. IPFS allows you to choose a storage provider you are comfortable with, while providing a standard interface for Cloudflare to serve this data.</p><p>Since then, businesses have new tools to streamline web development. <a href="https://workers.dev">Cloudflare Workers</a>, <a href="https://pages.cloudflare.com">Pages</a>, and <a href="/introducing-r2-object-storage/">R2</a> are enabling developers to bring services online in a matter of minutes, with built-in scaling, security, and analytics.</p><p>Today, we're announcing we're bridging the two. We will make it possible for our customers to serve their sites on the IPFS network.</p><p>In this post, we'll learn how you will be able to build your website with Cloudflare Pages, and leverage the IPFS integration to make your content accessible and available across multiple providers.</p>
    <div>
      <h2>A primer on IPFS</h2>
      <a href="#a-primer-on-ipfs">
        
      </a>
    </div>
    <p>The InterPlanetary FileSystem (IPFS) is a peer-to-peer network for storing content on a distributed file system. It is composed of a set of computers called nodes that store and relay content using a common addressing system. In short, a set of participants agree to maintain a shared index of content the network can provide, and where to find it.</p><p>Let's take two random participants in the network: Alice, a cat person, and Bob, a dog person.</p><p>As a participant in the network, Alice keeps connections with a subset of participants, referred to as her peers. When Alice is making her content 🐱 available on IPFS, it means she announces to her peers she has content 🐱, and these peers stored in their routing table 🐱 is provided by Alice's node.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6BzC2QWnSrnF6lIqzMd0S8/df749e6c4e59acccb288c078235cab46/image7-8.png" />
            
            </figure><p>Each node has a routing table, and a datastore. The routing table retains a mapping of content to peers, and the datastore retains the content a given node stores. In the above case, only Alice has content, a 🐱.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1JKs4dKwaokLGutycmasSr/ee51d2f5c4b313c920f8f9ff22778b55/image1-41.png" />
            
            </figure><p>When Bob wants to retrieve 🐱, he tells his peers they want 🐱. These peers point him to Alice. Alice then provides 🐱 to Bob. Bob can verify 🐱 is the content they were looking for, because the content identifier he requested is derived from the 🐱 content itself, using a secure, cryptographic hash function.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6kYdWRivzzXiVbC9LsDWPf/9bdcb0ae5393a7c3551b7395ab5efd61/image3-28.png" />
            
            </figure><p>Even better, if Bob becomes a cat person, they can announce to their peers they are also providing a cat. Bob's love for cats could be genuine, or because they have interest in providing the content, such as a contract with Alice. IPFS provides a common ground to share content, without being opinionated on how this content has to be stored and its guarantees.</p>
    <div>
      <h2>How Pages websites are made available on IPFS</h2>
      <a href="#how-pages-websites-are-made-available-on-ipfs">
        
      </a>
    </div>
    <p>Content is made available as follows.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7y0PyVwr6OWWm4Ql8BDeZz/22401175f3cc9f85635a155ad1b4c78c/image2-37.png" />
            
            </figure><p>The components are:</p><ul><li><p>Pages storage: Storage solution for Cloudflare Pages.</p></li><li><p>IPFS Index Proxy: Service maintaining a map between IPFS CID and location of the data. This is operated on Cloudflare Workers and using Workers KV to store the mapping.</p></li><li><p>IPFS node: Cloudflare-hosted IPFS node serving Pages content. It has an in-house datastore module, able to communicate with the IPFS Index Proxy.</p></li><li><p>IPFS network: The rest of the IPFS network.</p></li></ul><p>When you opt in serving your Cloudflare Page on IPFS, a call is made to the IPFS index proxy. This call first fetches your Pages content, transforms it into a CID, then both populates IndexDB to associate the CID with the content and reaches out to Cloudflare IPFS node to tell them they are able to provide the CID.</p><p>For example, imagine your website structure is as follows:</p><ul><li><p>/</p><ul><li><p>index.html</p></li><li><p>static/</p><ul><li><p>cats.txt</p></li><li><p>beautiful_cats.txt</p></li></ul></li></ul></li></ul><p>To provide this website on IPFS, Cloudflare has to compute a CID for /. CIDs are built recursively. To compute the CID for a given folder /, one needs to have the CID of <code>index.html</code> and <code>static</code>/. <code>index.html</code> CID is derived from its binary representation, and static/ from cats.txt and beautiful_cats.txt.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7stjDpQPAhOugUqBcwRV8H/1bf1f181f61793fa0d6c1d1c2a860d77/image6-13.png" />
            
            </figure><p>This works similarly to a Merkle tree, except nodes can reference each other as long as they still form a Directed Acyclic Graph (DAG). This structure is therefore referred to as a <a href="https://docs.ipfs.io/concepts/merkle-dag/">MerkleDAG</a>.</p><p>In our example, it's not unlikely for <code>cats.txt</code> and <code>beautiful_cats.txt</code> to have data in common. In this case, Cloudflare can be smart in the way it builds the MerkleDAG.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6mqAMRlu7HoiESker0Tiur/49e0b2c53cdf847dc283391335408f15/image4-22.png" />
            
            </figure><p>This reduces the storage and bandwidth requirement when accessing the website on IPFS.</p><p><i>If you want to learn more about how you can model a file system on IPFS, you can check the</i> <a href="https://github.com/ipfs/specs/blob/master/UNIXFS.md"><i>UnixFS</i></a> <i>specification.</i></p><p>Cloudflare stores every CID and the content it references in IndexDB. This allows Cloudflare IPFS nodes to serve Cloudflare Pages assets when requested.</p>
    <div>
      <h2>Let's put this together</h2>
      <a href="#lets-put-this-together">
        
      </a>
    </div>
    <p>Let’s take an example: pages-on-ipfs.com is hosted on IPFS. It is built using Hugo, a static site generator, and Cloudflare Pages with the <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/">public documentation template</a>. Its source is available on <a href="https://github.com/thibmeu/pages-on-ipfs">GitHub</a>. If you have an IPFS compatible client, you can access it at ipns://pages-on-ipfs.com as well.</p><p>1. Read Cloudflare Pages deployment documentation</p><p>For the purpose of this blog, I want to create a simple Cloudflare page website. I have experience with Hugo, so I choose it as my framework for the project.</p><p>I type "<a href="https://lmddgtfy.net/?q=cloudflare%20pages">cloudflare pages</a>" in the search bar of my web browser, then head to the Read the docs &gt; Framework Guide &gt; <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/">Deploy a Hugo site</a>.</p><p>2. Create a site</p><p>This is where I use Hugo, and your configuration might differ. In short, I use hugo new site pages-on-ipfs, create an index and two static resources, et voilà. The result is available on the source <a href="https://github.com/thibmeu/pages-on-ipfs">GitHub</a> for this project.</p><p>3. Deploy using Cloudflare Pages</p><p>On the Cloudflare Dashboard, I go to Account Home &gt; Pages &gt; Create a project. I select the GitHub repository I created, and configure the build tool to build Hugo website. Basically, I follow what's written on <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/#deploying-with-cloudflare-pages">Cloudflare Pages documentation</a>.</p><p>Upon clicking Save and Deploy, my website is deployed on pages-on-ipfs.pages.dev. I also configure it to be available at pages-on-ipfs.com</p><p>4. Serve my content on IPFS</p><p>First, I opt in my zone on Cloudflare Pages integration with IPFS. This feature is not available yet for everyone to try out.</p><p>This allows Cloudflare to index the content of my website. Once indexed, I get the CID for my deployment baf...1. I can check that my content is available at this hash on IPFS using an IPFS gateway <a href="https://bafybeig7hluox6xefqdgmwcntvsguxcziw2oeogg2fbvygex2aj6qcfo64.ipfs.cf-ipfs.com">https://baf...1.ipfs.cf-ipfs.com/</a>.</p><p>5. Make my IPFS website available at pages-on-ipfs.com</p><p>Having one domain name to access both Cloudflare Pages and IPFS version, depending on if the client supports IPFS or not is ideal. Fortunately, the IPFS ecosystem supports such a feature via DNSLink. DNSLink is a way to specify the IPFS content a domain is associated with.</p><p>For pages-on-ipfs.com, I create a TXT record on _dnslink.pages-on-ipfs.com with value dnslink=/ipfs/baf...1. Et voilà. I can now access ipns://pages-on-ipfs.com via an IPFS client.</p><p>6. (Optional) Replicate my website</p><p>The content of my website can now easily be replicated and <a href="https://docs.ipfs.io/how-to/pin-files/">pinned</a> by other IPFS nodes. This can either be done at home via an IPFS client or using a pinning service such as <a href="https://www.pinata.cloud/">Pinata</a>.</p>
    <div>
      <h2>What's next</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>We'll make this service available later this year as it is being refined. We are committed to make information move freely and help build a better Internet. Cloudflare Pages work of solving developer problems continues, as developers are now able to make their site accessible to more users.</p><p>Over the years, IPFS has been used by more and more people. While Cloudflare started by making IPFS content available to web users through an HTTP interface, we now think it's time to give back. Allowing Cloudflare assets to be served over a public distributed network extends developers and users capability on an open web.</p>
    <div>
      <h2>Common questions</h2>
      <a href="#common-questions">
        
      </a>
    </div>
    <ul><li><p>I am already hosting my website on IPFS. Can I pin it using Cloudflare?</p><ul><li><p>No. This project aims at serving <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">Cloudflare hosted content</a> via IPFS. We are still investigating how to best replicate and re-provide already-existing IPFS content via Cloudflare infrastructure.</p></li></ul></li><li><p>Does this make IPFS more centralized?</p><ul><li><p>No. Cloudflare does not have the authority to decide who can be a node operator nor what content they provide.</p></li></ul></li><li><p>Are there guarantees the content is going to be available?</p><ul><li><p>Yes. As long as you choose Cloudflare to host your website on IPFS, it will be available on IPFS. Should you move to another provider, it would be your responsibility to make sure the content remains available. IPFS allows for this transition to be smooth using a pinning service.</p></li></ul></li><li><p>Is IPFS private?</p><ul><li><p>It depends. Generally, no. IPFS is a p2p protocol. The nodes you peer with and request content from would know the content you are looking for. The privacy depends on the trust you have in your peers to not snoop on the data you request.</p></li></ul></li><li><p>Can users verify the integrity of my website?</p><ul><li><p>Yes. They need to access your website through an IPFS compatible client. Ideally, IPFS content integrity is turned into a web standard, similar to <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity">subresource integrity</a>.</p></li></ul></li></ul><p></p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Distributed Web]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[IPFS]]></category>
            <guid isPermaLink="false">yHRMEOkly3EmYimxcRF3u</guid>
            <dc:creator>Thibault Meunier</dc:creator>
        </item>
        <item>
            <title><![CDATA[Gaining visibility in IPFS systems]]></title>
            <link>https://blog.cloudflare.com/ipfs-measurements/</link>
            <pubDate>Mon, 16 May 2022 12:57:39 GMT</pubDate>
            <description><![CDATA[ We've developed the IPFS Gateway monitor, an observability tool that runs various IPFS scenarios on a given gateway endpoint.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We have been operating an IPFS gateway for the last four years. It started as a <a href="/distributed-web-gateway/">research experiment in 2018</a>, providing <a href="/e2e-integrity/">end-to-end integrity with IPFS</a>. A year later, we made <a href="/continuing-to-improve-our-ipfs-gateway/">IPFS content faster to fetch</a>. Last year, we announced we were committed to <a href="/announcing-web3-gateways/">making IPFS gateway part of our product offering</a>. Through this process, we needed to inform our design decisions to know how our setup performed.</p><p>To this end, we've developed the IPFS Gateway monitor, an observability tool that runs various IPFS scenarios on a given gateway endpoint. In this post, you'll learn how we use this tool and go over discoveries we made along the way.</p>
    <div>
      <h2>Refresher on IPFS</h2>
      <a href="#refresher-on-ipfs">
        
      </a>
    </div>
    <p>IPFS is a distributed system for storing and accessing files, websites, applications, and data. It's different from a traditional centralized file system in that IPFS is completely distributed. Any participant can join and leave at any time without the loss of overall performance.</p><p>However, in order to access any file in IPFS, users cannot just use web browsers. They need to run an IPFS node to access the file from IPFS using its own protocol. IPFS Gateways play the role of enabling users to do this using only web browsers.</p><p>Cloudflare provides an IPFS gateway at <a href="https://cloudflare-ipfs.com">https://cloudflare-ipfs.com</a>, so anyone can just access IPFS files by using the gateway URL in their browsers.</p><p>As IPFS and the Cloudflare IPFS Gateway have become more and more popular, we need a way to know how performant it is: how much time it takes to retrieve IPFS-hosted content and how reliable it is. However, IPFS gateways are not like normal websites which only receive HTTP requests and return HTTP responses. The gateways need to run IPFS nodes internally and sometimes do content routing and peer routing to find the nodes which provide IPFS contents. They sometimes also need to resolve IPNS names to discover the contents. So, in order to measure the performance, we need to do measurements many times for many scenarios.</p>
    <div>
      <h2>Enter the IPFS Gateway monitor</h2>
      <a href="#enter-the-ipfs-gateway-monitor">
        
      </a>
    </div>
    <p><a href="https://github.com/cloudflare/ipfs-gateway-monitor">IPFS Gateway monitor</a> is this tool. It allows anyone to check the performance of their gateway and export it to the Prometheus monitoring system.</p><p>This monitor is composed of three independent binaries:</p><ol><li><p>ipfs-gw-measure is the tool that calls the gateway URL and does the measurement scenarios.</p></li><li><p>ipfs-gw-monitor is a way to call the measurement tool multiple times.</p></li><li><p>Prometheus Exporter exposes prometheus-readable metrics.</p></li></ol><p>To interact with the IPFS network, the codebase also provides a way to start an IPFS node.</p><p>A scenario is a set of instructions a user performs given the state of our IPFS system. For instance, we want to know how fast newly uploaded content can be found by the gateway, or if popular content has a low query time. We'll discuss more of this in the next section.</p><p>Putting this together, the system is the following.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7nUi5dEwj15NtiSduijehE/75a34120b8d85e155bd2c21c83c5e155/image4-20.png" />
            
            </figure><p>During this experience, we have operated both the IPFS Monitor, and a test IPFS node. The IPFS node allows the monitor to provide content to the IPFS network. This allows us to be sure that the content provided is fresh, and actually hosted. Peers have not been fixed, and leverage the IPFS default peer discovery mechanism.</p><p>Cloudflare IPFS Gateway is treated as an opaque system. The monitor performs end-to-end tests by contacting the gateway via its public API, either <a href="https://cloudflare-ipfs.com">https://cloudflare-ipfs.com</a> or via a custom domain registered with the gateway.</p><p>The following scenarios have been run on consumer hardware in March. They are not representative of all IPFS users. All values provided below have been sourced against Cloudflare’s IPFS gateway endpoint.</p>
    <div>
      <h3>First scenarios: Gateway to serve immutable IPFS contents</h3>
      <a href="#first-scenarios-gateway-to-serve-immutable-ipfs-contents">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/qrn6V5qZnqdJzL5V1qzFl/c9bf76a05f738831ba8737918b062e79/image3-26.png" />
            
            </figure><p>IPFS contents are the most primitive contents being served by the IPFS network and IPFS gateways. By their nature, they are immutable and addressable only by the hash of the content. Users can access the IPFS contents by putting the Content IDentifier (CID) in the URL path of the gateway. For example, <a href="https://cloudflare-ipfs.com/ipfs/bafybeig7hluox6xefqdgmwcntvsguxcziw2oeogg2fbvygex2aj6qcfo64">ipfs://bafybeig7hluox6xefqdgmwcntvsguxcziw2oeogg2fbvygex2aj6qcfo64</a>. We measure three common scenarios that users will often encounter.</p><p>The first one is when users fetch popular content which has a high probability of being found in our cache already. During our experiment, we measured a response time for such content is around 116ms.</p><p>The second one is the case where the users create and upload the content to the IPFS network, such as via the integration between <a href="/cloudflare-pages-on-ipfs/">Cloudflare Pages and IPFS</a>. This scenario is a lot slower than the first because the content is not in our cache yet, and it takes some time to discover the content. The content that we upload during this measurement is a random piece of 32-byte content.</p><p>The last measurement is when users try to download content that does not exist. This one is the slowest. Because of the nature of content routing of IPFS, there is no indication that tells us that content doesn't exist. So, setting the timeout is the only way to tell if the content exists or not. Currently, the Cloudflare IPFS gateway has a timeout of around five minutes.</p><table><tr><td><p><b></b></p></td><td><p><b>Scenario</b></p></td><td><p><b>Min (s)</b></p></td><td><p><b>Max (s)</b></p></td><td><p><b>Avg (s)</b></p></td></tr><tr><td><p>1</p></td><td><p>ipfs/newly-created-content</p></td><td><p>0.276</p></td><td><p>343</p></td><td><p>44.4</p></td></tr><tr><td><p>2</p></td><td><p>ipfs/in-cache-content</p></td><td><p>0.0825</p></td><td><p>0.539</p></td><td><p>0.116</p></td></tr><tr><td><p>3</p></td><td><p>ipfs/unavailable-cid</p></td><td><p>90</p></td><td><p>341</p></td><td><p>279</p></td></tr></table>
    <div>
      <h3>Second scenarios: Gateway to serve mutable IPNS named contents</h3>
      <a href="#second-scenarios-gateway-to-serve-mutable-ipns-named-contents">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/8qZ6yQPbI8x5Y3iMrkKbh/9b74a004d5c414ecd0dfa09126179bc6/image1-40.png" />
            
            </figure><p>Since IPFS contents are immutable, when users want to change the content, the only way to do so is to create new content and distribute the new CID to other users. Sometimes distributing the new CID is hard, and is out of scope of IPFS. The InterPlanetary Naming System (IPNS) tries to solve this. IPNS is a naming system that — instead of locating the content using the CID — allows users to locate the content using the IPNS name instead. This name is a hash of a user's public key. Internally, IPNS maintains a section of the IPFS DHT which maps from a name to a CID. Therefore, when the users want to download the contents using names through the gateway, the gateway has to first resolve the name to get the CID, then use the CID to query the IPFS content as usual.</p><p>The example for fetching the IPNS named content is at ipns://k51qzi5uqu5diu2krtwp4jbt9u824cid3a4gbdybhgoekmcz4zhd5ivntan5ey</p><p>We measured many scenarios for IPNS as shown in the table below. Three scenarios are similar to the ones involving IPFS contents. There are two more scenarios added: the first one is measuring the response time when users query the gateway using an existing IPNS name, and the second one is measuring the response time when users query the gateway immediately after new content is published under the name.</p><table><tr><td><p></p></td><td><p><b>Scenarios</b></p></td><td><p><b>Min (s)</b></p></td><td><p><b>Max (s)</b></p></td><td><p><b>Avg (s)</b></p></td></tr><tr><td><p>1</p></td><td><p>ipns/newly-created-name</p></td><td><p>5.50</p></td><td><p>110</p></td><td><p>33.7</p></td></tr><tr><td><p>2</p></td><td><p>ipns/existing-name</p></td><td><p>7.19</p></td><td><p>113</p></td><td><p>28.0</p></td></tr><tr><td><p>3</p></td><td><p>ipns/republished-name</p></td><td><p>5.62</p></td><td><p>80.4</p></td><td><p>43.8</p></td></tr><tr><td><p>4</p></td><td><p>ipns/in-cache-content</p></td><td><p>0.0353</p></td><td><p>0.0886</p></td><td><p>0.0503</p></td></tr><tr><td><p>5</p></td><td><p>ipns/unavailable-name</p></td><td><p>60.0</p></td><td><p>146</p></td><td><p>81.0</p></td></tr></table>
    <div>
      <h3>Third scenarios: Gateway to serve DNSLink websites</h3>
      <a href="#third-scenarios-gateway-to-serve-dnslink-websites">
        
      </a>
    </div>
    <p>Even though users can use IPNS to provide others a stable address to fetch the content, the address can still be hard to remember. This is what DNSLink is for. Users can address their content using DNSLink, which is just a normal <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a> in the Domain Name System (DNS). As a domain owner, you only have to create a TXT record with the value dnslink=/ipfs/baf…1, and your domain can be fetched from a gateway.</p><p>There are two ways to access the DNSLink websites using the gateway. The first way is to access the website using the domain name as a URL hostname, for example, <a href="https://ipfs.example.com">https://ipfs.example.com</a>. The second way is to put the domain name as a URL path, for example, <a href="https://cloudflare-ipfs.com/ipns/ipfs.example.com">https://cloudflare-ipfs.com/ipns/ipfs.example.com</a>.</p><table><tr><td><p></p></td><td><p><b>Scenarios</b></p></td><td><p><b>Min (s)</b></p></td><td><p><b>Max (s)</b></p></td><td><p><b>Avg (s)</b></p></td></tr><tr><td><p>1</p></td><td><p>dnslink/ipfs-domain-as-url-hostname</p></td><td><p>0.251</p></td><td><p>18.6</p></td><td><p>0.831</p></td></tr><tr><td><p>2</p></td><td><p>dnslink/ipfs-domain-as-url-path</p></td><td><p>0.148</p></td><td><p>1.70</p></td><td><p>0.346</p></td></tr><tr><td><p>3</p></td><td><p>dnslink/ipns-domain-as-url-hostname</p></td><td><p>7.87</p></td><td><p>44.2</p></td><td><p>21.0</p></td></tr><tr><td><p>4</p></td><td><p>dnslink/ipns-domain-as-url-path</p></td><td><p>6.87</p></td><td><p>72.6</p></td><td><p>19.0</p></td></tr></table>
    <div>
      <h2>What does this mean for regular IPFS users?</h2>
      <a href="#what-does-this-mean-for-regular-ipfs-users">
        
      </a>
    </div>
    <p>These measurements highlight that IPFS content is fetched best when cached. This is an order of magnitude faster than fetching new content. This result is expected as content publication on IPFS can take time for nodes to retrieve, as highlighted in <a href="https://youtu.be/yylsaXz00_g?t=823">previous studies</a>. Then, when it comes to naming IPFS resources, leveraging DNSLink appears to be the faster strategy. This is likely due to the poor connection of the IPFS node used in this setup, preventing IPNS name from propagating rapidly. Overall, IPNS names would benefit from using a resolver to speed up resolution without losing the trust they provide.</p><p>As we mentioned in September, IPFS use has seen important growth. So has our tooling. The IPFS Gateway monitor can be found on <a href="https://github.com/cloudflare/ipfs-gateway-monitor">GitHub</a>, and we will keep looking at improving this first set of metrics.</p><p>At the time of writing, using IPFS via a gateway seems to provide lower retrieval times, while allowing for finer grain control over security settings in the browser context. This configuration preserves the content validity properties offered by IPFS, but reduces the number of nodes a user is peering with to one: the gateway. Ideally, we would like users to peer with Cloudflare because we're offering the best service, while still having the possibility to retrieve content from external sources if they want to. We'll be conducting more measurements to better understand how to best leverage Cloudflare presence in 270 cities to better serve the IPFS network.</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Distributed Web]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[IPFS]]></category>
            <guid isPermaLink="false">4jdX3TTEDdxnin4XGswBv1</guid>
            <dc:creator>Pop Chunhapanya</dc:creator>
            <dc:creator>Thibault Meunier</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing The Cloudflare Distributed Web Gateways Private Beta: Unlocking the Web3 Metaverse and Decentralized Finance for Everyone]]></title>
            <link>https://blog.cloudflare.com/announcing-web3-gateways/</link>
            <pubDate>Fri, 01 Oct 2021 12:59:48 GMT</pubDate>
            <description><![CDATA[ Cloudflare announces the Private Beta of their Web3 gateways for Ethereum and IPFS. Unlocking the Metaverse, Web3, and Decentralized Finance for every developer. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4fgIKsu1B2OUYfIvoufy4J/2c3e73dd9e7c7082aabaf224daf3c13a/image8-2.png" />
            
            </figure><p>It’s cliché to say that the Internet has undergone massive changes in the last five years. New technologies like distributed ledgers, NFTs, and cross-platform metaverses have become all the rage. Unless you happen to hang out with the Web3 community in Hong Kong, San Francisco, and London, these technologies have a high barrier to entry for the average developer. You have to understand how to run distributed nodes, set up esoteric developer environments, and keep up with the latest chains just to get your app to run. That stops today. Today you can <a href="https://docs.google.com/forms/d/11_oXpvGGVtP0DJenWBzLfxE4cyCjHHbqrbIibLAz2wQ/edit">sign up for the private beta</a> of our Web3 product suite starting with our Ethereum and IPFS gateway.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6CPHhwfETpZPYPZ7YMspBP/ccc8a837b76989d9cdf9c3b31fb1628c/image9.png" />
            
            </figure><p>Before we go any further, a brief introduction to blockchain (<a href="https://ethereum.org/en/what-is-ethereum/">Ethereum</a> in our example) and the <a href="https://ipfs.io/#how">InterPlanetary FileSystem</a> (IPFS). In a Web3 setting, you can think of Ethereum as the compute layer, and IPFS as the storage layer. By leveraging decentralised ledger technology, Ethereum provides verifiable decentralised computation. Publicly available binaries, called "smart contracts", can be instantiated by users to perform operations on an immutable set of records. This set of records is the state of the blockchain. It has to be maintained by every node on the network, so they can verify, and participate in the computation. Performing operations on a lot of data is therefore expensive. A common pattern is to use IPFS as an external storage solution. IPFS is a peer-to-peer network for storing content on a distributed file system. Content is identified by its hash, making it inexpensive to reference from a blockchain context.</p><p>If you want an even deeper understanding of how Web3 works check out our other blog posts on <a href="/what-is-web3/">what is Web3</a> and <a href="/get-started-web3/">creating Web3 Dapps with Cloudflare Workers</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Or8TSruyUwyvrcwMsEoNp/bb4cde50e8ad68f9cb48f390a455d76c/image1-4.png" />
            
            </figure>
    <div>
      <h3>Web3 and the Metaverse</h3>
      <a href="#web3-and-the-metaverse">
        
      </a>
    </div>
    <p>Over the last four years, while we have been working to mature the technology required to provide access to Web3 services at a global scale, the idea of the Metaverse has come back into vogue. Popularized by novels like “Snowcrash,” and "Ready Player One," the idea is a simple one. Imagine an Internet where you can hop into an app and have access to all of your favorite digital goods available for you to use regardless of where you purchased them. You could sell your work on social media without granting them a worldwide license, and the buyer could use it on their online game. The Metaverse is a place where copyright and ownership can be managed through NFTs (<a href="/get-started-web3/">Non-Fungible Tokens</a>) stored on IPFS, and accessed trustlessly through Ethereum. It is a place where everyday creators can easily monetize their content, and have it be used by everyone, regardless of platform, since content is not being stored in walled gardens but decentralised ecosystems with open standards.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2ZeZo9C6EniEeJ89QF4DjE/e4b8513f15f77389c63e5f8f2937931f/image3.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7iwQLeHJRogEM9WvWyu3An/8a40b9d4763bfd5c320fc7a748d7d540/image6.png" />
            
            </figure><p>This shifts the way users and content creators think about the Internet. Questions like: “Do you actually need a Model View Controller system with a server to build an application?” “What is the best way to provide consistent naming of web resources across platforms?” “Do we actually need to keep our data locked behind another company's systems or can the end-user own their data?”. This builds different trust assumptions. Instead of trusting a single company because they are the only one to have your users' data, trust is being built leveraging a source verifiable by all participants. This can be people you physically interact with for <a href="https://support.signal.org/hc/en-us/articles/360007060632-What-is-a-safety-number-and-why-do-I-see-that-it-changed-#safety_number_view">messaging applications</a>, X.509 certificates logged in a <a href="https://certificate.transparency.dev/">public Certificate Transparency</a> Log for websites, or public keys that interact with blockchains for distributed applications.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6r8YeF8xw3ABv5x3bFzlbE/9363c73ddd6882d1866a47d889023af8/image10-1.png" />
            
            </figure><p>It’s an exciting time. Unlike the emergence of the Internet however, there are large established companies that want to control the shape and direction of Web3 and this Metaverse. We believe in a future of a <a href="/what-is-web3/">decentralised and private web</a>. An open, standards-based web independent of any one company or centralizing force. We believe that we can be one of the many technical platforms that supports Web3 and the growing Metaverse ecosystem. It’s why we are so excited to be announcing the private beta of our Ethereum and IPFS gateways. Technologies that are at the forefront of Web3 and its emerging Metaverse.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7hWZ5XkA9Y9v3ZxT7YXbRw/8839a7c61076625531ef2c8c48bad198/image4-1.png" />
            
            </figure><p>Time and time again over the last year we have been asked by our customers to support their exploration of Web3, and oftentimes their core product offering. At Cloudflare, we are committed to helping build a better Internet for everyone, regardless of their preferred tech stack. We want to be the pickaxes and shovels for everyone. We believe that Web3 and the Metaverse is not just an experiment, but an entirely new networking paradigm where many of the next multi-billion dollar businesses are going to be built. We believe that the first complete metaverse could be built entirely on Cloudflare today using systems like Ethereum, IPFS, RTC, <a href="https://www.cloudflare.com/developer-platform/r2/">R2 storage</a>, and Workers. Maybe you will be the one to build it...</p><p>We are excited to be on this journey with our Web3 community members, and can’t wait to show you what else we have been working on.</p>
    <div>
      <h3>Introducing the Cloudflare Web3 Gateways!</h3>
      <a href="#introducing-the-cloudflare-web3-gateways">
        
      </a>
    </div>
    <p>A gateway is a computer that sits between clients (such as your browser or mobile device) and a number of other systems and helps translate traffic from one protocol to another, so the systems powering an application required to handle the request can do so properly. But there are different types of gateways that exist today.</p><p>You have probably heard mention of an <a href="https://www.cloudflare.com/learning/security/api/what-is-an-api-gateway/">API gateway</a>, which is responsible for accepting API calls inbound to an application and aggregating the appropriate services to fulfill those requests and return a proper response to the end user. You utilize gateways every time you watch Netflix! Their company leverages an API gateway to ensure the hundreds of different devices that access their streaming service can receive a successful and proper response, allowing end users to watch their shows. Gateways are a critical component of how Web3 is being enabled for every end user on the planet.</p><p>Remember that Web3 or the distributed web is a set of technologies that enables hosting of content and web applications in a serverless manner by leveraging purely distributed systems and consensus protocols. Gateways let you use these applications in your browser without having to install plugins or run separate pieces of software called nodes. The distributed web community runs into the same problem of needing a stable, reliable, and resilient method to translate HTTP requests into the correct Web3 functions or protocols.</p><p>Today, we are introducing the Cloudflare Ethereum and IPFS Gateways to help Web3 developers do what they do best, develop applications, without having to worry about also running the infrastructure required to support Ethereum (Eth) or IPFS nodes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4jEKbTRVOn95CzcJoLEE5E/f8f4c167512b17069711ce74e0bedded/image5-1.png" />
            
            </figure>
    <div>
      <h3>What’s the problem with existing Eth or IPFS Web Gateways?</h3>
      <a href="#whats-the-problem-with-existing-eth-or-ipfs-web-gateways">
        
      </a>
    </div>
    <p>Traditional web technologies such as HTTP have had decades to develop standards and best practices that make sites fast, secure, and available. These haven’t been developed on the distributed web side of the Internet, which focuses more on redundancy. We identified an opportunity to bring the optimizations and infrastructure of the web to the distributed web by building a gateway — a service that translates HTTP API calls to IPFS or Ethereum functions, while adding Cloudflare added-value services on the HTTP side. The ability for a customer to operate their entire network control layer with a single pane of glass using Cloudflare is huge. You can manage the DNS, Firewall, Load Balancing, Rate Limiting, Tunnels, and more for your marketing site, your distributed application (Dapp), and corporate security, all from one location.</p><p>For many of our customers, the existing solutions for Web3 gateway do not have a large enough network to handle the growing amount of requests within the Ethereum and IPFS networks, but more importantly do not have the degree of resilience and redundancy that businesses expect and require operating at scale. The idea of the distributed web is to do just that… stay distributed, so no single actor can control the overall market. Speed, security, and reliability are at the heart of what we do. We are excited to be part of the growing Web3 infrastructure community so that we can help Dapp developers have more choice, scalability, and reliability from their infrastructure providers.</p><p>A clear example of this is when existing gateways have an outage. With too few gateways to handle the traffic, the result of this outage is pre-process transactions falling behind the blockchain they are accessing, thus leading to increased latency for the transaction, potentially leading to it failing. Worse, when decentralised application (Dapp) developers use IPFS to power their front end, it can lead to their entire application falling over. Overall, this leads to massive amounts of frustration from businesses and end users alike — not being able to collect revenue for products or services, thus putting a portion of the business at a halt and breaking trust with end users who depend on the reliability of these services to manage their Web3 assets.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1JgXilj9lnei2QHAcsRFtx/21d90693861fa2b02a7e1bad7e86e5db/image7.png" />
            
            </figure>
    <div>
      <h3>How is Cloudflare solving this problem?</h3>
      <a href="#how-is-cloudflare-solving-this-problem">
        
      </a>
    </div>
    <p>We found that there was a unique opportunity in a segment of the Web3 community that closely mirrored Cloudflare’s traditional customer base: the distributed web. This segment has some major usability issues that Cloudflare could help solve around reliability, performance, and caching. Cloudflare has an advantage that no other company in this space — and very few in the industry — have: a global network. For instance, content fetched through our <a href="https://cloudflare-ipfs.com/">IPFS Gateway</a> can be cached near users, allowing download latency in the milliseconds. Compare this with up to seconds per asset using native IPFS. This speed enables services based on IPFS to go hybrid. Content can be served over the source decentralised protocols while browsers and tools are maturing to access them, and served to regular web users through a gateway like Cloudflare. We do provide a convenient, fast and secure option to browse this distributed content.</p><p>On Ethereum, users can be categorised in two ways. Application developers that operate smart contracts, and users that want to interact with the said contracts. While smart contracts operate autonomously based on their code, users have to fetch data and send transactions. As part of the chain, smart contracts do not have to worry about the network or a user interface to be online. This is why decentralised exchanges have had the ability to operate continuously across multiple interfaces without disruptions. Users on the other hand do need to know the state of the chain, and be able to interact with it. Application developers therefore have to require the users to run an Ethereum node, or can point them to use remote nodes through a <a href="https://ethereum.org/en/developers/docs/apis/json-rpc/">standardised JSON RPC API</a>. This is where Cloudflare comes in. Cloudflare Ethereum gateway relies on Ethereum nodes and provides a secure and fast interface to the Ethereum network. It allows application developers to leverage Ethereum in front-facing applications. The gateway can interact with any content part of the Ethereum chain. This includes NFT contracts, DeFi exchanges, or name services like ENS.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4VtJXJP7vwn9gAM0e25eod/ee26e0bc56ff0d7b98113557245ebf16/image2.png" />
            
            </figure>
    <div>
      <h3>How are the gateways doing so far?</h3>
      <a href="#how-are-the-gateways-doing-so-far">
        
      </a>
    </div>
    <p>Since our alpha release to very early customers as research experiments, we’ve seen a staggering number of customers wanting to leverage the new gateway technology and benefit from the availability, resiliency, and caching benefits of Cloudflare’s network.</p><p>Our current alpha includes companies that have raised billions of dollars in venture capital, companies that power the decentralised finance ecosystem on Ethereum, and emerging metaverses that make use of NFT technology.</p><p>In fact, we have over 2,000 customers leveraging our IPFS gateway lending to over 275TB of traffic per month. For Ethereum, we have over 200 customers transacting over 13TB, including 1.6 billion requests per month. We’ve seen extremely stable results from these customers and fully expect to see these metrics continue to ramp up as we add more customers to use this new product.</p><p>We are now very happy to announce the opening of our private beta for both the Ethereum and IPFS gateways. <a href="https://docs.google.com/forms/d/11_oXpvGGVtP0DJenWBzLfxE4cyCjHHbqrbIibLAz2wQ/edit">Sign up to participate in the private beta</a> and our team will reach out shortly to ensure you are set up!</p><p>P.S. We are hiring for Web3! If you want to come work on it with us, check out our <a href="https://boards.greenhouse.io/cloudflare/jobs/3352190?gh_jid=3352190">careers page</a>.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Web3]]></category>
            <category><![CDATA[Distributed Web]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Ethereum]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">3JkUkPfA7HavDc4YUSBMaw</guid>
            <dc:creator>Wesley Evans</dc:creator>
            <dc:creator>Brian Batraski</dc:creator>
        </item>
        <item>
            <title><![CDATA[How Cloudflare provides tools to help keep IPFS users safe]]></title>
            <link>https://blog.cloudflare.com/cloudflare-ipfs-safe-mode/</link>
            <pubDate>Wed, 29 Sep 2021 23:02:00 GMT</pubDate>
            <description><![CDATA[ The Cloudflare IPFS module protects users from threats like phishing and ransomware. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Cloudflare's journey with IPFS started in 2018 when we announced a <a href="/distributed-web-gateway/">public gateway for the distributed web</a>. Since then, the number of infrastructure providers for the InterPlanetary FileSystem (IPFS) has grown and matured substantially. This is a huge benefit for users and application developers as they have the ability to choose their infrastructure providers.</p><p>Today, we’re excited to announce new secure filtering capabilities in IPFS. The Cloudflare IPFS module is a tool to protect users from threats like phishing and ransomware. We believe that other participants in the network should have the same ability. We are releasing that software as open source, for the benefit of the entire community.</p><p>Its code is available on <a href="https://github.com/cloudflare/go-ipfs/tree/v0.9.1-safemode">github.com/cloudflare/go-ipfs</a>. To understand how we built it and how to use it, read on.</p>
    <div>
      <h3>A brief introduction on IPFS content retrieval</h3>
      <a href="#a-brief-introduction-on-ipfs-content-retrieval">
        
      </a>
    </div>
    <p>Before we get to understand how IPFS filtering works, we need to dive a little deeper into the operation of an IPFS node.</p><p>The InterPlanetary FileSystem (IPFS) is a peer-to-peer network for storing content on a distributed file system. It is composed of a set of computers called nodes that store and relay content using a common addressing system.</p><p>Nodes communicate with each other over the Internet using a Peer-to-Peer (P2P) architecture, preventing one node from becoming a single point of failure. This is even more true given that anyone can operate a node with limited resources. This can be light hardware such as a Raspberry Pi, a server at a cloud provider, or even your web browser.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7D6yuQR7r8BmcBPQS6YSjk/02c4a5bb7a86be4cebdc52bd54ae532f/image2-4.png" />
            
            </figure><p>This creates a challenge since not all nodes may support the same protocols, and networks may block some types of connections. For instance, your web browser does not expose a TCP API and your home router likely doesn’t allow inbound connections. This is where <a href="https://libp2p.io/">libp2p</a> comes to help.</p><p>libp2p is a modular system of <i>protocols</i>, <i>specifications</i>, and <i>libraries</i> that enable the development of peer-to-peer network applications - <a href="https://docs.libp2p.io/introduction/what-is-libp2p/">libp2p documentation</a></p><p>That’s exactly what four IPFS nodes need to connect to the IPFS network. From a node point of view, the architecture is the following:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2KWwoCkKQL46RFHelilMtE/a5718f571f330746fc421f49a20cc76f/image6-2.png" />
            
            </figure><p>Any node that we maintain a connection with is a peer. A peer that does not have ? content can ask their peers, including you, they WANT?. If you do have it, you will provide the ? to them. If you don’t have it, you can give them information about the network to help them find someone who might have it. As each node chooses the resources they store, it means some might be stored on a limited number of nodes.</p><p>For instance, everyone likes ?, so many nodes will dedicate resources to store it. However, ? is less popular. Therefore, only a few nodes will provide it.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6lZKi9WAAYORStwkYGTnD1/88b6e06f42bf6d5ac7585ddd3d337874/image3-3.png" />
            
            </figure><p>This assumption does not hold for public gateways like Cloudflare. A gateway is an HTTP interface to an IPFS node. On our gateway, we allow a user of the Internet to retrieve arbitrary content from IPFS. If a user asks for ?, we provide ?. If they ask for ?, we’ll find ? for them.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Aj6yGIAk8iAzBoMZAuayV/025e8fe16774f5fe81abffa46c519ed4/image1-6.png" />
            
            </figure><p>Cloudflare’s IPFS gateway is simply a cache in front of IPFS. Cloudflare does not have the ability to modify or remove content from the IPFS network. However, IPFS is a decentralized and open network, so there is the possibility of users sharing threats like phishing or malware. This is content we do not want to provide to the P2P network or to our HTTP users.</p><p>In the next section, we describe how an IPFS node can protect its users from such threats.</p><p><i>If you would like to learn more about the inner workings of libp2p, you can go to</i> <a href="https://proto.school/introduction-to-libp2p"><i>ProtoSchool</i></a> <i>which has a great tutorial about it.</i></p>
    <div>
      <h3>How IPFS filtering works</h3>
      <a href="#how-ipfs-filtering-works">
        
      </a>
    </div>
    <p>As we described earlier, an IPFS node provides content in two ways: to its peers through the IPFS P2P network and to its users via an HTTP gateway.</p><p>Filtering content of the HTTP interface is no different from the current protection Cloudflare already has in place. If ? is considered malicious and is available at cloudflare-ipfs.com/ipfs/?, we can filter these requests, so the end user is kept safe.</p><p>The P2P layer is different. We cannot filter URLs because that’s not how the content is requested. IPFS is content-addressed. This means that instead of asking for a specific location such as cloudflare-ipfs.com/ipfs/?, peers request the content directly using its Content IDentifiers (CID), ?.</p><p>More precisely, ? is an abstraction of the content address. A CID looks like QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy (QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy happens to be the hash of a .txt file containing the string "I’m trying out IPFS''). CID is a convenient way to refer to content in a cryptographically verifiable manner.</p><p>This is great, because it means that when peers ask for malicious ? content, we can prevent our node from serving it. This includes both the P2P layer and the HTTP gateway.</p><p>In addition, the working of IPFS makes it, so content can easily be reused. On directories for instance, the address is a CID based on the CID of its files. This way, a file can be shared across multiple directories, and still be referred to by the same CID. It allows IPFS nodes to efficiently store content without duplicating it. This can be used to share <a href="https://blog.ipfs.io/2020-02-14-improved-bitswap-for-container-distribution/">docker container layers</a> for example.</p><p>In the filtering use case, it means that if ? content is included in other IPFS content, our node can also prevent content linking to malicious ? content from being served. This results in ?, a mix of valid and malicious content.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/CDrcC6XQcEbIs3DcdkA49/c12890df760859ad3f2ea2129bfc090a/image5-3.png" />
            
            </figure><p>This cryptographic method of linking content together is known as MerkleDAG. You can learn more about it on <a href="https://proto.school/merkle-dags">ProtoSchool</a>, and Consensys did an article explaining the <a href="https://media.consensys.net/ever-wonder-how-merkle-trees-work-c2f8b7100ed3">basic cryptographic construction with bananas</a> ?.</p>
    <div>
      <h3>How to use IPFS secure filtering</h3>
      <a href="#how-to-use-ipfs-secure-filtering">
        
      </a>
    </div>
    <p>By now, you should have an understanding of how an IPFS node retrieves and provides content, as well as how we can protect peers and users from shared nodes accessing threats. Using this knowledge, Cloudflare went on to implement IPFS Safemode, a node protection layer on top of <a href="https://github.com/ipfs/go-ipfs">go-ipfs</a>. It is up to every node operator to build their own list of threats to be blocked based on their policy.</p><p>To use it, we are going to follow the instructions available on <a href="https://github.com/cloudflare/go-ipfs/tree/v0.9.1-safemode#build-from-source">cloudflare/go-ipfs repository</a>.</p><p>First, you need to clone the git repository</p>
            <pre><code>git clone https://github.com/cloudflare/go-ipfs.git
cd go-ipfs/</code></pre>
            <p>Then, you have to check out the commit where IPFS safemode is implemented. This version is based on v0.9.1 of go-ipfs.</p>
            <pre><code>git checkout v0.9.1-safemode</code></pre>
            <p>Now that you have the source code on your machine, we need to <a href="https://github.com/cloudflare/go-ipfs/tree/v0.9.1-safemode#build-from-source">build the IPFS client from source</a>.</p>
            <pre><code>make build</code></pre>
            <p><i>Et voilà</i>. You are ready to use your IPFS node, with safemode capabilities.</p>
            <pre><code># alias ipfs command to make it easier to use
alias ipfs=’./cmd/ipfs/ipfs’
# run an ipfs daemon
ipfs daemon &amp;
# understand how to use IPFS safemode
ipfs safemode --help
USAGE
ipfs safemode - Interact with IPFS Safemode to prevent certain CIDs from being provided.
...</code></pre>
            
    <div>
      <h3>Going further</h3>
      <a href="#going-further">
        
      </a>
    </div>
    <p>IPFS nodes are running in a diverse set of environments and operated by parties at various scales. The same software has to accommodate configuration in which it is accessed by a single-user, and others where it is shared by thousands of participants.</p><p>At Cloudflare, we believe that decentralization is going to be the next major step for content networks, but there is still work to be done to get these technologies in the hands of everyone. Content filtering is part of this story. If the community aims at embedding a P2P node in every computer, there needs to be ways to prevent nodes from serving harmful content. Users need to be able to give consent on the content they are willing to serve, and the one they aren’t.</p><p>By providing an IPFS safemode tool, we hope to make this protection more widely available.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Distributed Web]]></category>
            <guid isPermaLink="false">2Rfcw9nEZ4DUBHIp1OOLXm</guid>
            <dc:creator>Thibault Meunier</dc:creator>
        </item>
        <item>
            <title><![CDATA[A Name Resolver for the Distributed Web]]></title>
            <link>https://blog.cloudflare.com/cloudflare-distributed-web-resolver/</link>
            <pubDate>Wed, 13 Jan 2021 12:00:00 GMT</pubDate>
            <description><![CDATA[ We are proud to announce a new resolver for the Distributed Web, where IPFS content indexed by the Ethereum Name Service (ENS) can be accessed. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The Domain Name System (DNS) matches names to resources. Instead of typing 104.18.26.46 to access the Cloudflare Blog, you type blog.cloudflare.com and, using DNS, the <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a> resolves to 104.18.26.46, the Cloudflare Blog IP address.</p><p>Similarly, distributed systems such as Ethereum and IPFS rely on a naming system to be usable. DNS could be used, but its resolvers’ attributes run contrary to properties valued in distributed Web (dWeb) systems. Namely, dWeb resolvers ideally provide (i) locally verifiable data, (ii) built-in history, and (iii) have no single trust anchor.</p><p>At Cloudflare Research, we have been exploring alternative ways to resolve queries to responses that align with these attributes. We are proud to announce a new resolver for the Distributed Web, where IPFS content indexed by the <a href="http://ens.domains/">Ethereum Name Service</a> (ENS) can be accessed.</p><p>To discover how it has been built, and how you can use it today, read on.</p>
    <div>
      <h2>Welcome to the Distributed Web</h2>
      <a href="#welcome-to-the-distributed-web">
        
      </a>
    </div>
    
    <div>
      <h3>IPFS and its addressing system</h3>
      <a href="#ipfs-and-its-addressing-system">
        
      </a>
    </div>
    <p>The InterPlanetary FileSystem (IPFS) is a peer-to-peer network for storing content on a distributed file system. It is composed of a set of computers called nodes that store and relay content using a common addressing system.</p><p>This addressing system relies on the use of <a href="https://github.com/multiformats/cid">Content IDentifiers</a> (CID). CIDs are self-describing identifiers, because the identifier is derived from the content itself. For example, QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco is the CID version 0 (CIDv0) of the <a href="https://en.wikipedia-on-ipfs.org">wikipedia-on ipfs homepage</a>.</p><p>To understand why a CID is defined as self-describing, we can look at its binary representation. For QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco, the CID looks like the following:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2A7q58l0WReM66ndaxQmms/fc93187cd6f358d2291944cd57cbc419/image2-1.png" />
            
            </figure><p>The first is the algorithm used to generate the CID (sha2-256 in this case); then comes the length of the encoded content (32 for a sha2-256 hash), and finally the content itself. When referring to the <a href="https://github.com/multiformats/multicodec/blob/master/table.csv">multicodec table</a>, it is possible to understand how the content is encoded.</p><table><tr><td><p><b>Name</b></p></td><td><p><b>Code (in hexadecimal)</b></p></td></tr><tr><td><p>identity</p></td><td><p>0x00</p></td></tr><tr><td><p>sha1</p></td><td><p>0x11</p></td></tr><tr><td><p>sha2-256</p></td><td><p>0x12 = 00010010</p></td></tr><tr><td><p>keccak-256</p></td><td><p>0x1b</p></td></tr></table><p>This encoding mechanism is useful, because it creates a unique and upgradable content-addressing system across multiple protocols.</p><p>If you want to learn more, have a look at <a href="https://proto.school/#/anatomy-of-a-cid">ProtoSchool’s tutorial</a>.</p>
    <div>
      <h3>Ethereum and decentralised applications</h3>
      <a href="#ethereum-and-decentralised-applications">
        
      </a>
    </div>
    <p>Ethereum is an account-based blockchain with smart contract capabilities. Being account-based, each account is associated with addresses and these can be modified by operations grouped in blocks and sealed by Ethereum’s consensus algorithm, Proof-of-Work.</p><p>There are two categories of accounts: user accounts and contract accounts. User accounts are controlled by a private key, which is used to sign transactions from the account. Contract accounts hold bytecode, which is executed by the network when a transaction is sent to their account. A transaction can include both funds and data, allowing for rich interaction between accounts.</p><p>When a transaction is created, it gets verified by each node on the network. For a transaction between two user accounts, the verification consists of checking the origin account signature. When the transaction is between a user and a smart contract, every node runs the smart contract bytecode on the Ethereum Virtual Machine (EVM). Therefore, all nodes perform the same suite of operations and end up in the same state. If one actor is malicious, nodes will not add its contribution. Since nodes have diverse ownership, they have an incentive to not cheat.</p>
    <div>
      <h2>How to access IPFS content</h2>
      <a href="#how-to-access-ipfs-content">
        
      </a>
    </div>
    <p>As you may have noticed, while a CID describes a piece of content, it doesn't describe where to find it. In fact, the CID describes the content, but not its location on the network. The location of the file would be retrieved by a query made to an IPFS node.</p><p>An IPFS URL (Unified Resource Locator) looks like this: <code>ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco</code>. Accessing this URL means retrieving <code>QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco</code> using the IPFS protocol, denoted by ipfs://. However, typing such a URL is quite error-prone. Also, these URLs are not very human-friendly, because there is no good way to remember such long strings. To get around this issue, you can use DNSLink. DNSLink is a way of specifying IPFS CIDs within a DNS TXT record. For instance, <a href="http://wikipedia-on-ipfs.org">wikipedia on ipfs</a> has the following TXT record</p><p><code>$ dig +short TXT _dnslink.en.wikipedia-on-ipfs.org</code></p><p><code>_dnslink=/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco</code></p><p>In addition, it's A record points to an IPFS gateway. This means that, when you access en.wikipedia-on-ipfs.org, your request is directed to an IPFS HTTP Gateway, which then looks out for the CID using your domain TXT record, and returns the content associated to this CID using the IPFS network.</p><p>This is trading ease-of-access against security. The web browser of the user doesn't verify the integrity of the content served. This could be because the browser does not implement IPFS or because it has no way of validating domain signature — <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a>. We wrote about this issue in our previous blog post on <a href="/e2e-integrity/">End-to-End Integrity</a>.</p>
    <div>
      <h2>Human-readable identifiers</h2>
      <a href="#human-readable-identifiers">
        
      </a>
    </div>
    <p>DNS simplifies referring to IP addresses, in the same way that postal addresses are a way of referring to geolocation data, and contacts in your mobile phone abstract phone numbers. All these systems provide a human-readable format and reduce the error rate of an operation.</p><p>To verify these data, the trusted anchors, or “sources of truth”, are:</p><ul><li><p><a href="https://www.cloudflare.com/en-gb/dns/dnssec/root-signing-ceremony/">Root DNS Keys</a> for DNS.</p></li><li><p>The government registry for postal addresses. In the UK, addresses <a href="https://www.nidirect.gov.uk/articles/how-streets-are-named-and-numbered">are handled</a> by cities, boroughs and local councils.</p></li><li><p>When it comes to your contacts, you are the trust anchor.</p></li></ul>
    <div>
      <h2>Ethereum Name Service, an index for the Distributed Web</h2>
      <a href="#ethereum-name-service-an-index-for-the-distributed-web">
        
      </a>
    </div>
    <p>An account is identified by its address. An address starts with "0x" and is followed by 20 bytes (<a href="https://ethereum.github.io/yellowpaper/paper.pdf">ref 4.1 Ethereum yellow paper</a>), for example: 0xf10326c1c6884b094e03d616cc8c7b920e3f73e0. This is not very readable, and can be pretty scary when transactions are not reversible and one can easily mistype a single character.</p><p>A first mitigation strategy was to introduce a new notation to capitalise some letters based on the hash of the address 0xF10326C1c6884b094E03d616Cc8c7b920E3F73E0. This can help detect mistype, but it is still not readable. If I have to send a transaction to a friend, I have no way of confirming she hasn't mistyped the address.</p><p>The <a href="https://ens.domains/">Ethereum Name Service</a> (ENS) was created to tackle this issue. It is a system capable of turning human-readable names, referred to as domains, to blockchain addresses. For instance, the domain <a href="https://app.ens.domains/name/privacy-pass.eth">privacy-pass.eth</a> points to the Ethereum address 0xF10326C1c6884b094E03d616Cc8c7b920E3F73E0.</p><p>To achieve this, the system is organised in <a href="https://docs.ens.domains/">two components</a>, registries and resolvers.</p><p>A registry is a smart contract that maintains a list of domains and some information about each domain: the domain owner and the domain resolver. The owner is the account allowed to manage the domain. They can create subdomains and change ownership of their domain, as well as modify the resolver associated with their domain.</p><p>Resolvers are responsible for keeping records. For instance, Public Resolver is a smart contract capable of associating not only a name to blockchain addresses, but also a name to an IPFS content identifier. The resolver address is stored in a registry. Users then contact the registry to retrieve the resolver associated with the name.</p><p>Consider a user, Alice, who has direct access to the Ethereum state. The flow goes as follows: Alice would like to get Privacy Pass’s Ethereum address, for which the domain is privacy-pass.eth. She looks for privacy-pass.eth in the ENS Registry and figures out the resolver for privacy-pass.eth is at 0x1234... . She now looks for the address of privacy-pass.eth at the resolver address, which turns out to be 0xf10326c....</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6yVOgswqi6HQ38qlhTaTdK/0956f47fa306bebb2233e9601d0b430c/image1-3.png" />
            
            </figure><p>Accessing the IPFS content identifier for privacy-pass.eth works similarly. The resolver is the same, only the accessed data is different — Alice calls a different method from the smart contract.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1CjIbo1euB3DG5EZgnL3Bm/9b59d7bd3c7fa63870238274ef5a0200/image5.png" />
            
            </figure>
    <div>
      <h2>Cloudflare Distributed Web Resolver</h2>
      <a href="#cloudflare-distributed-web-resolver">
        
      </a>
    </div>
    <p>The goal was to be able to use this new way of indexing IPFS content directly from your web browser. However, accessing the ENS registry requires access to the Ethereum state. To get access to IPFS, you would also need to access the IPFS network.</p><p>To tackle this, we are going to use Cloudflare’s Distributed Web Gateway. Cloudflare operates both an Ethereum Gateway and an IPFS Gateway, respectively available at cloudflare-eth.com and cloudflare-ipfs.com.</p>
    <div>
      <h3>EthLink</h3>
      <a href="#ethlink">
        
      </a>
    </div>
    <p>The <a href="https://github.com/wealdtech/coredns-ens">first version</a> of EthLink was built by Jim McDonald and is operated by True Name LTD at eth.link. Starting from next week, eth.link will transition to use the Cloudflare Distributed Web Resolver. To that end, we have built EthLink on top of Cloudflare Workers. This is a proxy to IPFS. It proxies all ENS registered domains when .link is appended. For instance, privacy-pass.eth should render the Privacy Pass homepage. From your web browser, <a href="https://privacy-pass.eth.link">https://privacy-pass.eth.link</a> does it.</p><p>The resolution is done at the Cloudflare edge using a Cloudflare Worker. Cloudflare Workers allows JavaScript code to be run on Cloudflare infrastructure, eliminating the need to maintain a server and increasing the reliability of the service. In addition, it follows Service Workers API, so results returned from the resolver can be checked by end users if needed.</p><p>To do this, we set up a wildcard DNS record for *.eth.link to be proxied through Cloudflare and handled by a Cloudflare Worker.  When a user Alice accesses <a href="https://privacy-pass.eth.link">privacy-pass.eth.link</a>, the worker first gets the CID of the CID to be retrieved from Ethereum. Then, it requests the content matching this CID to IPFS, and returns it to Alice.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/WivGoQhRDcSaDh99sVdNI/0e9bca31a378146d49d92c3af71180e8/image3.png" />
            
            </figure><p>All parts can be run locally. The worker can be run in a service Worker, and the Ethereum Gateway can point to both a local Ethereum node and the IPFS gateway provided by IPFS Companion. It means that while Cloudflare provides resolution-as-a-service, none of the components has to be trusted.</p>
    <div>
      <h2>Final notes</h2>
      <a href="#final-notes">
        
      </a>
    </div>
    <p>So <a href="https://arewedistributedyet.com/">are we distributed yet</a>? No, but we are getting closer, building bridges between emerging technologies and current web infrastructure. By providing a gateway dedicated to the distributed web, we hope to make these services more accessible to everyone.</p><p>We thank the ENS team for their support of a new resolver on expanding the distributed web. The ENS team has been running a similar service at <a href="https://eth.link">https://eth.link</a>. On January 18th, they will switch <a href="https://eth.link">https://eth.link</a> to using our new service.</p><p>These services benefit from the added speed and security of the Cloudflare Worker platform, while paving the way to run distributed protocols in browsers.</p> ]]></content:encoded>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Ethereum]]></category>
            <category><![CDATA[Distributed Web]]></category>
            <guid isPermaLink="false">5GZYZoddJJgvOcmn2ALKWL</guid>
            <dc:creator>Thibault Meunier</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare's Ethereum Gateway]]></title>
            <link>https://blog.cloudflare.com/cloudflare-ethereum-gateway/</link>
            <pubDate>Wed, 19 Jun 2019 13:01:00 GMT</pubDate>
            <description><![CDATA[ Today, we are excited to announce Cloudflare's Ethereum Gateway, where you can interact with the Ethereum network without installing any software on your computer. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today, as part of <a href="/welcome-to-crypto-week-2019/">Crypto Week 2019</a>, we are excited to announce Cloudflare's Ethereum Gateway, where you can interact with the Ethereum network without installing any additional software on your computer.</p><p>This is another tool in Cloudflare’s Distributed Web Gateway tool set. Currently, Cloudflare lets you host content on the InterPlanetary File System (IPFS) and access it through your own custom domain. Similarly, the new Ethereum Gateway allows access to the Ethereum network, which you can provision through your custom hostname.</p><p>This setup makes it possible to add interactive elements to sites powered by <a href="https://blockgeeks.com/guides/smart-contracts/">Ethereum smart contracts</a>, a decentralized computing platform. And, in conjunction with the IPFS gateway, this allows hosting websites and resources in a decentralized manner, and has the extra bonus of the added speed, security, and reliability provided by the Cloudflare edge network. You can access our Ethereum gateway directly at <a href="https://cloudflare-eth.com">https://cloudflare-eth.com</a>.</p><p>This brief primer on how Ethereum and smart contracts work has examples of the many possibilities of using the Cloudflare Distributed Web Gateway.</p>
    <div>
      <h3><b>Primer on Ethereum</b></h3>
      <a href="#primer-on-ethereum">
        
      </a>
    </div>
    <p>You may have heard of Ethereum as a cryptocurrency. What you may not know is that Ethereum is so much more. Ethereum is a distributed virtual computing network that stores and enforces smart contracts.</p><p>So, what is a smart contract?</p><p>Good question. Ethereum smart contracts are simply a piece of code stored on the Ethereum blockchain. When the contract is triggered, it runs on the Ethereum Virtual Machine (EVM). The EVM is a distributed virtual machine that runs smart contract code and produces cryptographically verified changes to the state of the Ethereum blockchain as its result.</p><p>To illustrate the power of smart contracts, let's consider a little example.</p><p>Anna wants to start a VPN provider, but she lacks the capital. To raise funds for her venture she decides to hold an Initial Coin Offering (ICO). Rather than design an ICO contract from scratch Anna bases her contract off of <a href="https://ethereum.org/en/developers/docs/standards/tokens/erc-20/">ERC-20</a>. ERC-20 is a template for issuing fungible tokens, perfect for ICOs. Anna sends her ERC-20 compliant contract to the Ethereum network, and starts to sell stock in her new company, VPN Co.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/125yD5Cd5Q1meFIupmLr5M/77b5e343b8b0d2ac74eb701b9da71349/ico_2x.png" />
            
            </figure><p>Once she's sorted out funds, Anna sits down and starts to write a smart contract. Anna’s contract asks customers to send her their public key, along with some Ether (the coin product of Ethereum). She then authorizes the public key to access her VPN service. All without having to hold any secret information. Huzzah!</p><p>Next, rather than set up the infrastructure to run a VPN herself, Anna decides to use the blockchain again, but this time as a customer. Cloud Co. sells managed cloud infrastructure using their own smart contract. Anna programs her contract to send the appropriate amount of Ether to Cloud Co.'s contract. Cloud Co. then provisions the servers she needs to host her VPN. By automatically purchasing more infrastructure every time she has a new customer, her VPN company can scale totally autonomously.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Ir87Td7jTHxaC3kL7oLOH/74246966422e55ddf4cd4e4b3922eeb5/VPN-co-_2x.png" />
            
            </figure><p>Finally, Anna pays dividends to her investors out of the profits, keeping a little for herself.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6tosVrjURmYmMFxqzRAn4t/5e0bc26c6915e1e67cdd6f963afee1a9/slice-of-pie-_2x.png" />
            
            </figure><p>And there you have it.</p><p>A decentralised, autonomous, smart VPN provider.</p><p>A smart contract stored on the blockchain has an associated account for storing funds, and the contract is triggered when someone sends Ether to that account. So for our VPN example, the provisioning contract triggers when someone transfers money into the account associated with Anna’s contract.</p><p>What distinguishes smart contracts from ordinary code?</p><p>The "smart" part of a smart contract is they run autonomously. The "contract" part is the guarantee that the code runs as written.</p><p>Because this contract is enforced cryptographically, maintained in the tamper-resistant medium of the blockchain and verified by the consensus of the network, these contracts are more reliable than regular contracts which can provoke dispute.</p>
    <div>
      <h3><b>Ethereum Smart Contracts vs. Traditional Contracts</b></h3>
      <a href="#ethereum-smart-contracts-vs-traditional-contracts">
        
      </a>
    </div>
    <p>A regular contract is enforced by the court system, litigated by lawyers. The outcome is uncertain; different courts rule differently and hiring more or better lawyers can swing the odds in your favor.</p><p>Smart contract outcomes are predetermined and are nearly incorruptible. However, here be dragons: though the outcome can be predetermined and incorruptible, a poorly written contract might not have the intended behavior, and because contracts are immutable, this is difficult to fix.</p>
    <div>
      <h3><b>How are smart contracts written?</b></h3>
      <a href="#how-are-smart-contracts-written">
        
      </a>
    </div>
    <p>You can write smart contracts in a number of languages, some of which are Turing complete, e.g. <a href="https://solidity.readthedocs.io">Solidity</a>. A Turing complete language lets you write code that can evaluate any computable function. This puts Solidity in the same class of languages as Python and Java. The compiled bytecode is then run on the EVM.</p><p>The EVM differs from a standard VM in a number of ways:</p>
    <div>
      <h5>The EVM is distributed</h5>
      <a href="#the-evm-is-distributed">
        
      </a>
    </div>
    <p>Each piece of code is run by numerous nodes. Nodes verify the computation before accepting a block, and therefore ensure that miners who want their blocks accepted must always run the EVM honestly. A block is only considered accepted when more than half of the network accepts it. This is the consensus part of Ethereum.</p><h6>The EVM is entirely deterministic</h6><p>This means that the same inputs to a function always produce the same outputs. Because regular VMs have access to file storage and the network, the results of a function call can be non-deterministic. Every EVM has the same start state, thus a given set of inputs always gives the same outputs. This makes the EVM more reliable than a standard VM.</p><p>There are two big gotchas that come with this determinism:</p><ul><li><p>EVM bytecode is Turing complete and therefore discerning the outputs without running the computation is not always possible.</p></li><li><p>Ethereum smart contracts can store state on the blockchain. This means that the output of the function can vary as the blockchain changes. Although, technically this is deterministic in that the blockchain is an input to the function, it may still be impossible to derive the output in advance.</p></li></ul><p>This however means that they suffer from the same problems as any piece of software – bugs. However, unlike normal code where the authors can issue a patch, code stored on the blockchain is immutable. More problematically, even if the author provides a new smart contract, the old one is always still available on the blockchain.</p><p>This means that when writing contracts authors must be especially careful to write secure code, and include a kill switch to ensure that if bugs do reside in the code, they can be squashed. If there is no kill switch and there are vulnerabilities in the smart contract that can be exploited, it can potentially lead to the theft of resources from the smart contract or from other individuals. EVM Bytecode includes a special <code>SELFDESTRUCT</code> opcode that deletes a contract, and sends all funds to the specified address for just this purpose.</p><p>The need to include a kill switch was brought into sharp focus during the <a href="https://en.wikipedia.org/wiki/The_DAO_(organization)">infamous DAO incident</a>. The DAO smart contract acted as a complex decentralized venture capital (VC) fund and held Ether worth 250 million dollars at its peack collected from a group of investors. Hackers exploited vulnerabilities in the smart contract and stole Ether wirth 50 million dollars.</p><p>Because there is no way to undo transactions in Ethereum, there was a highly controversial “hard fork,” where the majority of the community agreed to accept a block with an “irregular state change” that essentially drained all DAO funds into a special “WithdrawDAO” recovery contract. By convincing enough miners to accept this irregular block as valid, the DAO could return funds.</p><p>Not everyone agreed with the change. Those who disagreed rejected the irregular block and formed the Ethereum Classic network, with both branches of the fork growing independently.</p><p>Kill switches, however, can cause their own problems. For example, when a contract used as a library flips its kill switch, all contracts relying on this contract can no longer operate as intended, even though the underlying library code is immutable. This caused over 500,000 ETH to become <a href="https://www.parity.io/security-alert-2/">stuck in multi-signature wallets</a> when an attacker triggered the kill switch of an underlying library.</p><p>Users of the multi-signature library assumed the immutability of the code meant that the library would always operate as anticipated. But the smart contracts that interact with the blockchain are only deterministic when accounting for the state of the blockchain.</p><p>In the wake of the DAO, various tools were created that check smart contracts for bugs or enable bug bounties, for example <a href="https://securify.chainsecurity.com/">Securify</a> and <a href="https://thehydra.io/">The Hydra</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/62DZdNA9leTphizaCEyR5k/6073b3bcfb18e38fc049cd06fdab7a57/bug_3x.png" />
            
            </figure><p>Come here, you ...</p><p>Another way smart contracts avoid bugs is using standardized patterns. For example, ERC-20 defines a standardized interface for producing tokens such as those used in ICOs, and ERC-721 defines a standardized interface for implementing non-fungible tokens. Non-fungible tokens can be used for trading-card games like <a href="https://www.cryptokitties.co/">CryptoKitties</a>. CryptoKitties is a trading-card style game built on the Ethereum blockchain. Players can buy, sell, and breed cats, with each cat being unique.</p><p>CryptoKitties is built on a collection of smart contracts that provides an <a href="https://github.com/cryptocopycats/awesome-cryptokitties/tree/master/contracts">open-source Application Binary Interface (ABI</a>) for interacting with the KittyVerse -- the virtual world of the CryptoKitties application. An ABI simply allows you to call functions in a contract and receive any returned data. The <code>KittyBase</code> code may look like this:</p>
            <pre><code>Contract KittyBase is KittyAccessControl {
	event Birth(address owner, uint256 kittyId, uint256 matronId, uint256 sireId, uint256 genes);
	event Transfer(address from, address to, uint256 tokenId);
    struct Kitty {
        uint256 genes;
        uint64 birthTime;
        uint64 cooldownEndBlock;
        uint32 matronId;
        uint32 sireId;
        uint32 siringWithId;
        uint16 cooldownIndex;
        uint16 generation;
    }
	[...]
    function _transfer(address _from, address _to, uint256 _tokenId) internal {
    ...
    }
    function _createKitty(uint256 _matronId, uint256 _sireId, uint256 _generation, uint256 _genes, address _owner) internal returns (uint) {
    ...
    }
	[...]
}</code></pre>
            <p>Besides defining what a Kitty is, this contract defines two basic functions for transferring and creating kitties. Both are internal and can only be called by contracts that implement <code>KittyBase</code>. The <code>KittyOwnership</code> contract implements both ERC-721 and <code>KittyBase</code>, and implements an external <code>transfer</code> function that calls the internal <code>_transfer</code> function. This code is compiled into bytecode written to the blockchain.</p><p>By implementing a standardised interface like ERC-721, smart contracts that aren’t specifically aware of CryptoKitties can still interact with the KittyVerse. The CryptoKitties ABI functions allow users to create distributed apps (dApps), of their own design on top of the KittyVerse, and allow other users to use their dApps. This extensibility helps demonstrate the potential of smart contracts.</p>
    <div>
      <h3><b>How is this so different?</b></h3>
      <a href="#how-is-this-so-different">
        
      </a>
    </div>
    <p>Smart contracts are, by definition, public. Everyone can see the terms and understand where the money goes. This is a radically different approach to providing transparency and accountability. Because all contracts and transactions are public and verified by consensus, trust is distributed between the people, rather than centralized in a few big institutions.</p><p>The trust given to institutions is historic in that we trust them because they have previously demonstrated trustworthiness.</p><p>The trust placed in consensus-based algorithms is based on the assumption that most people are honest, or more accurately, that no sufficiently large subset of people can collude to produce a malicious outcome. This is the democratisation of trust.</p><p>In the case of the DAO attack, a majority of nodes <i>agreed</i> to accept an “irregular” state transition. This effectively undid the damage of the attack and demonstrates how, at least in the world of blockchain, perception is reality. Because most people “believed” (accepted) this irregular block, it became a “real,” valid block. Most people think of the blockchain as immutable, and trust the power of consensus to ensure correctness, however if enough people agree to do something irregular, they don't have to keep the rules.</p>
    <div>
      <h3><b>So where does Cloudflare fit in?</b></h3>
      <a href="#so-where-does-cloudflare-fit-in">
        
      </a>
    </div>
    <p>Accessing the Ethereum network and its attendant benefits directly requires running complex software, including downloading and cryptographically verifying hundreds of gigabytes of data, which apart from producing technical barriers to entry for users, can also exclude people with low-power devices.</p><p>To help those users and devices access the Ethereum network, the Cloudflare Ethereum gateway allows any device capable of accessing the web to interact with the Ethereum network in a safe, reliable way.</p><p>Through our gateway, not only can you explore the blockchain, but if you give our gateway a signed transaction, we’ll push it to the network to allow miners to add it to their blockchain. This means that you can send Ether and even put new contracts on the blockchain without having to run a node.</p><p>"But Jonathan," I hear you say, "by providing a gateway aren't you just making Cloudflare a centralizing institution?"</p><p>That’s a fair question. Thankfully, Cloudflare won’t be alone in offering these gateways. We’re joining alongside organizations, such as <a href="https://infura.io">Infura</a>, to expand the constellation of gateways that already exist. We hope that, by providing a fast, reliable service, we can enable people who never previously used smart-contracts to do so, and in so doing bring the benefits they offer to billions of regular Internet users.</p><blockquote><p>"We're excited that Cloudflare is bringing their infrastructure expertise to the Ethereum ecosystem. Infura has always believed in the importance of standardized, open APIs and compatibility between gateway providers, so we look forward to collaborating with their team to build a better distributed web." - E.G. Galano, <a href="https://infura.io/">Infura</a> co-founder.</p></blockquote><p>By providing a gateway to the Ethereum network, we help users make the jump from general web-user to cryptocurrency native, and eventually make the distributed web a fundamental part of the Internet.</p>
    <div>
      <h3><b>What can you do with Cloudflare's Gateway?</b></h3>
      <a href="#what-can-you-do-with-cloudflares-gateway">
        
      </a>
    </div>
    <p>Visit <a href="https://cloudflare-eth.com">cloudflare-eth.com</a> to interact with our example app. But to really explore the Ethereum world, access the RPC API, where you can do anything that can be done on the Ethereum network itself, from examining contracts, to transferring funds.</p><p>Our Gateway accepts <code>POST</code> requests containing JSON. For a complete list of calls, visit the <a href="https://github.com/ethereum/wiki/wiki/JSON-RPC">Ethereum github page</a>. So, to get the block number of the most recent block, you could run:</p>
            <pre><code>curl https://cloudflare-eth.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'</code></pre>
            <p>and you would get a response something like this:</p>
            <pre><code>{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x780f17"
}</code></pre>
            <p>We also invite developers to build dApps based on our Ethereum gateway using our API. Our API allows developers to build websites powered by the Ethereum blockchain. Check out <a href="https://developers.cloudflare.com/distributed-web/ethereum-gateway/">developer docs</a> to get started. If you want to read more about how Ethereum works check out this <a href="https://medium.com/@preethikasireddy/how-does-ethereum-work-anyway-22d1df506369">deep dive</a>.</p>
    <div>
      <h3><b>The architecture</b></h3>
      <a href="#the-architecture">
        
      </a>
    </div>
    <p>Cloudflare is uniquely positioned to host an Ethereum gateway, and we have the utmost faith in the products we offer to customers. This is why the Cloudflare Ethereum gateway runs as a Cloudflare customer and we <a href="https://en.wikipedia.org/wiki/Eating_your_own_dog_food">dogfood</a> our own products to provide a fast and reliable gateway. The domain we run the gateway on (<a href="https://cloudflare-eth.com">https://cloudflare-eth.com</a>) uses <a href="https://www.cloudflare.com/products/cloudflare-workers/">Cloudflare Workers</a> to cache responses for popular queries made to the gateway. Responses for these queries are answered directly from the Cloudflare edge, which can result in a ~6x speed-up.</p><p>We also use <a href="/introducing-load-balancing-intelligent-failover-with-cloudflare/">Load balancing</a> and <a href="/argo-tunnel/">Argo Tunnel</a> for fast, redundant, and secure content delivery. With Argo Smart Routing enabled, requests and responses to our Ethereum gateway are tunnelled directly from our Ethereum node to the Cloudflare edge using the best possible routing.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4JQmJaXMtzmPq4OuuP2897/580a60e6443392ff0da26a94f7842dc2/imageLikeEmbed--1-.png" />
            
            </figure><p>Similar to our <a href="https://cloudflare.com/distributed-web-gateway">IPFS gateway</a>, <a href="https://cloudflare-eth.com">cloudflare-eth.com</a> is an <a href="https://www.cloudflare.com/ssl-for-saas-providers/">SSL for SaaS</a> provider. This means that anyone can set up the Cloudflare Ethereum gateway as a backend for access to the Ethereum network through their own registered domains. For more details on how to set up your own domain with this functionality, see the Ethereum tab on <a href="https://cloudflare.com/distributed-web-gateway">cloudflare.com/distributed-web-gateway</a>.</p><p>With these features, you can use Cloudflare’s Distributed Web Gateway to create a fully decentralized website with an interactive backend that allows interaction with the IPFS and Ethereum networks. For example, you can host your content on IPFS (using something like <a href="https://pinata.cloud">Pinata</a> to pin the files), and then host the website backend as a smart contract on Ethereum. This architecture does not require a centralized server for hosting files or the actual website. Added to the power, speed, and security provided by Cloudflare’s edge network, your website is delivered to users around the world with unparalleled efficiency.</p>
    <div>
      <h3>Embracing a distributed future</h3>
      <a href="#embracing-a-distributed-future">
        
      </a>
    </div>
    <p>At Cloudflare, we support technologies that help distribute trust. By providing a gateway to the Ethereum network, we hope to facilitate the growth of a decentralized future.</p><p>We thank the Ethereum Foundation for their support of a new gateway in expanding the distributed web:</p><blockquote><p>“Cloudflare's Ethereum Gateway increases the options for thin-client applications as well as decentralization of the Ethereum ecosystem, and I can't think of a better person to do this work than Cloudflare. Allowing access through a user's custom hostname is a particularly nice touch. Bravo.” - Dr. Virgil Griffith, Head of Special Projects, Ethereum Foundation.</p></blockquote><p>We hope that by allowing anyone to use the gateway as the backend for their domain, we make the Ethereum network more accessible for everyone; with the added speed and security brought by serving this content directly from Cloudflare’s global edge network.</p><p>So, go forth and build our vision – the distributed crypto-future!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5fM3vAj1tUUkBVxyauQZQq/093ceaa41694d5b6493ac02f173ca5a0/crypto-week-2019-header-circle_2x.png" />
            
            </figure> ]]></content:encoded>
            <category><![CDATA[Crypto Week]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Ethereum]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Research]]></category>
            <guid isPermaLink="false">4oOx6ebFXMI1k3UBQBDy6j</guid>
            <dc:creator>Jonathan Hoyland</dc:creator>
        </item>
        <item>
            <title><![CDATA[Continuing to Improve our IPFS Gateway]]></title>
            <link>https://blog.cloudflare.com/continuing-to-improve-our-ipfs-gateway/</link>
            <pubDate>Wed, 19 Jun 2019 13:00:00 GMT</pubDate>
            <description><![CDATA[ When we launched our InterPlanetary File System (IPFS) gateway last year we were blown away by the positive reception.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>When we launched our InterPlanetary File System (IPFS) gateway <a href="/distributed-web-gateway/">last year</a> we were blown away by the positive reception. Countless people gave us valuable suggestions for improvement and made open-source contributions to make serving content through our gateway easy (many captured in our <a href="https://developers.cloudflare.com/distributed-web/">developer docs</a>). Since then, our gateway has grown to regularly handle over a thousand requests per second, and has become the primary access point for several IPFS websites.</p><p>We’re committed to helping grow IPFS and have taken what we have learned since our initial release to improve our gateway. So far, we’ve done the following:</p>
    <div>
      <h3>Automatic Cache Purge</h3>
      <a href="#automatic-cache-purge">
        
      </a>
    </div>
    <p>One of the ways we tried to improve the performance of our gateway when we initially set it up was by setting really high cache TTLs. After all, content on IPFS is largely meant to be static. The complaint we heard though, was that site owners were frustrated at wait times upwards of several hours for changes to their website to propagate.</p><p>The way an IPFS gateway knows what content to serve when it receives a request for a given domain is by looking up the value of a TXT record associated with the domain – the DNSLink record. The value of this TXT record is the hash of the <b>entire</b> site, which changes if any one bit of the website changes. So we wrote a <a href="https://www.cloudflare.com/products/cloudflare-workers/">Worker</a> script that makes a DNS-over-HTTPS query to 1.1.1.1 and bypasses cache if it sees that the DNSLink record of a domain is different from when the content was originally cached.</p><p>Checking DNS gives the illusion of a much lower cache TTL and usually adds less than 5ms to a request, whereas revalidating the cache with a request to the origin could take anywhere from 30ms to 300ms. And as an additional usability bonus, the 1.1.1.1 cache automatically purges when Cloudflare customers change their DNS records. Customers who don’t manage their DNS records with us can purge their cache using <a href="https://1.1.1.1/purge-cache/">this tool</a>.</p>
    <div>
      <h3>Beta Testing for Orange-to-Orange</h3>
      <a href="#beta-testing-for-orange-to-orange">
        
      </a>
    </div>
    <p>Our gateway was originally based on a feature called <a href="https://support.cloudflare.com/hc/en-us/articles/217371987-Managing-Custom-Hostnames-SSL-for-SaaS-">SSL for SaaS</a>. This tweaks the way our edge works to allow anyone, Cloudflare customers or not, to CNAME their own domain to a target domain on our network, and have us send traffic we see for their domain to the target domain’s origin. SSL for SaaS keeps valid certificates for these domains in the Cloudflare database (hence the name), and applies the target domain’s configuration to these requests (for example, enforcing Page Rules) before they reach the origin.</p><p>The great thing about SSL for SaaS is that it doesn’t require being on the Cloudflare network. New people can start serving their websites through our gateway with their existing DNS provider, instead of migrating everything over. All Cloudflare settings are inherited from the target domain. This is a huge convenience, but also means that the source domain can’t customize their settings even if they do migrate.</p><p>This can be improved by an experimental feature called Orange-to-Orange (O2O) from the Cloudflare Edge team. O2O allows one zone on Cloudflare to CNAME to another zone, and apply the settings of both zones in layers. For example, cloudflare-ipfs.com has <b>Always Use HTTPS</b> turned off for various reasons, which means that every site served through our gateway also does. O2O allows site owners to override this setting by enabling <b>Always Use HTTPS</b> just for their website, if they know it’s okay, as well as adding custom Page Rules and Worker scripts to embed all sorts of complicated logic.</p><p>If you are on an Enterprise plan and would like to try this out on your domain, please reach out to. your account team with this request and we'll enable it for you in the coming weeks.</p>
    <div>
      <h3>Subdomain-based Gateway</h3>
      <a href="#subdomain-based-gateway">
        
      </a>
    </div>
    <p>To host an application on IPFS it’s pretty much essential to have a custom domain for your app. We discussed all the reasons for this in our post, <a href="/e2e-integrity/">End-to-End Integrity with IPFS</a> – essentially saying that because browsers only sandbox websites at the domain-level, serving an app directly from a gateway’s URL is not secure because another (malicious) app could steal its data.</p><p>Having a custom domain gives apps a secure place to keep user data, but also makes it possible for whoever controls the DNS for the domain to change a website’s content without warning. To provide both a secure context to apps as well as eternal immutability, Cloudflare set up a subdomain-based gateway at cf-ipfs.com.</p><p>cf-ipfs.com doesn’t respond to requests to the root domain, only at subdomains, where it interprets the subdomain as the hash of the content to serve. This means a request to https://.cf-ipfs.com is the equivalent of going to <a href="https://cloudflare-ipfs.com/ipfs/">https://cloudflare-ipfs.com/ipfs/</a>. The only technicality is that because domain names are case-insensitive, the hash must be re-encoded from Base58 to Base32. Luckily, the standard IPFS client provides a utility for this!</p><p>As an example, we’ll take the classic Wikipedia mirror on IPFS:<a href="https://cloudflare-ipfs.com/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/">https://cloudflare-ipfs.com/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/</a></p><p>First, we convert the hash, <code>QmXoyp...6uco</code> to base32:</p>
            <pre><code>$ ipfs cid base32 QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco
bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq</code></pre>
            <p>which tells us we can go here instead:</p><p><a href="https://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq.cf-ipfs.com/wiki/">https://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq.cf-ipfs.com/wiki/</a></p><p>The main downside of the subdomain approach is that for clients without <a href="/encrypted-sni/">Encrypted SNI</a> support, the hash is leaked to the network as part of the TLS handshake. This can be bad for privacy and enable <a href="https://www.bleepingcomputer.com/news/security/south-korea-is-censoring-the-internet-by-snooping-on-sni-traffic/">network-level censorship</a>.</p>
    <div>
      <h3>Enabling Session Affinity</h3>
      <a href="#enabling-session-affinity">
        
      </a>
    </div>
    <p>Loading a website usually requires fetching more than one asset from a backend server, and more often than not, “more than one” is more like “more than a dozen.” When that website is being loaded over IPFS, it dramatically improves performance when the IPFS node can make one connection and re-use it for all assets.</p><p>Behind the curtain, we run several IPFS nodes to reduce the likelihood of an outage and improve throughput. Unfortunately, with the way it was originally setup, each request for a different asset on a website would likely go to a different IPFS node and all those connections would have to be made again.</p><p>We fixed this by replacing the original backend load balancer with our own <a href="https://www.cloudflare.com/load-balancing/">Load Balancing</a> product that supports Session Affinity and automatically directs requests from the same user to the same IPFS node, minimizing redundant network requests.</p>
    <div>
      <h3>Connecting with Pinata</h3>
      <a href="#connecting-with-pinata">
        
      </a>
    </div>
    <p>And finally, we’ve configured our IPFS nodes to maintain a persistent connection to the nodes run by <a href="https://pinata.cloud/">Pinata</a>, a company that helps people pin content to the IPFS network. Having a persistent connection significantly improves the performance and reliability of requests to our gateway, for content on their network. Pinata has written their own blog post, which you can find <a href="https://medium.com/pinata/how-to-easily-host-a-website-on-ipfs-9d842b5d6a01">here</a>, that describes how to upload a website to IPFS and keep it online with a combination of Cloudflare and Pinata.</p><p>As always, we look forward to seeing what the community builds on top of our work, and hearing about how else Cloudflare can improve the Internet.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7jxOs3MCZyCfTxalFujmdZ/90734a85f553cb3903e3b6338758811f/image2-5.png" />
            
            </figure> ]]></content:encoded>
            <category><![CDATA[Crypto Week]]></category>
            <category><![CDATA[Cryptography]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">2v3Nrp3CmcVKRsqyifM9un</guid>
            <dc:creator>Brendan McMillion</dc:creator>
        </item>
        <item>
            <title><![CDATA[End-to-End Integrity with IPFS]]></title>
            <link>https://blog.cloudflare.com/e2e-integrity/</link>
            <pubDate>Mon, 17 Sep 2018 13:02:00 GMT</pubDate>
            <description><![CDATA[ Use Cloudflare’s IPFS gateway to set up a website which is end-to-end secure, while maintaining the performance and reliability benefits of being served from Cloudflare’s edge network. ]]></description>
            <content:encoded><![CDATA[ <p>This post describes how to use Cloudflare's IPFS gateway to set up a website which is end-to-end secure, while maintaining the performance and reliability benefits of being served from Cloudflare’s edge network. If you'd rather read an introduction to the concepts behind IPFS first, you can find that in <a href="/distributed-web-gateway/">our announcement</a>. Alternatively, you could skip straight to the <a href="https://developers.cloudflare.com/distributed-web/">developer docs</a> to learn how to set up your own website.</p><p>By 'end-to-end security', I mean that neither the site owner nor users have to trust Cloudflare to serve the correct documents, like they do now. This is similar to how using HTTPS means you don't have to trust your ISP to not modify or inspect traffic.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6TAh0shMDYcLioHSrr05YS/9df521abdbf0ddc64596066f864466a4/ipfs-blog-post-image-1-copy_3.5x--1-.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/75MIGMU5KJSYIZudpdJcNM/666111e79475ef39ca6701ad7e0cc27e/ipfs-blog-post-image-2-copy_3.5x--1-.png" />
            
            </figure>
    <div>
      <h3>CNAME Setup with Universal SSL</h3>
      <a href="#cname-setup-with-universal-ssl">
        
      </a>
    </div>
    <p>The first step is to choose a <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a> for your website. Websites should be given their own domain name, rather than served directly from the gateway by root hash, so that they are considered a distinct origin by the browser. This is primarily to prevent cache poisoning, but there are several functional advantages as well. It gives websites their own instance of localStorage and their own cookie jar which are sandboxed from inspection and manipulation by malicious third-party documents. It also lets them run Service Workers without conflict, and request special permissions of the user like access to the webcam or GPS. But most importantly, having a domain name makes a website easier to identify and remember.</p><p>Now that you've <a href="https://www.cloudflare.com/products/registrar/">chosen a domain</a>, rather than using it as-is, you’ll need to add "ipfs-sec" as the left-most subdomain. So for example, you'd use "ipfs-sec.example.com" instead of just "example.com". The ipfs-sec subdomain is special because it signals to the user and to their browser that your website is capable of being served with end-to-end integrity.</p><p>In addition to that, ipfs-sec domains require <a href="/dnssec-an-introduction/">DNSSEC</a> to be properly setup to prevent spoofing. Unlike with standard HTTPS, where DNS spoofing can't usually result in a on-path attacker attack, this is exactly what DNS spoofing does to IPFS because the root hash of the website is stored in DNS. Many <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name-registrar/">registrars</a> make enabling DNSSEC as easy as the push of a button, though some don't support it at all.</p><p>With the ipfs-sec domain, you can now follow the <a href="https://developers.cloudflare.com/distributed-web/ipfs-gateway/connecting-website/">developer documentation</a> on how to serve a generic static website from IPFS. Note that you'll need to use a CNAME setup and retain control of your <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS</a>, rather than the easier method of just signing up for Cloudflare. This helps maintain a proper separation between the party managing the DNSSEC signing keys and the party serving content to end-users. Keep in mind that CNAME setups tend to be problematic and get into cases that are difficult to debug, which is why we reserve them for technically sophisticated customers.</p><p>You should now be able to access your website over HTTP and HTTPS, backed by our gateway.</p>
    <div>
      <h3>Verifying what the Gateway Serves</h3>
      <a href="#verifying-what-the-gateway-serves">
        
      </a>
    </div>
    <p>HTTPS helps makes sure that nobody between the user and Cloudflare's edge network has tampered with the connection, but it does nothing to make sure that Cloudflare actually serves the content the user asked for. To solve this, we built two connected projects: a modified gateway service and a browser extension.</p><p>First, we <a href="https://github.com/cloudflare/go-ipfs">forked the go-ipfs repository</a> and gave it the ability to offer cryptographic proofs that it was serving content honestly, which it will do whenever it sees requests with the HTTP header <code>X-Ipfs-Secure-Gateway: 1</code>. The simplest case for this is when users request a single file from the gateway by its hash -- all the gateway has to do is serve the content and any metadata that might be necessary to re-compute the given hash.</p><p>A more complicated case is when users request a file from a directory. Luckily, directories in IPFS are just files containing a mapping from file name to the hash of the file, and very large directories can be transparently split up into several smaller files, structured into a search tree called a <a href="https://idea.popcount.org/2012-07-25-introduction-to-hamt/">Hash Array Mapped Trie (HAMT)</a>. To convince the client that the gateway is serving the contents of the correct file, the gateway first serves the file corresponding to the directory, or every node in the search path if the directory is a HAMT. The client can hash this file (or search tree node), check that it equals the hash of the directory they asked for, and look up the hash of the file they want from within the directory's contents. The gateway then serves the contents of the requested file, which the client can now verify because it knows the expected hash.</p><p>Finally, the most complicated case by far is when the client wants to access content by domain name. It's complicated because the protocol for authenticating DNS, called DNSSEC, has very few client-side implementations. DNSSEC is also not widely deployed, even though some registrars make it even easier than setting up HTTPS. In the end, we ended up writing our own simple DNSSEC-validating resolver that's capable of outputting a cryptographically-convincing proof that it did some lookup correctly.</p><p>It works the same way as certificate validation in HTTPS: we start at the bottom, with a signature from some authority claiming to be example.com over the DNS records they want us to serve. We then lookup a delegation (DS record) from an authority claiming to be .com, that says "example.com is the authority with these public keys" which is in turn signed by the .com authority's private key. And finally, we lookup a delegation from the root authority, ICANN (whose public keys we already have), attesting to the public keys used by the .com authority. All of these lookups bundled together form an authenticated chain starting at ICANN and ending at the exact records we want to serve. These constitute the proof.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4qVP41QjM9flXihnLEj4CH/441ee5dd840fbac451e12854248da9cd/IPFS-tech-post-_3.5x.png" />
            
            </figure><p><i>Chain of trust in DNSSEC.</i></p><br /><p>The second project we built out was a browser extension that requests these proofs from IPFS gateways and ipfs-sec domains, and is capable of verifying them. The extension uses the <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest">webRequest API</a> to sit between the browser's network stack and its rendering engine, preventing any unexpected data from being show to the user or unexpected code from being executed. The code for the browser extension is <a href="https://github.com/cloudflare/ipfs-ext">available on Github</a>, and can be installed through <a href="https://addons.mozilla.org/en-US/firefox/addon/cloudflare-ipfs-validator/">Firefox's add-on store</a>. We’re excited to add support for Chrome as well, but that can’t move forward until <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=487422">this ticket</a> in their bug tracker is addressed.</p><p>On the other hand, if a user doesn't have the extension installed, the gateway won't see the <code>X-Ipfs-Secure-Gateway</code> header and will serve the page like a normal website, without any proofs. This provides a graceful upgrade path to using IPFS, either through our extension that uses a third-party gateway or perhaps another browser extension that runs a proper IPFS node in-browser.</p>
    <div>
      <h3>Example Application</h3>
      <a href="#example-application">
        
      </a>
    </div>
    <p>My favorite website on IPFS so far has been the <a href="https://cloudflare-ipfs.com/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/">mirror of English Wikipedia</a> put up by <a href="https://ipfs.io/blog/24-uncensorable-wikipedia/">the IPFS team at Protocol Labs</a>. It's fast, fun to play with, and above all has practical utility. One problem that stands out though, is that the mirror has no search feature so you either have to know the URL of the page you want to see or try to find it through Google. The <a href="https://ipfs.io/ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Anasayfa.html">Turkish-language mirror</a> has in-app search but it requires a call to a dynamic API on the same host, and doesn't work through Cloudflare's gateway because we only serve static content.</p><p>I wanted to provide an example of the kinds of secure, performant applications that are possible with IPFS, and this made building a search engine seem like a prime candidate. Rather than steal Protocol Labs' idea of 'Wikipedia on IPFS', we decided to take the <a href="http://www.kiwix.org/">Kiwix</a> archives of all the different StackExchange websites and build a distributed search engine on top of that. You can play with the finished product here: <a href="https://ipfs-sec.stackexchange.cloudflare-ipfs.com">ipfs-sec.stackexchange.cloudflare-ipfs.com</a>.</p><p>The way it's built is actually really simple, at least as far as search engines go: We build an inverted index and publish it with the rest of each StackExchange, along with a JavaScript client that can read the index and quickly identify documents that are relevant to a user's query. Building the index takes two passes over the data:</p><ol><li><p>The first pass decides what words/tokens we want to allow users to search by. Tokens shouldn't be too popular (like the top 100 words in English), because then the list of all documents containing that token is going to be huge and it's not going to improve the search results anyways. They also shouldn't be too rare (like a timestamp with sub-second-precision), because then the index will be full of meaningless tokens that occur in only one document each. You can get a good estimate of the most frequent K tokens, using only constant-space, with the really simple space-saving algorithm from <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.114.9563&amp;rep=rep1&amp;type=pdf">this paper</a>.</p></li><li><p>Now that the first pass has given us the tokens we want to track, the second pass through the data actually builds the inverted index. That is, it builds a map from every token to the list of documents that contain that token, called a postings list. When a client wants to find only documents that contain some set of words/tokens, they download the list for each individual token and intersect them. It sounds less efficient than it is -- in reality, the postings lists are unnoticeably small (&lt;30kb) even in the worst case. And the browser can 'pipeline' the requests for the postings lists (meaning, send them all off at once) which makes getting a response to several requests about as fast as getting a response to one.</p></li></ol><p>We also store some simple statistics in each postings list to help rank the results. Essentially, documents that contain a query token more often are ranked higher than those that don't. And among the tokens in a query, those tokens that occur in fewer documents have a stronger effect on ranking than tokens that occur in many documents. That's why when I search for <a href="https://ipfs-sec.stackexchange.cloudflare-ipfs.com/crypto/search.html?q=AES+SIV">"AES SIV"</a> the first result that comes back is:</p><ul><li><p><a href="https://ipfs-sec.stackexchange.cloudflare-ipfs.com/crypto/A/question/54413.html">"Why is SIV a thing if MAC-and-encrypt is not the most secure way to go?"</a></p></li></ul><p>while the following is the fourth result, even though it has a higher score and greater number of total hits than first result:</p><ul><li><p><a href="https://ipfs-sec.stackexchange.cloudflare-ipfs.com/crypto/A/question/31835.html">"Why is AES-SIV not used, but AESKW, AKW1?"</a></p></li></ul><p>(AES is a very popular and frequently discussed encryption algorithm, while SIV is a lesser-known way of using AES.)</p><p>But this is what really makes it special: because the search index is stored in IPFS, the user can convince themselves that no results have been modified, re-arranged, or omitted without having to download the entire corpus. There's one small trick to making this statement hold true: All requests made by the search client must succeed, and if they don't, it outputs an error and no search results.</p><p>To understand why this is necessary, think about the search client when it first gets the user's query. It has to tokenize the query and decide which postings lists to download, where not all words in the user's query may be indexed. A naive solution is to try to download the postings list for every word unconditionally, and interpret a non-200 HTTP status code as "this postings list must not exist". In this case, a network adversary could block the search client from being able to access postings lists that lead to undesirable results, causing the client to output misleading search results either through omission or re-arranging.</p><p>What we do instead is store the dictionary of every indexed token in a file in the root of the index. The client can download the dictionary once, cache it, and use it for every search afterwards. This way, the search client can consult the dictionary to find out which requests should succeed and only send those.</p>
    <div>
      <h3>From Here</h3>
      <a href="#from-here">
        
      </a>
    </div>
    <p>We were incredibly excited when we realized the new avenues and types of applications that combining IPFS with Cloudflare open up. Of course, our IPFS gateway and the browser extension we built will need time to mature into a secure and reliable platform. But the ability to securely deliver web pages through third-party hosting providers and CDNs is incredibly powerful, and its something cryptographers and internet security professionals have been working towards for a long time. As much fun as we had building it, we're even more excited to see what you build with it.</p><p><a href="/subscribe/"><i>Subscribe to the blog</i></a><i> for daily updates on our announcements.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Zg5pDJxaCCTQXzqquORuu/1a2f514eff601ee0f88f245945a3ea54/CRYPTO-WEEK-banner-plus-logo_2x.png" />
            
            </figure><p></p> ]]></content:encoded>
            <category><![CDATA[Crypto Week]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Universal SSL]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">2ZSYs23n0hZhgRFnzpS5O1</guid>
            <dc:creator>Brendan McMillion</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare goes InterPlanetary - Introducing Cloudflare’s IPFS Gateway]]></title>
            <link>https://blog.cloudflare.com/distributed-web-gateway/</link>
            <pubDate>Mon, 17 Sep 2018 13:01:00 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to introduce Cloudflare’s IPFS Gateway, an easy way to access content from the the InterPlanetary File System (IPFS) that doesn’t require installing and running any special software on your computer. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today we’re excited to introduce Cloudflare’s IPFS Gateway, an easy way to access content from the InterPlanetary File System (IPFS) that doesn’t require installing and running any special software on your computer. We hope that our gateway, hosted at <a href="https://cloudflare-ipfs.com">cloudflare-ipfs.com</a>, will serve as the platform for many new highly-reliable and security-enhanced web applications. The IPFS Gateway is the first product to be released as part of our <a href="https://www.cloudflare.com/distributed-web-gateway">Distributed Web Gateway</a> project, which will eventually encompass all of our efforts to support new distributed web technologies.</p><p>This post will provide a brief introduction to IPFS. We’ve also written an accompanying blog post <a href="/e2e-integrity">describing what we’ve built</a> on top of our gateway, as well as <a href="https://developers.cloudflare.com/distributed-web/">documentation</a> on how to serve your own content through our gateway with your own custom hostname.</p>
    <div>
      <h3>Quick Primer on IPFS</h3>
      <a href="#quick-primer-on-ipfs">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3hS4Q3j1BBgCA4If6fFImz/d25f3b24017cb8dfcfa9208a68f8ed03/spaaaace-ipfs_3.5x-1.png" />
            
            </figure><p>Usually, when you access a website from your browser, your browser tracks down the origin server (or servers) that are the ultimate, centralized repository for the website’s content. It then sends a request from your computer to that origin server, wherever it is in the world, and that server sends the content back to your computer. This system has served the Internet well for decades, but there’s a pretty big downside: centralization makes it impossible to keep content online any longer than the origin servers that host it. If that origin server is hacked or taken out by a natural disaster, the content is unavailable. If the site owner decides to take it down, the content is gone. In short, mirroring is not a first-class concept in most platforms (<a href="https://www.cloudflare.com/always-online/">Cloudflare’s Always Online</a> is a notable exception).</p><p>The InterPlanetary File System aims to change that. IPFS is a peer-to-peer file system composed of thousands of computers around the world, each of which stores files on behalf of the network. These files can be anything: cat pictures, 3D models, or even entire websites. Over 5,000,000,000 files had been uploaded to <a href="https://cloudflare-ipfs.com/ipfs/QmWimYyZHzChb35EYojGduWHBdhf9SD5NHqf8MjZ4n3Qrr/Filecoin-Primer.7-25.pdf">IPFS already</a>.</p>
    <div>
      <h3>IPFS vs. Traditional Web</h3>
      <a href="#ipfs-vs-traditional-web">
        
      </a>
    </div>
    <p>There are two key differences between IPFS and the web as we think of it today.</p><p>The first is that with IPFS anyone can cache and serve any content—for free. Right now, with the traditional web, most typically rely on big hosting providers in remote locations to store content and serve it to the rest of the web. If you want to set up a website, you have to pay one of these major services to do this for you. With IPFS, anyone can sign up their computer to be a node in the system and start serving data. It doesn’t matter if you’re working on a Raspberry Pi or running the world’s biggest server. You can still be a productive node in the system.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/66pmjeMDzYrBDczI8gesbH/8b9b8588bd3bf911aa71bc5e87bbd671/Decentralized-Network-1.png" />
            
            </figure><p>The second key difference is that data is content-addressed, rather than location-addressed. That’s a bit of a subtle difference, but the ramifications are substantial, so it’s worth breaking down.</p><p>Currently, when you open your browser and navigate to example.com, you’re telling the browser “fetch me the data stored at example.com’s IP address” (this happens to be 93.184.216.34). That IP address marks where the content you want is stored in the network. You then send a request to the server at that IP address for the “example.com” content and the server sends back the relevant information. So at the most basic level, you tell the network where to look and the network sends back what it found.</p><p>IPFS turns that on its head.</p><p>With IPFS, every single block of data stored in the system is addressed by a cryptographic hash of its contents, i.e., a long string of letters and numbers that is unique to that block. When you want a piece of data in IPFS, you request it by its hash. So rather than asking the network “get me the content stored at 93.184.216.34,” you ask “get me the content that has a hash value of <code>QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy</code>.” (<code>QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy</code> happens to be the hash of a .txt file containing the string “I’m trying out IPFS”).</p>
    <div>
      <h3>How is this so different?</h3>
      <a href="#how-is-this-so-different">
        
      </a>
    </div>
    <p>Remember that with IPFS, you tell the network what to look for, and the network figures out where to look.</p>
    <div>
      <h3>Why does this matter?</h3>
      <a href="#why-does-this-matter">
        
      </a>
    </div>
    <p>First off, it makes the network more resilient. The content with a hash of <code>QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy</code> could be stored on dozens of nodes, so if one node that was caching that content goes down, the network will just look for the content on another node.</p><p>Second, it introduces an automatic level of security. Let’s say you know the hash value of a file you want. So you ask the network, “get me the file with hash <code>QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy</code>” (the example.txt file from above). The network responds and sends the data. When you receive all the data, you can rehash it. If the data was changed at all in transit, the hash value you get will be different than the hash you asked for. You can think of the hash as like a unique fingerprint for the file. If you’re sent back a different file than you were expecting to receive, it’s going to have a different fingerprint. This means that the system has a built-in way of knowing whether or not content has been tampered with.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/14TxfLu3bArvharLWoFCJY/64e2fadd810da7c0a51149d8f71a9f95/ipfs-blog-post-image-1-copy_3.5x.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4hO98vSSGsM8wh0r4w10GO/d4c1d501a571e241c1632a4645cfc8a3/ipfs-blog-post-image-2-copy_3.5x.png" />
            
            </figure>
    <div>
      <h3></h3>
      <a href="#">
        
      </a>
    </div>
    <p>A Note on IPFS Addresses and Cryptographic Hashes</p><p>Since we’ve spent some time going over why this content-addressed system is so special, it’s worth talking a little bit about how the IPFS addresses are built. Every address in IPFS is a <a href="https://github.com/multiformats/multihash">multihash</a>, which means that the address combines information about both the hashing algorithm used and the hash output into one string. IPFS multihashes have three distinct parts: the first byte of the mulithash indicates which hashing algorithm has been used to produce the hash; the second byte indicates the length of the hash; and the remaining bytes are the value output by the hash function. By default, IPFS uses the <a href="https://en.wikipedia.org/wiki/SHA-2">SHA-256</a> algorithm, which produces a 32-byte hash. This is represented by the string “Qm” in <a href="https://en.wikipedia.org/wiki/Base58">Base58</a> (the default encoding for IPFS addresses), which is why all the example IPFS addresses in this post are of the form “Qm…”.</p><p>While SHA-256 is the standard algorithm used today, this multihash format allows the IPFS protocol to support addresses produced by other hashing algorithms. This allows the IPFS network to move to a different algorithm, should the world discover flaws with SHA-256 sometime in the future. If someone hashed a file with another algorithm, the address of that file would start some characters other than “Qm”.</p><p>The good news is that, at least for now, SHA-256 is believed to have a number of qualities that make it a strong cryptographic hashing algorithm. The most important of these is that SHA-256 is collision resistant. A collision occurs when there are two different files that produce the same hash when run through the SHA-256 algorithm. To understand why it’s important to prevent collisions, consider this short scenario. Imagine some IPFS user, Alice, uploads a file with some hash, and another user, Bob, uploads a different file that happens to produce the exact same hash. If this happened, there would be two different files in the network with the exact same address. So if some third person, Carol, sent out an IPFS request for the content at that address, she wouldn't necessarily know whether she was going to receive Bob’s file or Alice’s file.</p><p>SHA-256 makes collisions extremely unlikely. Because SHA-256 computes a 256-bit hash, there are 2^256 possible IPFS addresses that the algorithm could produce. Hence, the chance that there are two files in IPFS that produce a collision is low. Very low. If you’re interested in more details, the <a href="https://en.wikipedia.org/wiki/Birthday_attack#Mathematics">birthday attack</a> Wikipedia page has a cool table showing exactly how unlikely collisions are, given a sufficiently strong hashing algorithm.</p>
    <div>
      <h3>How exactly do you access content on IPFS?</h3>
      <a href="#how-exactly-do-you-access-content-on-ipfs">
        
      </a>
    </div>
    <p>Now that we’ve walked through all the details of what IPFS is, you’re probably wondering how to use it. There are a number of ways to access content that’s been stored in the IPFS network, but we’re going to address two popular ones here. The first way is to download IPFS onto your computer. This turns your machine into a node of the IPFS network, and it’s the best way to interact with the network if you want to get down in the weeds. If you’re interested in playing around with IPFS, the Go implementation can be downloaded <a href="https://ipfs.io/docs/install/">here</a>.</p><p>But what if you want access to content that’s stored on IPFS without the hassle of operating a node locally on your machine? That’s where IPFS gateways come into play. IPFS gateways are third-party nodes that fetch content from the IPFS network and serve it to you over <a href="https://www.cloudflare.com/learning/ssl/what-is-https/">HTTPS</a>. To use a gateway, you don’t need to download any software or type any code. You simply open up a browser and type in the gateway’s name and the hash of the content you’re looking for, and the gateway will serve the content in your browser.</p><p>Say you know you want to access the example.txt file from before, which has the hash <code>QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy</code>, and there’s a public gateway that is accessible at <code>https://example-gateway.com</code></p><p>To access that content, all you need to do is open a browser and type</p>
            <pre><code>https://example-gateway.com/ipfs/QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy</code></pre>
            <p>and you’ll get back the data stored at that hash. The combination of the /ipfs/ prefix and the hash is referred to as the file path. You always need to provide a full file path to access content stored in IPFS.</p>
    <div>
      <h3>What can you do with Cloudflare’s Gateway?</h3>
      <a href="#what-can-you-do-with-cloudflares-gateway">
        
      </a>
    </div>
    <p>At the most basic level, you can access any of the billions of files stored on IPFS from your browser. But that’s not the only cool thing you can do. Using Cloudflare’s gateway, you can also build a website that’s hosted entirely on IPFS, but still available to your users at a custom domain name. Plus, we’ll issue any website connected to our gateway a <a href="https://www.cloudflare.com/application-services/products/ssl/">free SSL certificate</a>, ensuring that each website connected to Cloudflare's gateway is secure from snooping and manipulation. For more on that, check out the <a href="https://developers.cloudflare.com/distributed-web/">Distributed Web Gateway developer docs</a>.</p><p>A fun example we’ve put together using the <a href="http://www.kiwix.org/">Kiwix</a> archives of all the different StackExchange websites and build a distributed search engine on top of that using only IPFS. Check it out <a href="https://ipfs-sec.stackexchange.cloudflare-ipfs.com/">here</a>.</p>
    <div>
      <h3>Dealing with abuse</h3>
      <a href="#dealing-with-abuse">
        
      </a>
    </div>
    <p>IPFS is a peer-to-peer network, so there is the possibility of users sharing abusive content. This is not something we support or condone. However, just like how Cloudflare works with more traditional customers, Cloudflare’s IPFS gateway is simply a cache in front of IPFS. Cloudflare does not have the ability to modify or remove content from the IPFS network. If any abusive content is found that is served by the Cloudflare IPFS gateway, you can use the standard abuse reporting mechanism described <a href="https://www.cloudflare.com/abuse/">here</a>.</p>
    <div>
      <h3>Embracing a distributed future</h3>
      <a href="#embracing-a-distributed-future">
        
      </a>
    </div>
    <p>IPFS is only one of a family of technologies that are embracing a new, decentralized vision of the web. Cloudflare is excited about the possibilities introduced by these new technologies and we see our gateway as a tool to help bridge the gap between the traditional web and the new generation of distributed web technologies headlined by IPFS. By enabling everyday people to explore IPFS content in their browser, we make the ecosystem stronger and support its growth. Just like when Cloudflare launched back in 2010 and changed the game for web properties by providing the <a href="https://www.cloudflare.com/security/">security</a>, <a href="https://www.cloudflare.com/performance/">performance</a>, and <a href="https://www.cloudflare.com/performance/ensure-application-availability/">availability</a> that was previously only available to the Internet giants, we think the IPFS gateway will provide the same boost to content on the distributed web.</p><p>Dieter Shirley, CTO of Dapper Labs and Co-founder of CryptoKitties said the following:</p><blockquote><p>We’ve wanted to store CryptoKitty art on IPFS since we launched, but the tech just wasn’t ready yet. Cloudflare’s announcement turns IPFS from a promising experiment into a robust tool for commercial deployment. Great stuff!</p></blockquote><p>The IPFS gateway is exciting, but it’s not the end of the road. There are other equally interesting distributed web technologies that could benefit from Cloudflare’s massive global network and we’re currently exploring these possibilities. If you’re interested in helping build a better internet with Cloudflare, <a href="https://www.cloudflare.com/careers/"><b>we’re hiring!</b></a></p><p><a href="/subscribe/"><i>Subscribe to the blog</i></a><i> for daily updates on our announcements.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2kIF9JJRHMU2pmS0vA2xbc/4261d639ac630d4c0f55e676621ddd51/Crypto-Week-1-1.png" />
            
            </figure> ]]></content:encoded>
            <category><![CDATA[Crypto Week]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[Universal SSL]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Research]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">3gBDsqNt0ufJh5O7aQBBxd</guid>
            <dc:creator>Andy Parker</dc:creator>
        </item>
        <item>
            <title><![CDATA[Welcome to Crypto Week]]></title>
            <link>https://blog.cloudflare.com/crypto-week-2018/</link>
            <pubDate>Mon, 17 Sep 2018 13:00:00 GMT</pubDate>
            <description><![CDATA[ The Internet isn’t perfect. It was put together piecemeal through publicly funded research, private investment, and organic growth that has left us with an imperfect tapestry. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The Internet is an amazing invention. We marvel at how it connects people, connects ideas, and makes the world smaller. But the Internet isn’t perfect. It was put together piecemeal through publicly funded research, private investment, and organic growth that has left us with an imperfect tapestry. It’s also evolving. People are constantly developing creative applications and finding new uses for existing Internet technology. Issues like privacy and security that were afterthoughts in the early days of the Internet are now supremely important. People are being tracked and monetized, websites and web services are being attacked in interesting new ways, and the fundamental system of trust the Internet is built on is showing signs of age. The Internet needs an upgrade, and one of the tools that can make things better is cryptography.</p><p>Every day this week, Cloudflare will be announcing support for a new technology that uses cryptography to make the Internet better (hint: <a href="/subscribe/">subscribe to the blog</a> to make sure you don't miss any of the news). Everything we are announcing this week is free to use and provides a meaningful step towards supporting a new capability or structural reinforcement. So why are we doing this? Because it’s good for the users and good for the Internet. Welcome to Crypto Week!</p>
    <div>
      <h3>Day 1: Distributed Web Gateway</h3>
      <a href="#day-1-distributed-web-gateway">
        
      </a>
    </div>
    <ul><li><p><a href="/distributed-web-gateway/">Cloudflare goes InterPlanetary - Introducing Cloudflare’s IPFS Gateway</a></p></li><li><p><a href="/e2e-integrity/">End-to-End Integrity with IPFS</a></p></li></ul>
    <div>
      <h3>Day 2: DNSSEC</h3>
      <a href="#day-2-dnssec">
        
      </a>
    </div>
    <ul><li><p><a href="/automatically-provision-and-maintain-dnssec/">Expanding DNSSEC Adoption</a></p></li></ul>
    <div>
      <h3>Day 3: RPKI</h3>
      <a href="#day-3-rpki">
        
      </a>
    </div>
    <ul><li><p><a href="/rpki/">RPKI - The required cryptographic upgrade to BGP routing</a></p></li><li><p><a href="/rpki-details/">RPKI and BGP: our path to securing Internet Routing</a></p></li></ul>
    <div>
      <h3>Day 4: Onion Routing</h3>
      <a href="#day-4-onion-routing">
        
      </a>
    </div>
    <ul><li><p><a href="/cloudflare-onion-service/">Introducing the Cloudflare Onion Service</a></p></li></ul>
    <div>
      <h3>Day 5: Roughtime</h3>
      <a href="#day-5-roughtime">
        
      </a>
    </div>
    <ul><li><p><a href="/roughtime/">Roughtime: Securing Time with Digital Signatures</a></p></li></ul>
    <div>
      <h2>A more trustworthy Internet</h2>
      <a href="#a-more-trustworthy-internet">
        
      </a>
    </div>
    <p>Everything we do online depends on a relationship between users, services, and networks that is supported by some sort of trust mechanism. These relationships can be physical (I plug my router into yours), contractual (I paid a <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name-registrar/">registrar</a> for this <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a>), or reliant on a trusted third party (I sent a message to my friend on iMessage via Apple). The simple act of visiting a website involves hundreds of trust relationships, some explicit and some implicit. The sheer size of the Internet and number of parties involved make trust online incredibly complex. Cryptography is a tool that can be used to encode and enforce, and most importantly scale these trust relationships.</p><p>To illustrate this, let’s break down what happens when you visit a website. But before we can do this, we need to know the jargon.</p><ul><li><p><b>Autonomous Systems (100 thousand or so active)</b>: An AS corresponds to a network provider connected to the Internet. Each has a unique Autonomous System Number (ASN).</p></li><li><p><b>IP ranges (1 million or so)</b>: Each AS is assigned a set of numbers called IP addresses. Each of these IP addresses can be used by the AS to identify a computer on its network when connecting to other networks on the Internet. These addresses are assigned by the Regional Internet Registries (RIR), of which there are 5. Data sent from one IP address to another hops from one AS to another based on a “route” that is determined by a protocol called BGP.</p></li><li><p><b>Domain names (&gt;1 billion)</b>: Domain names are the human-readable names that correspond to Internet services (like “cloudflare.com” or “mail.google.com”). These Internet services are accessed via the Internet by connecting to their IP address, which can be obtained from their domain name via the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">Domain Name System (DNS)</a>.</p></li><li><p><b>Content (infinite)</b>: The main use case of the Internet is to enable the transfer of specific pieces of data from one point on the network to another. This data can be of any form or type.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7wDRty2HT3gbpxOlTNAgm5/98e8e5b4168678a79bb091946813a845/name-to-asn-_3.5x.png" />
            
            </figure><p>When you type a website such as blog.cloudflare.com into your browser, a number of things happen. First, a (recursive) DNS service is contacted to get the IP address of the site. This DNS server configured by your ISP when you connect to the Internet, or it can be a public service such as 1.1.1.1 or 8.8.8.8. A query to the DNS service travels from network to network along a path determined by BGP announcements. If the recursive DNS server does not know the answer to the query, then it contacts the appropriate authoritative DNS services, starting with a root DNS server, down to a top level domain server (such as com or org), down to the DNS server that is authoritative for the domain. Once the DNS query has been answered, the browser sends an HTTP request to its IP address (traversing a sequence of networks), and in response, the server sends the content of the website.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2JHDdXKcnw2lce7hUVVvjP/a76212811897165d5e081bdc56be32a4/colorful-crypto-overview--copy-3_3.5x.png" />
            
            </figure><p>So what’s the problem with this picture? For one, every DNS query and every network hop needs to be trusted in order to trust the content of the site. Any DNS query could be modified, a network could advertise an IP that belongs to another network, and any machine along the path could modify the content. When the Internet was small, there were mechanisms to combat this sort of subterfuge. Network operators had a personal relationship with each other and could punish bad behavior, but given the number of networks in existence <a href="https://www.cidr-report.org/as2.0/autnums.html">almost 400,000 as of this week</a> this is becoming difficult to scale.</p><p>Cryptography is a tool that can encode these trust relationships and make the whole system reliant on hard math rather than physical handshakes and hopes.</p>
    <div>
      <h3>Building a taller tower of turtles</h3>
      <a href="#building-a-taller-tower-of-turtles">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4thrwRrwuZ1ctzlstdLLqv/4e0c8c5b89d4faa9f8ff3c5d76251f01/turtles.jpg" />
            
            </figure><p><a href="https://www.flickr.com/photos/wwarby/2499825928">Attribution 2.0 Generic (CC BY 2.0)</a></p><p>The two main tools that cryptography provides to help solve this problem are cryptographic hashes and digital signatures.</p><p>A hash function is a way to take any piece of data and transform it into a fixed-length string of data, called a digest or hash. A hash function is considered cryptographically strong if it is computationally infeasible (read: very hard) to find two inputs that result in the same digest, and that changing even one bit of the input results in a completely different digest. The most popular hash function that is considered secure is SHA-256, which has 256-bit outputs. For example, the SHA-256 hash of the word “crypto” is</p><p><code>DA2F073E06F78938166F247273729DFE465BF7E46105C13CE7CC651047BF0CA4</code></p><p>And the SHA-256 hash of “crypt0” is</p><p><code>7BA359D3742595F38347A0409331FF3C8F3C91FF855CA277CB8F1A3A0C0829C4</code></p><p>The other main tool is digital signatures. A digital signature is a value that can only be computed by someone with a private key, but can be verified by anyone with the corresponding public key. Digital signatures are way for a private key holder to “sign,” or attest to the authenticity of a specific message in a way that anyone can validate it.</p><p>These two tools can be combined to solidify the trust relationships on the Internet. By giving private keys to the trusted parties who are responsible for defining the relationships between ASs, IPs, domain names and content, you can create chains of trust that can be publicly verified. Rather than hope and pray, these relationships can be validated in real time at scale.</p><p>Let’s take our webpage loading example and see where digital signatures can be applied.</p><p><b>Routing</b>. Time-bound delegation of trust is defined through a system called the RPKI. RPKI defines an object called a Resource Certificate, an attestation that states that a given IP range belongs to a specific ASN for this period of time, digitally signed by the RIR responsible for assigning the IP range. Networks share routes via BGP, and if a route is advertised for an IP that does not conform the the Resource Certificate, the network can choose not to accept it.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2GgcQBjG2ecuqivy9h7SCe/f6bea1c0abb365d2cab805c221d00ae6/roas_3x.png" />
            
            </figure><p><b>DNS.</b> Adding cryptographic assurance to routing is powerful, but if a network adversary can change the content of the data (such as the DNS responses), then the system is still at risk. DNSSEC is a system built to provide a trusted link between names and IP addresses. The root of trust in DNSSEC is the DNS root key, which is managed with an <a href="https://www.iana.org/dnssec/ceremonies">elaborate signing ceremony</a>.</p><p><b>HTTPS</b>. When you connect to a site, not only do you want it to be coming from the right host, you also want the content to be private. The Web PKI is a system that issues certificates to sites, allowing you to bind the domain name to a time-bounded private key. Because there are many CAs, additional accountability systems like <a href="/introducing-certificate-transparency-and-nimbus/">certificate transparency</a> need to be involved to help keep the system in check.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6oSYpHOMRKf2EtzXWvcTbE/5b1100ad17540b9946cdbf91604a72fc/connection-to-asn_3.5x.png" />
            
            </figure><p>This cryptographic scaffolding turns the Internet into an encoded system of trust. With these systems in place, Internet users no longer need to trust every network and party involved in this diagram, they only need to trust the RIRs, DNSSEC and the CAs (and know the correct time).</p><p>This week we’ll be making some announcements that help strengthen this system of accountability.</p>
    <div>
      <h2>Privacy and integrity with friends</h2>
      <a href="#privacy-and-integrity-with-friends">
        
      </a>
    </div>
    <p>The Internet is great because it connects us to each other, but the details of how it connects us are important. The technical choices made when Internet was designed come with some interesting human implications.</p><p>One implication is <b>trackability</b>. Your IP address is contained on every packet you send over the Internet. This acts as a unique identifier for anyone (corporations, governments, etc.) to track what you do online. Furthermore, if you connect to a server, that server’s identity is sent in plaintext on the request <b>even over HTTPS</b>, revealing your browsing patterns to any intermediary who cares to look.</p><p>Another implication is <b>malleability</b>. Resources on the Internet are defined by <i>where</i> they are, not <i>what</i> they are. If you want to go to CNN or BBC, then you connect to the server for cnn.com or bbc.co.uk and validate the certificate to make sure it’s the right site. But once you’ve made the connection, there’s no good way to know that the actual content is what you expect it to be. If the server is hacked, it could send you anything, including dangerous malicious code. HTTPS is a secure pipe, but there’s no inherent way to make sure what gets sent through the pipe is what you expect.</p><p>Trackability and malleability are not inherent features of interconnectedness. It is possible to design networks that don’t have these downsides. It is also possible to build new networks with better characteristic on top of the existing Internet. The key ingredient is cryptography.</p>
    <div>
      <h3>Tracking-resilient networking</h3>
      <a href="#tracking-resilient-networking">
        
      </a>
    </div>
    <p>One of the networks built on top of the Internet that provides good privacy properties is Tor. The Tor network is run by a group of users who allow their computers to be used to route traffic for other members of the network. Using cryptography, it is possible to route traffic from one place to another without points along the path knowing both the source and the destination at the same time. This is called <a href="https://en.wikipedia.org/wiki/Onion_routing">onion routing</a> because it involves multiple layers of encryption, like an onion. Traffic coming out of the Tor network is “anonymous” because it could have come from anyone connected to the network. Everyone just blends in, making it hard to track individuals.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/68kxhYzrB1vuZ1FogJ2MgK/e11e433e5f39a95cd6ef9ed4009b5c8b/Tor-Onion-Cloudflare.png" />
            
            </figure><p>Similarly, web services can use onion routing to serve content inside the Tor network without revealing their location to visitors. Instead of using a hostname to identify their network location, so-called onion services use a cryptographic public key as their address. There are hundreds of onion services in use, including the one <a href="/welcome-hidden-resolver/">we use for 1.1.1.1</a> or the one in <a href="https://en.wikipedia.org/wiki/Facebookcorewwwi.onion">use by Facebook</a>.</p><p>Troubles occur at the boundary between Tor network and the rest of the Internet. This is especially true for user is attempting to access services that rely on abuse prevention mechanisms based on reputation. Since Tor is used by both privacy-conscious users and malicious bots, connections from both get lumped together and as the expression goes, one bad apple ruins the bunch. This unfortunately exposes legitimate visitors to anti-abuse mechanisms like CAPTCHAs. Tools like <a href="/cloudflare-supports-privacy-pass/">Privacy Pass</a> help reduce this burden but don’t eliminate it completely. This week we’ll be announcing a new way to improve this situation.</p>
    <div>
      <h3>Bringing integrity to content delivery</h3>
      <a href="#bringing-integrity-to-content-delivery">
        
      </a>
    </div>
    <p>Let’s revisit the issue of malleability: the fact that you can’t always trust the other side of a connection to send you the content you expect. There are technologies that allow users to insure the integrity of content without trusting the server. One such technology is a feature of HTML called <a href="https://www.w3.org/TR/SRI/">Subresource Integrity (SRI)</a>. SRI allows a webpage with sub-resources (like a script or stylesheet) to embed a unique cryptographic hash into the page so that when the sub-resource is loaded, it is checked to see that is matches the expected value. This protects the site from loading unexpected scripts from third parties, <a href="/an-introduction-to-javascript-based-ddos/">a known attack vector</a>.</p><p>Another idea is to flip this on its head: what if instead of fetching a piece of content from a specific location on the network, you asked the network to find piece of content that matches a given hash? By assigning resources based on their actual content rather than by location it’s possible to create a network in which you can fetch content from anywhere on the network and still know it’s authentic. This idea is called <i>content addressing</i> and there are networks built on top of the Internet that use it. These content addressed networks, based on protocols such <a href="https://ipfs.io/">IPFS</a> and <a href="https://datproject.org/">DAT</a>, are blazing a trail new trend in Internet applications called the Distributed Web. With the Distributed Web applications, malleability is no longer an issue, opening up a new set of possibilities.</p>
    <div>
      <h3>Combining strengths</h3>
      <a href="#combining-strengths">
        
      </a>
    </div>
    <p>Networks based on cryptographic principles, like Tor and IPFS, have one major downside compared to networks based on names: usability. Humans are exceptionally bad at remembering or distinguishing between cryptographically-relevant numbers. Take, for instance, the New York Times’ onion address:</p><p><code>https://www.nytimes3xbfgragh.onion/</code></p><p>This is would easily confused with similar-looking onion addresses, such as</p><p><code>https://www.nytimes3xfkdbgfg.onion/</code></p><p>which may be controlled by a malicious actor.</p><p>Content addressed networks are even worse from the perspective of regular people. For example, there is a snapshot of the Turkish version of Wikipedia on IPFS with the hash:</p><p><code>QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX</code></p><p>Try typing this hash into your browser without making a mistake.</p><p>These naming issues are things Cloudflare is perfectly positioned to help solve.First, by putting the hash address of an IPFS site in the DNS (and adding DNSSEC for trust) you can give your site a traditional hostname while maintaining a chain of trust.</p><p>Second, by enabling browsers to use a traditional DNS name to access the web through onion services, you can provide safer access to your site for Tor user with the added benefit of being better able to distinguish between bots and humans.With Cloudflare as the glue, is is possible to connect both standard internet and tor users to web sites and services on both the traditional web with the distributed web.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/rzDTSMsIy1c5frGel8Eff/ea82dba88874f5772d6f7bdc3cc54776/bowtie-diagram-crypto-week-2018-v02_medium-1.gif" />
            
            </figure><p>This is the promise of Crypto Week: using cryptographic guarantees to make a stronger, more trustworthy and more private internet without sacrificing usability.</p>
    <div>
      <h2>Happy Crypto Week</h2>
      <a href="#happy-crypto-week">
        
      </a>
    </div>
    <p>In conclusion, we’re working on many cutting-edge technologies based on cryptography and applying them to <a href="https://blog.cloudflare.com/50-years-of-the-internet-work-in-progress-to-a-better-internet/">make the Internet better</a>. The first announcement today is the launch of Cloudflare's <a href="/distributed-web-gateway/">Distributed Web Gateway</a> and <a href="/e2e-integrity/">browser extension</a>. Keep tabs on the Cloudflare blog for exciting updates as the week progresses.</p><p>I’m very proud of the team’s work on Crypto Week, which was made possible by the work of a dedicated team, including several brilliant interns. If this type of work is interesting to you, Cloudflare is hiring for the <a href="https://boards.greenhouse.io/cloudflare/jobs/634967?gh_jid=634967">crypto team</a> and <a href="https://www.cloudflare.com/careers/">others</a>!</p> ]]></content:encoded>
            <category><![CDATA[Crypto Week]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[IPFS]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Tor]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">2NzZFGM5fxcJ3xnCx2v7jD</guid>
            <dc:creator>Nick Sullivan</dc:creator>
        </item>
    </channel>
</rss>