Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Distributed Hash Table in IPFS and Bittorrent prevent abuse?

My understanding is that IPFS and Bittorrent Mainline DHT are built on top of a Distributed hash Table (Kademlia). They use the file hash as Kademlia key to find a list of peer that might have this file.

1- What I don't understand is if this is all decentralized who remove from the DHT peer that no longer host a file content?

2- What prevent someone from storing large amount of data for free inside the DHT?

3- What prevent someone from disrupting the network by adding large number of invalid peer for a popular file.

4- What prevent a bad actor from joining the DHT ring and not following the routing protocol thus preventing discovery message from reaching correct nodes.

like image 819
skyde Avatar asked Nov 12 '18 18:11

skyde


People also ask

Why is distributed hash table important?

Why Is a Distributed Hash Table Used? Distributed hash tables provide an easy way to find information in a large collection of data because all keys are in a consistent format, and the entire set of keys can be partitioned in a way that allows fast identification on where the key/value pair resides.

How does Ipfs DHT work?

IPFS takes SHA256(PeerID) and interprets it as an integer between 0 and 2^256-1 . A projection that will take a record key and calculate a position in the address space where the peer or peers most ideally suited to store the record should be near. IPFS uses SHA256(Record Key) .

What is the distributed hash table system with the chord system?

In computing, Chord is a protocol and algorithm for a peer-to-peer distributed hash table. A distributed hash table stores key-value pairs by assigning keys to different computers (known as "nodes"); a node will store the values for all the keys for which it is responsible.


1 Answers

Not sure why this was downvoted. These are excellent questions.

1- What I don't understand is if this is all decentralized who remove from the DHT peer that no longer host a file content?

I think that DHT entries are regularly re-broadcast. So if a peer goes away, its DHT entries will no longer be broadcast and the network will forget about the data it provides unless some other node has it.

2- What prevent someone from storing large amount of data for free inside the DHT?

Unless you re-publish or somebody else is interested in the data, it will vanish. The amount of data that you can store directly in a DHT entry is limited. So you can make other nodes store some of your data by putting data directly into DHT entries, but the effort outweighs the benefits.

3- What prevent someone from disrupting the network by adding large number of invalid peer for a popular file.

I think there are some mechanisms envisioned in IPFS to protect the DHT against attacks. However, I don't think the current implementation is all that sophisticated. I don't think that current IPFS would deal well with a large scale distributed DDOS attack.

4- What prevent a bad actor from joining the DHT ring and not following the routing protocol thus preventing discovery message from reaching correct nodes.

I think a single node would be insufficient to do much damage, because a node will ask multiple peers. You would have to have multiple nodes to do significant damage.

But IPFS as it is now would not survive a sophisticated attack by state actors.

like image 170
Rüdiger Klaehn Avatar answered Oct 19 '22 10:10

Rüdiger Klaehn