IPFS logo

IPFS

Security

We approach security from the point of view of the DHT's Keyspace Density.

The following plots examine the peer distribution within the keyspace, aiding in the identification of potential Sybil and eclipse attacks.

Keyspace Density

In Kademlia, every object indexed by the DHT requires a binary identifier. In the libp2p DHT implementation, peers are identified by the digest of `sha256(peer_id)` and CIDs are identified by the digest of `sha256(cid)`. This Kademlia identifier determines the location of an object within the Kademlia XOR keyspace.

Keyspace Regions Population

The plot shows how many peers are included in a particular region of the keyspace. Too many peers within one region indicate a potential issue.

Keyspace Density Distribution

The plot shows the distribution of the PeerIDs across the Poisson curve. Too many PeerIDs outside the curve indicate a potential issue.

Topology Dynamics

Although not directly a security metric, very high node churn can affect the performance of a DHT-based network. For instance, Provider Records might become unavailable faster than republication of those records, if the nodes responsible to hold them go offline. In turn, this will result in some keys not being available in the network.

Peer Churn

CDF of Peer Departure Times