Introduction to IPFS

What is IPFS ?

The InterPlanetary File System (IPFS) is a protocol, hypermedia and file sharing peer-to-peer network for  storing and accessing files, websites, applications, and data in a distributed file system. IPFS uses content-addressing to uniquely identify each file in a global namespace connecting IPFS hosts.** **

IPFS knows how to find information by its contents, not its location. When you use IPFS, you don’t just download files from someone else, your computer also helps distribute them. 

IPFS makes this possible for web pages, documents, emails and even database records.** **

Founder and current team

IPFS was created by Juan Benet, who later founded Protocol Labs in May 2014. IPFS was launched in an alpha version in February 2015.

Today, while IPFS is primarily an open-source, community-driven project, community priorities are shepherded by a core team that helps to ensure that strategic roadmapping and overall velocity continue to meet the project's high-level goals of decentralizing the web.

Many of the IPFS core team are also part of Protocol Labs, and are organized flexibly and responsively to nimbly adjust to shifting priorities over time. Current areas of high-level organization include:

  • Web3 Developer Tools: Ensuring that developers on the decentralized web have a robust, performant, easy-to-use stack — including IPFS — available to them in order to accelerate the impact of the future internet.

  • Ecosystem: Seeding the long-term growth of the decentralized web by fostering relationships with a wide variety of developers and other stakeholders who are using IPFS and related protocols and tools in the web3 stack.

  • Stewards: Ensuring the existing IPFS codebase and related tools are well maintained and iteratively improved upon in response to community needs and future goals.

The IPFS core team strictly adheres to a policy of public discussion and communication by default in order to maximize opportunities for community involvement and feedback. This means a commitment to communicating and discussing strategic direction and other high-level decision making in public-facing, async-friendly channels such as GitHub and the official IPFS forums.

There are many areas that the IPFS’ community can provide assistance with. The main areas displayed in its website are:

  • Code: help by writing and maintaining code.

  • Documentation: writing technical documentation.

  • Testing: help avoiding mistakes and find issues by creating testing scenarios or digging into edge-cases.

How IPFS works

There are three fundamental principles to understanding IPFS:

  1. Unique identification via content addressing

  2. Content linking via directed acyclic graphs (DAGs)

  3. Content discovery via distributed hash tables (DHTs)

Each content can be identified by its content identifier (CID), that is its hash. The CID is also used to link similar content. IPFS used the  IPLD, or Interplanetary Lined Data, to translate those hashes and allow for the unification of the data across distributed systems. It provides many libraries to understand and resolve each search to explore data regardless of the protocol.** **

IPFS uses Merkle Dags (which is a data structure where each node has an unique identifier that is a hash of the node’s contents) for representing directories and files. IPFS splits that content into blocks so different parts of the file can come from different sources and be authenticated quickly.

To find which peers are hosting the content you're after, IPFS uses a distributed hash table. 

Once you know which peers are storing each of the blocks that make up the content you're after, you use the DHT again to find the current location of those peers (routing). 

You've discovered your content, and you've found the current location(s) of that content. Now, you need to connect to that content and get it (exchange). To request blocks from and send blocks to other peers. Once those blocks arrive, you can verify them by hashing their content to get CIDs and compare them to the CIDs that you requested. These CIDs also allow you to deduplicate blocks if needed.

The libp2p project is the part of the IPFS ecosystem that provides the DHT and handles peers connecting and talking to each other.

What makes libp2p especially useful for peer-to-peer connections is connection multiplexing. For everything your peers need to talk to each other about, you send a little bit of each thing, and the other end knows how to sort those chunks where they belong.

This is useful because establishing connections is usually hard to set up and expensive to maintain. With multiplexing, once you have that connection, you can do whatever you need on it.

Decentralization

Making it possible to download a file from many locations that aren't managed by one organization:

** **

  • Supports a resilient internet:. If someone attacks some website servers or an engineer makes a big mistake that causes servers to catch fire, you can still get the same webpages from somewhere else, if there is a copy being hosted using IPFS.

  • Makes it harder to censor content. Because files on IPFS can come from many places, it's harder for anyone (whether they're states, corporations, or someone else) to block things. 

  • Can speed up the web when you're far away or disconnected. If you can retrieve a file from someone nearby instead of hundreds or thousands of miles away, you can often get it faster. IPFS has similar functionalities to a CDN.

 

Phishing Attacks

Even with every good feature, comes with a downside. IPFS is vulnerable with phishing attacks and it’s almost impossible to delete phishing content in one node, because it can be available in others, as well as, it is not possible to verify if the page or application is impersonating someone else's. There is no certificate validation as it is known on Web 2.0. 

One of the main reasons why IPFS has become a new playground for phishing is that many web hosting, file storage or cloud services are now offering IPFS services. This means that there’s more flexibility for the phishers in creating new types of phishing URLs. In addition, the spammers can easily camouflage their activities by hosting their content in legitimate web hosting services or using multiple URL redirection techniques to help thwart scanners using URL reputation or automated URL analysis.  

Be sure where you are connected, try not to give any personal information and avoid clicking on suspicious buttons or  advertisements.

Conclusion

This protocol allows the publication of files, thus avoiding any possible censorship.

It plays a vital role in the ecosystem and will take a leading role as decentralization progresses. We also must be careful what we search and not to fall into some phishing traps.

Useful Links

https://ipfs.tech/team/

https://docs.ipfs.tech/

https://research.protocol.ai/publications/ipfs-content-addressed-versioned-p2p-file-system/benet2014.pdf

https://wax-io.medium.com/not-ipfs-not-your-nft-29bcf692702f

https://docs.ipfs.tech/community/contribute/ways-to-contribute

** **