[Waterdrop Cloud] Filecoin x ChainSafe Files: Ensure data is always available to users

ChainSafe Files is an online platform that takes advantage of IPFS technology to provide high-privacy and high-security cloud storage services. The latest blog of Protocol Labs introduces the platform in detail, let's take a look at it together

ChainSafe Files provides highly private, highly secure cloud storage, allowing users to maintain complete sovereignty over their data. Utilize all the advantages of IPFS distributed storage and blockchain technology to provide services to users.

Files abstracts the complexity of these systems to provide a simple, user-friendly experience. In this way, users can easily access our data storage solution, which is more private, flexible and decentralized than traditional cloud storage options.

ChainSafe Files is an online platform to store, view and share files. Despite what it looks like, it's not your typical cloud storage platform. ChainSafe Files was built and designed with user freedom and data privacy top of mind.

To realize the vision of better user autonomy and privacy, the following two principles are proposed:

  • privacy. File users should be the only ones able to read their data without fear of privacy violations;

  • self-reliance. Users should be able to access their files and not be locked into our application, even in the unlikely event that the Files platform becomes unavailable.

This article will introduce the most important parts of the Files architecture, explaining how we strive to build a product that puts users first:

  • Decentralized login process, effectively preventing anyone except yourself from accessing the Files user interface;

  • Access tools that allow you to encrypt any data you store;

  • Finally, we'll show how to leverage IPFS technology to ensure your data is always available to you.

Decentralized login

When you access a traditional web application for the first time, you usually need to register and then log in. You'll then enter your login and password, then the platform's backend will verify that the credentials match the information you provided during registration, and finally it will let you access your files.

Now, the platform is the gatekeeper. If a traditional web application has a backdoor, or if the administrator is malicious, it can easily access your data. These backdoors can be introduced by hackers or even by the platform itself.

Another common use case for application user login is with a single sign-on solution, such as Google. They are convenient because they are just one click away. They are primarily used as a single source of truth where third parties such as Google can guarantee that you are who you say you are because you are logged into their platform.

All the application needs to do is verify that the third-party signature is valid (such as Google's signature). Now, this means that in our example, Google is the gatekeeper and you have to trust them. If your Google account is hacked, if Google itself is hacked, or if the administrators are malicious, they may issue a signature to guarantee that someone can be identified as you.

At ChainSafe Files, to prevent the need to trust third parties, we built an authentication flow using Torus' decentralized login provider called tKey. It is no longer necessary to trust a single actor, whether it is Google, Github, or the team at ChainSafe Files. You will need to go through two stages of authentication:

1. Password, in case your first login method is compromised and malicious actors still cannot log into Files on your behalf;

2. To simplify things, your browser will also be used as a second factor, so if you log into Files using the same browser, you can log into your account with just one click.

In this section, we walk through Files' login flow and explain how we use a decentralized authentication system. Thanks to this, there is no single entity that stores user credentials, and you don't have to trust a single entity, whether it's Files' backend or a third-party platform. Now that we are sure that no single entity has gatekeeper access to your files, how do you ensure that you are the only one who can read your content.

No one can read your files except yourself

When you log into ChainSafe Files using two factors, behind the scenes, you rebuild a public/private key pair known only to you. We refer to it as the master key in this article. This master key only exists in your browser. It is rebuilt every time you log in to Files and deleted again when you end your browser session.

Let's say you want to upload images of cats to ChainSafe Files. When doing so, the Files app will request the encryption key stored on the Files backend. Of course, since it's stored away from your computer, it's not stored in plain text. It is encrypted (using AES-256) with your master key. Only you can read this encryption key. Once obtained, the cat image you are about to upload will be encrypted locally, in the browser, on your machine, and finally will be sent to Files' backend.

Let's briefly discuss how the site works here. Technically, visiting a website in a browser means that you are downloading the website's code from the Internet and executing it locally in your browser. What happens in your browser is not necessarily shared with any server on the Internet. Any website's code can be seen and verified. Also because Files is open source, you can be verified in actual operation.

Going back to our cat diagram, remember what we said earlier: what happens in your local browser is not necessarily shared on the Internet. When the cat image reaches Files' backend, it's already encrypted with this encryption key that only you have access to. As cute as it is, no one can tell it's an image of a cat!

As you can see, we build our files using a privacy-by-design approach. We've done our best to prevent someone from impersonating you when you log in, and you don't have to trust any third parties - not even ChainSafe. Also, thanks to strong encryption, no one can read the contents of your files except you.

Your files are accessible even when the file interface and infrastructure is down

A very important aspect of building an open and decentralized platform is data retrieval. It sounds great that no one but you can log into the platform and read your files, but what if the platform goes down, or worse, censors you? This is where the IPFS decentralized storage network comes into play.

Simply put, IPFS is a network of computers (called nodes) that store files. A node can "pin" your file, which means it keeps a copy for distribution in case it's needed. Files' backend is built on ChainSafe Storage, and any files uploaded to Files are also pinned by a node on our infrastructure. Each file has an IPFS Content Identifier (CID), which you can see on the interface when you click on Info.

This way, you can retrieve files without using the Files user interface. Now, as mentioned earlier, these files are encrypted, and if you want to read them, you need to decrypt them. We've created a simple cli tool to download and decrypt your files from IPFS without using a file interface.

ChainSafe Files uses IPFS as a caching layer to be able to display your files instantly when you need them. While there is no fee to retrieve files from IPFS, the nodes that are part of the network have no power to store files and there is no guarantee that your files will always be available when you need them. For this, you can pay specific nodes to ensure they keep your files around.

User-centered, privacy protected

All in all, you are the only person who can log into the Files user interface to retrieve your master key. Any files you upload are encrypted and can only be read by you. Your files are stored on a decentralized network, allowing you to access them even if the ChainSafe Files infrastructure is no longer available.

Users of a platform leave behind a lot of metadata that can tell us a lot about them. Let's take WhatsApp as an example. While the content of the messages is encrypted, the information gleaned about who you message, how often, what time of day, etc. can tell you a lot about yourself, your habits, you and your social circle . Now, mix this data with other sources like what other apps you have installed on your phone, which Facebook account you might be associated with, and you have the perfect target.

Any personal data is sensitive and must be protected from falling into the wrong hands. Even better, they shouldn't even be collected in the first place.

ChainSafe Files takes data privacy very seriously and aims to provide the best possible experience on the Files platform while protecting our users from such threats. We are not in the data collection business, and we will ensure that user usage information will not be shared with third parties nor sold.

Guess you like

Origin blog.csdn.net/Dripshuolian/article/details/121015454